Re: [PATCH 18/32] fs: Provide operation for fetching mapping_metadata_bhs
Christoph Hellwig <[email protected]> Wed, 4 Mar 2026 05:44:12 -0800
| Newsgroups | gmane.comp.file-systems.ext4,gmane.linux.file-systems,gmane.linux.kernel.mm,gmane.linux.kernel.aio.general |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Mar 04, 2026 at 02:38:41PM +0100, Jan Kara wrote: > I was looking into that. Passing these to sync_mapping_buffers(), > invalidate_inode_buffers() is easy. Passing to mark_buffer_dirty_inode() is > relatively tedious but doable. Where it gets difficult are calls like > bforget() and most importantly try_to_free_buffers() on bdev mapping where > you currently have no way to get to the mmb struct... We do have > b_assoc_map pointer in buffer_head which we could switch to point to mmb > instead but IO error handling on bhs needs to get to the mapping from bh so > we'd then have to add address_space pointer to mmb for these uses. All in > all it's doable but I've decided it isn't really worth it. I guess a backpointer from the bh list to the mapping/inode would solve all this? Or am I missing something?