summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-gpio.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2008-11-12 14:32:25 -0500
committerChris Mason <chris.mason@oracle.com>2008-11-12 14:32:25 -0500
commitc5c9cd4d1b827fe545ed2a945e91e3a6909f3886 (patch)
tree5dae28d8cd871952b105cdc2822ef4e54f1f02f3 /drivers/leds/leds-gpio.c
parent2ed6d66408527be0d1c6131d44cec7e86008ba26 (diff)
Btrfs: allow clone of an arbitrary file range
This patch adds an additional CLONE_RANGE ioctl to clone an arbitrary (block-aligned) file range to another file. The original CLONE ioctl becomes a special case of cloning the entire file range. The logic is a bit more complex now since ranges may be cloned to different offsets, and because we may only be cloning the beginning or end of a particular extent or checksum item. An additional sanity check ensures the source and destination files aren't the same (which would previously deadlock), although eventually this could be extended to allow the duplication of file data at a different offset within the same file. Any extents within the destination range in the target file are dropped. We currently do not cope with the case where a compressed inline extent needs to be split. This will probably require decompressing the extent into a temporary address_space, and inserting just the cloned portion as a new compressed inline extent. For now, just return -EINVAL in this case. Note that this never comes up in the more common case of cloning an entire file. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'drivers/leds/leds-gpio.c')
0 files changed, 0 insertions, 0 deletions