Btw, if my previous reply wasn't clear: please add the test for this to xfstests where they actually get run regularly and not the kernel selftests which for file systems are basically unused. Bonus points for having generic tests instead of purely file system specific ones.