summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-defrag.c
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2014-03-05 10:07:35 +0800
committerJosef Bacik <jbacik@fb.com>2014-03-10 15:17:19 -0400
commit2131bcd38b18167f499f190acf3409dfe5b3c280 (patch)
tree505aa099a705f6da3dec233c05fe0f827ff8cf84 /fs/btrfs/tree-defrag.c
parenta4d96d6254590df5eb9a6ac32434ed9d33a46d19 (diff)
Btrfs: add readahead for send_write
Btrfs send reads data from disk and then writes to a stream via pipe or a file via flush. Currently we're going to read each page a time, so every page results in a disk read, which is not friendly to disks, esp. HDD. Given that, the performance can be gained by adding readahead for those pages. Here is a quick test: $ btrfs subvolume create send $ xfs_io -f -c "pwrite 0 1G" send/foobar $ btrfs subvolume snap -r send ro $ time "btrfs send ro -f /dev/null" w/o w real 1m37.527s 0m9.097s user 0m0.122s 0m0.086s sys 0m53.191s 0m12.857s Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Reviewed-by: David Sterba <dsterba@suse.cz> Signed-off-by: Josef Bacik <jbacik@fb.com>
Diffstat (limited to 'fs/btrfs/tree-defrag.c')
0 files changed, 0 insertions, 0 deletions