Lines Matching refs:nocow_ctx

4074 	struct scrub_copy_nocow_ctx *nocow_ctx;  in copy_nocow_pages()  local
4077 nocow_ctx = kzalloc(sizeof(*nocow_ctx), GFP_NOFS); in copy_nocow_pages()
4078 if (!nocow_ctx) { in copy_nocow_pages()
4087 nocow_ctx->sctx = sctx; in copy_nocow_pages()
4088 nocow_ctx->logical = logical; in copy_nocow_pages()
4089 nocow_ctx->len = len; in copy_nocow_pages()
4090 nocow_ctx->mirror_num = mirror_num; in copy_nocow_pages()
4091 nocow_ctx->physical_for_dev_replace = physical_for_dev_replace; in copy_nocow_pages()
4092 btrfs_init_work(&nocow_ctx->work, btrfs_scrubnc_helper, in copy_nocow_pages()
4094 INIT_LIST_HEAD(&nocow_ctx->inodes); in copy_nocow_pages()
4096 &nocow_ctx->work); in copy_nocow_pages()
4103 struct scrub_copy_nocow_ctx *nocow_ctx = ctx; in record_inode_for_nocow() local
4112 list_add_tail(&nocow_inode->list, &nocow_ctx->inodes); in record_inode_for_nocow()
4120 struct scrub_copy_nocow_ctx *nocow_ctx = in copy_nocow_pages_worker() local
4122 struct scrub_ctx *sctx = nocow_ctx->sctx; in copy_nocow_pages_worker()
4123 u64 logical = nocow_ctx->logical; in copy_nocow_pages_worker()
4124 u64 len = nocow_ctx->len; in copy_nocow_pages_worker()
4125 int mirror_num = nocow_ctx->mirror_num; in copy_nocow_pages_worker()
4126 u64 physical_for_dev_replace = nocow_ctx->physical_for_dev_replace; in copy_nocow_pages_worker()
4153 record_inode_for_nocow, nocow_ctx); in copy_nocow_pages_worker()
4165 while (!list_empty(&nocow_ctx->inodes)) { in copy_nocow_pages_worker()
4167 entry = list_first_entry(&nocow_ctx->inodes, in copy_nocow_pages_worker()
4172 entry->root, nocow_ctx); in copy_nocow_pages_worker()
4182 while (!list_empty(&nocow_ctx->inodes)) { in copy_nocow_pages_worker()
4184 entry = list_first_entry(&nocow_ctx->inodes, in copy_nocow_pages_worker()
4197 kfree(nocow_ctx); in copy_nocow_pages_worker()
4247 struct scrub_copy_nocow_ctx *nocow_ctx) in copy_nocow_pages_for_inode() argument
4249 struct btrfs_fs_info *fs_info = nocow_ctx->sctx->dev_root->fs_info; in copy_nocow_pages_for_inode()
4257 u64 len = nocow_ctx->len; in copy_nocow_pages_for_inode()
4287 physical_for_dev_replace = nocow_ctx->physical_for_dev_replace; in copy_nocow_pages_for_inode()
4289 nocow_ctx_logical = nocow_ctx->logical; in copy_nocow_pages_for_inode()
4314 nocow_ctx->mirror_num); in copy_nocow_pages_for_inode()
4345 err = write_page_nocow(nocow_ctx->sctx, in copy_nocow_pages_for_inode()