RFC btrfs buffered iomap support
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest31 patches 13 repliesIn review
Patches in v1 No applies recorded yet
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 00/31] btrfs buffered iomap support
From: Goldwyn Rodrigues <[email protected]>
This is an attempt to perform the bufered read and write using iomap on btrfs.
I propose these changes as an RFC because I would like to know on your comments on the feasibility of going ahead with the design. It is not feature complete with the most important support missing is multi-device and compression.
Sending to BTRFS mailing only for perspective from btrfs developers first.
Locking sequence change
One of the biggest architecture changes is locking extents before pages. writepage(), called during memory pressure provides the page which is locked already. Perform a best effort locking and work with what is feasible. For truncate->invalidatepage(), lock the pages before calling setsize(). Are there any other areas which need to be covered?
TODO
====
Bio submission for multi-device
Multi-device submission would require some work with respect to asynchronous completions. iomap can merge bio's making it larger than extent_map's map_length. There is a check in btrfs_map_bio which WARN()s on this. Perhaps a more modular approach of having callbacks would be easier to deal with.
Compression
This would require extra flags to iomap, say type IOMAP_ENCODED, which would require iomap to read/write complete extents as opposed to performing I/O on only what is requested. An additional field io_size would be required to know how much of compressed size maps to uncompressed size.
Known issues
============
BIO Submission: described above
Random WARN_ON in kernel/locking/lockdep.c:895 points to memory corruption.
Finally, I have added some questions in the patch headers as well.
Signature · 52 lines
Goldwyn
Goldwyn Rodrigues (31):
iomap: Check if blocksize == PAGE_SIZE in to_iomap_page()
iomap: Add submit_io to writepage_ops
iomap: Export iomap_writepage_end_bio()
iomap: Introduce iomap_readpage_ops
btrfs: writepage() lock extent before pages
btrfs: lock extents while truncating
btrfs: write() perform extent locks before locking page
btrfs: btrfs_em_to_iomap () to convert em to iomap
btrfs: Don't process pages if locked_page is NULL
btrfs: Add btrfs_map_blocks to for iomap_writeback_ops
btrfs: Use submit_io to submit btrfs writeback bios
btrfs: endio sequence for writepage
btrfs: do not checksum for free space inode
btrfs: end EXTENT_MAP_INLINE writeback early
btrfs: Switch to iomap_writepages()
btrfs: remove force_page_uptodate
btrfs: Introduce btrfs_iomap
btrfs: Add btrfs_iomap_release()
btrfs: Add reservation information to btrfs_iomap
btrfs: Carve out btrfs_buffered_iomap_begin() from write path
btrfs: Carve out btrfs_buffered_iomap_end from the write path
btrfs: Set extents delalloc in iomap_end
btrfs: define iomap_page_ops
btrfs: Switch to iomap_file_buffered_write()
btrfs: remove all page related functions
btrfs: use srcmap for read-before-write cases
btrfs: Rename end_bio_extent_readpage to btrfs_readpage_endio
btrfs: iomap_begin() for buffered read
btrfs: Use iomap_readpage_ops to allocate and submit bio
btrfs: Do not call btrfs_io_bio_free_csum() if BTRFS_INODE_NODATASUM
is not set
btrfs: Switch to iomap_readpage() and iomap_readahead()
fs/btrfs/ctree.h | 3 +
fs/btrfs/disk-io.c | 9 +-
fs/btrfs/extent_io.c | 103 +++++--
fs/btrfs/extent_io.h | 4 +
fs/btrfs/file.c | 642 ++++++++++++++---------------------------
fs/btrfs/inode.c | 219 ++++++++++++--
fs/gfs2/aops.c | 4 +-
fs/iomap/buffered-io.c | 80 +++--
fs/xfs/xfs_aops.c | 4 +-
fs/zonefs/super.c | 4 +-
include/linux/iomap.h | 26 +-
11 files changed, 601 insertions(+), 497 deletions(-)
--
2.31.1