On 2020/6/30 上午5:30, David Sterba wrote: > On Sun, Jun 28, 2020 at 01:07:15PM +0800, Qu Wenruo wrote: >> +QGROUP_ATTR(rfer, reference); > > Note that this is 'referenced'. > >> +QGROUP_ATTR(excl, exclusive); >> +QGROUP_ATTR(max_rfer, max_reference); > > And here max_referenced. > >> +QGROUP_ATTR(max_excl, max_exclusive); >> +QGROUP_ATTR(lim_flags, limit_flags); >> +QGROUP_RSV_ATTR(data, BTRFS_QGROUP_RSV_DATA); >> +QGROUP_RSV_ATTR(meta_pertrans, BTRFS_QGROUP_RSV_META_PERTRANS); >> +QGROUP_RSV_ATTR(meta_prealloc, BTRFS_QGROUP_RSV_META_PREALLOC); > > The two above fixed but otherwise it's good, thanks. > > The qgroup membership and relations could be added to the sysfs export > too, but we're limited by the PAGE_SIZE output buffer so the information > could be incomplete. > Yep, PAGE_SIZE is one limitation. But we can also go another direction, just using a new dir for related qgroups, then we can workaround the limitation. But personally speaking, the main objective is still the rsv_* members for debug. I don't really want to turn the sysfs interface into a way to export all qgroup info yet. But if this inspired us to explore more usage of sysfs other than adding new ioctls to get information from btrfs, then I can't be more happier. Thanks, Qu
