On Wed, Mar 23, 2022 at 08:54:21AM +0800, Qu Wenruo wrote: > Something I want to avoid is to futher increasing the size of btrfs_bio. > > For buffered uncompressed IO, we can grab the inode from the first page. > For direct IO we have bio->bi_private (btrfs_dio_private). > For compressed IO, it's bio->bi_private again (compressed_bio). > > Do the saved code lines really validate the memory usage for all bios? This isn't about the saved lines. It allows to remove the async submit and completion container structures that both point to an inode, and later on the dio_private structure. So overall it actually is a major memory saving.