]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add BTRFS_IOC_ENCODED_WRITE
authorOmar Sandoval <osandov@fb.com>
Tue, 13 Aug 2019 23:00:02 +0000 (16:00 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 14 Mar 2022 12:13:51 +0000 (13:13 +0100)
commit7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22
tree97c42d1bcd553b2ef14e5b2494b4f303585e09b1
parent1881fba89bd5dcd364d2e1bf561912a90a11c21a
btrfs: add BTRFS_IOC_ENCODED_WRITE

The implementation resembles direct I/O: we have to flush any ordered
extents, invalidate the page cache, and do the io tree/delalloc/extent
map/ordered extent dance. From there, we can reuse the compression code
with a minor modification to distinguish the write from writeback. This
also creates inline extents when possible.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.c
fs/btrfs/compression.h
fs/btrfs/ctree.h
fs/btrfs/file.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/ordered-data.c
fs/btrfs/ordered-data.h