search for: send_hole

Displaying 2 results from an estimated 2 matches for "send_hole".

2013 Oct 25
1
[PATCH] Btrfs: stop using vfs_read in send
...md(sctx, BTRFS_SEND_C_WRITE); if (ret < 0) @@ -3685,7 +3664,6 @@ verbose_printk("btrfs: send_write offset=%llu, len=%d\n", offset, len); tlv_put_failure: out: fs_path_free(p); - set_fs(old_fs); if (ret < 0) return ret; return num_read; @@ -3789,14 +3767,11 @@ static int send_hole(struct send_ctx *sctx, u64 end) struct fs_path *p = NULL; u64 offset = sctx->cur_inode_last_extent; u64 len; - int ret; + int ret = 0; p = fs_path_alloc(); if (!p) return -ENOMEM; - ret = open_cur_inode_file(sctx); - if (ret < 0) - goto out; memset(sctx->read_buf, 0, BTRF...
2013 Nov 12
0
[PATCH] Btrfs: incompatible format change to remove hole extents V4
...80 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -111,6 +111,7 @@ struct send_ctx { int cur_inode_deleted; u64 cur_inode_size; u64 cur_inode_mode; + u64 cur_inode_last_extent; u64 send_progress; @@ -146,6 +147,13 @@ struct name_cache_entry { char name[]; }; +static int need_send_hole(struct send_ctx *sctx) +{ + return (sctx->parent_root && !sctx->cur_inode_new && + !sctx->cur_inode_new_gen && !sctx->cur_inode_deleted && + S_ISREG(sctx->cur_inode_mode)); +} + static void fs_path_reset(struct fs_path *p) { if (p->reversed) {...