I'm just investigating adding support for statx() into Lustre in LU-10934, and I realize that the upstream kernel does not support requesting the project ID as part of that interface.
It would be very useful to add a new STATX_PROJID = 0x800 flag to the upstream kernel, and integrate this into the statx() handling for ext4, xfs, and f2fs if that is easy. It seems possible to use the sb->dq_op->get_projid() interface to fetch this at the VFS level, if available.
While it may take some time to get this into a kernel that we are using, better to start it now, and once it is landed upstream we can at least request to get it added to RHEL8 or similar.
You should add David Howells <firstname.lastname@example.org> to the CC list for the patch review.