And in the journal I dop not find any trace of attr2. There is no complained about a deprecated mount option at all. The last message “XFS: attr2 mount option is deprecated” is coming too late for the journal. It is only on screen.
Where is this attr2 option comint from? I do not find a trace of it in the util-linux source code (source of the mount command).
attr2|noattr2
Note: These options have been deprecated as of kernel v5.10; The noattr2 option will be removed no earlier than in September 2025 and attr2 option will be immutable default.
That’s how I understood it from the excerpt of the ArchWiki. It seems to be a “property” of the filesystem itself.
I found an old-ish thread from Arch forum which has a link to a proposed kernel patch to just remove this warning. Could it be that the patch is not yet implemented?
Yes, I saw this thread as well. Thats why I grep’ed through the util-linux source code. But I could not find a trace of the attr2 option. Except for the v2.17-ReleaseNotes (which is several years old) where is says:
- fix mount.8, xfs attr2 is enabled by default [Karel Zak]
But that it is. No trace of the attr2 in the source code. So how could a remount of the root file system introduce the attr2 option?
I have checked the kernel source. There are a couple of changes related to the attr2 option resp. deprecated xfs options in it. It looks like attr2 is added to the mount options by default.
I have tested kernel 6.16 (I am normally running 6.12 LTS). With 6.16 I do not see the warning anymore. Nevertheless, even with kernel 6.16 I see the attr2 option in /proc/mounts.
I leave it at that. Waiting for kernel 6.18 and zfs supporting it. I assume 6.18 is the next LTS kernel and will not have attr2 anymore.
At this point I am not sure if I have understood the issue correctly.
What I understand is that attr2 is a property of the file system attributed to it when making the filesystem by mkfs.xfs.
What has been deprecated is the use of the mount options for attr2. And what has been removed in the new kernels is the warning about the mount option being deprecated.
Mount options like attr2 have been deprecated with kernel 5.10 already.
commit c23c393eaab5d3097d8b95e5bcbbe73e089a6165 “xfs: remove deprecated mount options”
The reason was, that attr2 is the default for xfs V5. There is no need for a mount option of that name anymore.
With kernel 6.18 the deprecated mount options are being removed for good.
commit b9a176e54162f890aaf50ac8a467d725ed2f00df “xfs: remove deprecated mount options”
Confusing is that both commits talk about removing the mount options. The first commit actually only removes the options from the command line so to speak. The second commit removes the full C code related to these options.
But I could not figure out the commit between kernel 6.12 and 6.16 which removes the warning about the deprecated option.
And I could not figure out why attr2 shows up as an option in /proc/mounts.