summaryrefslogtreecommitdiffstats
path: root/tools/time
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2022-05-05 18:16:14 +0100
committerDavid Sterba <dsterba@suse.com>2022-05-16 17:17:33 +0200
commit521b6803f22e7f773caffbb214276079c13134ef (patch)
tree969c9ea9f5ca59ca6432145427fa97387259b2f6 /tools/time
parent642c5d34da53d8e9d4cdaee3cc48e9d85bca5b67 (diff)
downloadlinux-521b6803f22e7f773caffbb214276079c13134ef.tar.bz2
btrfs: send: keep the current inode open while processing it
Every time we send a write command, we open the inode, read some data to a buffer and then close the inode. The amount of data we read for each write command is at most 48K, returned by max_send_read_size(), and that corresponds to: BTRFS_SEND_BUF_SIZE - 16K = 48K. In practice this does not add any significant overhead, because the time elapsed between every close (iput()) and open (btrfs_iget()) is very short, so the inode is kept in the VFS's cache after the iput() and it's still there by the time we do the next btrfs_iget(). As between processing extents of the current inode we don't do anything else, it makes sense to keep the inode open after we process its first extent that needs to be sent and keep it open until we start processing the next inode. This serves to facilitate the next change, which aims to avoid having send operations trash the page cache with data extents. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/time')
0 files changed, 0 insertions, 0 deletions