From fac5b559a784cd50ae355bddae1ca2a850e4d39a Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Wed, 30 Jan 2013 14:50:23 -0800 Subject: btrfs-progs: Add support for BTRFS_SEND_FLAG_NO_FILE_DATA The flag and command are synced from kernel to user. Also, this patch adds a callback for the BTRFS_SEND_C_UPDATE_EXTENT in struct btrfs_send_ops. read_and_process_cmd() is updated to decode BTRFS_SEND_C_UPDATE_EXTENT and send the values through the right callback. I did not add a callback definition to cmds-receive.c as that code never uses BTRFS_SEND_FLAG_NO_FILE_DATA. Signed-off-by: Mark Fasheh --- send-stream.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'send-stream.c') diff --git a/send-stream.c b/send-stream.c index 55fa7284..a3628e45 100644 --- a/send-stream.c +++ b/send-stream.c @@ -418,6 +418,12 @@ static int read_and_process_cmd(struct btrfs_send_stream *s) TLV_GET_TIMESPEC(s, BTRFS_SEND_A_CTIME, &ct); ret = s->ops->utimes(path, &at, &mt, &ct, s->user); break; + case BTRFS_SEND_C_UPDATE_EXTENT: + TLV_GET_STRING(s, BTRFS_SEND_A_PATH, &path); + TLV_GET_U64(s, BTRFS_SEND_A_FILE_OFFSET, &offset); + TLV_GET_U64(s, BTRFS_SEND_A_SIZE, &tmp); + ret = s->ops->update_extent(path, offset, tmp, s->user); + break; case BTRFS_SEND_C_END: ret = 1; break; -- cgit v1.2.3