On Thu, Apr 10, 2025 at 11:01 AM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote: > On Mon, Apr 07, 2025 at 08:21:01PM +0200, Andreas Gruenbacher wrote: > > Use a dummy inode as mapping->host of the address spaces for global as > > well as per-inode metadata. The global metadata address space is now > > accessed as gfs2_aspace(sdp) instead of sdp->sd_aspace. The per-inode > > metadata address spaces are still accessed as > > gfs2_glock2aspace(GFS2_I(inode)->i_gl). > > > > Based on a previous version from Bob Peterson from several years ago. > > Please explain why you are doing this, not just what. Right, I have this description now: Currently, sdp->sd_aspace and the per-inode metadata address spaces use sb->s_bdev->bd_mapping->host as their ->host. Folios in those address spaces will thus appear to be on "bdev" rather than on "gfs2" filesystems. Those "bdev" filesystems will have the SB_I_CGROUPWB flag set to indicate cgroup writeback support. In fact, gfs2 doesn't support cgroup writeback, though. To fix that, use a "dummy" gfs2 inode as ->host of those address spaces instead. This will then allow functions like inode_to_wb() to determine that the folio belongs to a a filesystem without cgroup writeback support. Thanks, Andreas