On Sun, Apr 07, 2024 at 05:57:58AM +0100, Al Viro wrote: > PS: in grow_dev_folio() we probably want > struct address_space *mapping = bdev->bd_inode->i_mapping; > instead of > struct inode *inode = bdev->bd_inode; > as one of the preliminary chunks. > FWIW, it really looks like address_space (== page cache of block device, > not an unreasonably candidate for primitive) and block size (well, > logarithm thereof) cover the majority of what remains, with device > size possibly being (remote) third... Incidentally, how painful would it be to switch __bread_gfp() and __bread() to passing *logarithm* of block size instead of block size? And possibly supply the same to clean_bdev_aliases()... That would reduce fs/buffer.c uses to just "give me the address_space of that block device"...