]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add "no file data" flag to btrfs send ioctl
authorMark Fasheh <mfasheh@suse.de>
Mon, 4 Feb 2013 20:54:57 +0000 (20:54 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Wed, 20 Feb 2013 17:59:39 +0000 (12:59 -0500)
commitf89e28a4791330ac21ed500f22d611254cab49ed
tree0b2d4906688ca6447a191bcb5f6fe91e0628bda9
parent4f270c50fa7e6d2dccfd6418de09ab509b48abb6
btrfs: add "no file data" flag to btrfs send ioctl

This patch adds the flag, BTRFS_SEND_FLAG_NO_FILE_DATA to the btrfs send
ioctl code. When this flag is set, the btrfs send code will never write file
data into the stream (thus also avoiding expensive reads of that data in the
first place). BTRFS_SEND_C_UPDATE_EXTENT commands will be sent (instead of
BTRFS_SEND_C_WRITE) with an offset, length pair indicating the extent in
question.

This patch does not affect the operation of BTRFS_SEND_C_CLONE commands -
they will continue to be sent when a search finds an appropriate extent to
clone from.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/send.c
fs/btrfs/send.h
include/uapi/linux/btrfs.h