Skip to contentSkip to conversation

New: Re-mount XFS causes "noattr2 mount option is deprecated" warning

Bug 211605 [email protected] 4 participants 19 messages Feb 7, 2021 – Nov 15, 2025

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=211605

            Bug ID: 211605
           Summary: Re-mount XFS causes "noattr2 mount option is
                    deprecated" warning
           Product: File System
           Version: 2.5
    Kernel Version: 5.10.13
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: low
          Priority: P1
         Component: XFS
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

Created attachment 295103
--> https://bugzilla.kernel.org/attachment.cgi?id=295103&action=edit
proposed fix

After recent kernel update, I notice "XFS: noattr2 mount option is deprecated." kernel message every time I shutdown the system. It turns out that remounting a XFS causes the warning.

Steps to Reproduce:
1) Mount a XFS and remount it with different options:

Quoted 2 lines
$ mount some_xfs.img /mnt/test
$ mount -o remount,ro /mnt/test

2) Check kernel message. Remounting causes a line of warning:

Quoted 1 line

XFS: noattr2 mount option is deprecated.

I had checked my fstab and kernel params and didn't found any use of "attr2" option. It doesn't break things, but is a little confusing.

Build Information:
Arch Linux stock kernel.
Linux cvhc-tomato 5.10.13-arch1-1 #1 SMP PREEMPT Wed, 03 Feb 2021 23:44:07 +0000 x86_64 GNU/Linux

Additional Information:
The warning is introduced in commit c23c393e. I guess remounting triggers it because XFS driver still writes attr2 option to /proc/mounts:

Quoted 3 lines
$ grep attr2 /proc/mounts
/dev/nvme0n1p3 / xfs rw,noatime,attr2,inode64,logbufs=8,logbsize=32k,noquota
0 0

"attr2" is default so it should be omitted in mount options. A potential fix (attached, untested) is to hide it and make "noattr2" explicit in xfs_fs_show_options.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw
Quoted 27 lines · On Sun, Feb 07, 2021 at 05:06:36AM +0000, [email protected]…

https://bugzilla.kernel.org/show_bug.cgi?id=211605

            Bug ID: 211605
           Summary: Re-mount XFS causes "noattr2 mount option is
                    deprecated" warning
           Product: File System
           Version: 2.5
    Kernel Version: 5.10.13
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: low
          Priority: P1
         Component: XFS
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

Created attachment 295103
--> https://bugzilla.kernel.org/attachment.cgi?id=295103&action=edit
proposed fix

After recent kernel update, I notice "XFS: noattr2 mount option is deprecated." kernel message every time I shutdown the system. It turns out that remounting a XFS causes the warning.

Quoted 6 lines

Steps to Reproduce:
1) Mount a XFS and remount it with different options:

Quoted 2 lines
$ mount some_xfs.img /mnt/test
$ mount -o remount,ro /mnt/test

2) Check kernel message. Remounting causes a line of warning:

Quoted 1 line

XFS: noattr2 mount option is deprecated.

That sounds like a mount(1) bug, not a kernel bug. Something is adding the "noattr2" option to the remount line. Running you test on my system doesn't show that warning. I'm running a 5.11-rc5 kernel and:

$ mount -V
mount from util-linux 2.36 (libmount 2.36.0: selinux, smack, btrfs, namespaces, assert, debug)
$

And there is no such "noattr2 is deprecated" output. What version of mount are you running?

What we really need from your system is debug that tells us exactly what the mount option string that the mount command is handing the mount syscall.

Quoted 2 lines

I had checked my fstab and kernel params and didn't found any use of "attr2" option. It doesn't break things, but is a little confusing.

"attr2" != "noattr2"

The kernel is warning about a mount option being specified that isn't even in the set emitted in /proc/mounts. Nor is it on your command line. Yet the kernel is warning about it, and that implies that mount has passed it to the kernel incorrectly.

Cheers,

Dave.

Signature · 2 lines
Dave Chinner
[email protected]
#5 lore raw

[Bug 211605] Re-mount XFS causes "noattr2 mount option is deprecated" warning

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=211605

Eric Sandeen ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #1 from Eric Sandeen ([email protected]) ---
That's not the right fix ;) but thanks for the bug report, looks like this was an oversight when attr2/noattr2 were deprecated, we'll get it fixed up.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#6 lore raw

[Bug 211605] Re-mount XFS causes "noattr2 mount option is deprecated" warning

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=211605

--- Comment #2 from Dave Chinner ([email protected]) ---

Quoted 29 lines · On Sun, Feb 07, 2021 at 05:06:36AM +0000, [email protected]…

https://bugzilla.kernel.org/show_bug.cgi?id=211605

            Bug ID: 211605
           Summary: Re-mount XFS causes "noattr2 mount option is
                    deprecated" warning
           Product: File System
           Version: 2.5
    Kernel Version: 5.10.13
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: low
          Priority: P1
         Component: XFS
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

Created attachment 295103
--> https://bugzilla.kernel.org/attachment.cgi?id=295103&action=edit
proposed fix

After recent kernel update, I notice "XFS: noattr2 mount option is deprecated."
kernel message every time I shutdown the system. It turns out that remounting a
XFS causes the warning.

Quoted 6 lines

Steps to Reproduce:
1) Mount a XFS and remount it with different options:

Quoted 2 lines
$ mount some_xfs.img /mnt/test
$ mount -o remount,ro /mnt/test

2) Check kernel message. Remounting causes a line of warning:

Quoted 1 line

XFS: noattr2 mount option is deprecated.

That sounds like a mount(1) bug, not a kernel bug. Something is adding the "noattr2" option to the remount line. Running you test on my system doesn't show that warning. I'm running a 5.11-rc5 kernel and:

$ mount -V
mount from util-linux 2.36 (libmount 2.36.0: selinux, smack, btrfs, namespaces,
assert, debug)
$

And there is no such "noattr2 is deprecated" output. What version of mount are you running?

What we really need from your system is debug that tells us exactly what the mount option string that the mount command is handing the mount syscall.

Quoted 2 lines

I had checked my fstab and kernel params and didn't found any use of "attr2" option. It doesn't break things, but is a little confusing.

"attr2" != "noattr2"

The kernel is warning about a mount option being specified that isn't even in the set emitted in /proc/mounts. Nor is it on your command line. Yet the kernel is warning about it, and that implies that mount has passed it to the kernel incorrectly.

Cheers,

Dave.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#2 lore raw
In reply to Dave Chinner
Quoted 20 lines · Dave Chinner
Quoted 19 lines · On Sun, Feb 07, 2021 at 05:06:36AM +0000, [email protected]…

https://bugzilla.kernel.org/show_bug.cgi?id=211605

            Bug ID: 211605
           Summary: Re-mount XFS causes "noattr2 mount option is
                    deprecated" warning
           Product: File System
           Version: 2.5
    Kernel Version: 5.10.13
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: low
          Priority: P1
         Component: XFS
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

...

Quoted 4 lines

The kernel is warning about a mount option being specified that isn't even in the set emitted in /proc/mounts. Nor is it on your command line. Yet the kernel is warning about it, and that implies that mount has passed it to the kernel incorrectly.

I am confused about how "noattr2" showed up.

But we do still emit "attr2" in /proc/mounts, and a remount will complain about /that/, so we do need to stop emitting deprecated options in /proc/mounts.

# mount /dev/pmem0p1 /mnt/test
# grep pmem /proc/mounts 
/dev/pmem0p1 /mnt/test xfs rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
# mount -o remount,ro /mnt/test
# dmesg | tail -n 1
[346311.064017] XFS: attr2 mount option is deprecated.

Pavel, can you fix this up, since your patch did the deprecations? I guess we missed this on review.

Ideally the xfs(5) man page in xfsprogs should be updated as well to reflect the deprecated items.

-Eric

#7 lore raw

[Bug 211605] Re-mount XFS causes "noattr2 mount option is deprecated" warning

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=211605

--- Comment #3 from Eric Sandeen ([email protected]) ---
I think we do have a buglet here, but I can't explain how you are getting "noattr2"

Can you rerun the test with more info, i.e.:

$ mount -V
$ mount some_xfs.img /mnt/test
$ grep /mnt/test /proc/mounts
$ strace -emount -v mount -o remount,ro /mnt/test

so we can see the mount version, the contents of /proc/mounts, and what gets sent to the mount syscall?

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#8 lore raw

[Bug 211605] Re-mount XFS causes "noattr2 mount option is deprecated" warning

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=211605

--- Comment #4 from Eric Sandeen ([email protected]) ---

Quoted 21 lines · Dave Chinner
Quoted 19 lines · On Sun, Feb 07, 2021 at 05:06:36AM +0000, [email protected]…

https://bugzilla.kernel.org/show_bug.cgi?id=211605

            Bug ID: 211605
           Summary: Re-mount XFS causes "noattr2 mount option is
                    deprecated" warning
           Product: File System
           Version: 2.5
    Kernel Version: 5.10.13
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: low
          Priority: P1
         Component: XFS
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

...

Quoted 4 lines

The kernel is warning about a mount option being specified that isn't even in the set emitted in /proc/mounts. Nor is it on your command line. Yet the kernel is warning about it, and that implies that mount has passed it to the kernel incorrectly.

I am confused about how "noattr2" showed up.

But we do still emit "attr2" in /proc/mounts, and a remount will complain about /that/, so we do need to stop emitting deprecated options in /proc/mounts.

# mount /dev/pmem0p1 /mnt/test
# grep pmem /proc/mounts 
/dev/pmem0p1 /mnt/test xfs
rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
# mount -o remount,ro /mnt/test
# dmesg | tail -n 1
[346311.064017] XFS: attr2 mount option is deprecated.

Pavel, can you fix this up, since your patch did the deprecations? I guess we missed this on review.

Ideally the xfs(5) man page in xfsprogs should be updated as well to reflect the
deprecated items.

-Eric

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#9 lore raw

[Bug 211605] Re-mount XFS causes "noattr2 mount option is deprecated" warning

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=211605

--- Comment #5 from CUI Hao ([email protected]) --- Sorry guys. I realized that I copy the wrong line of kernel message...

I meant to say I got "attr2 mount option is deprecated" warning when "attr2" option is nowhere used...
not "noattr2"... "noattr2" one is only triggered when I was doing more tests.

More information about my mount command. I am using Arch Linux's stock one:

$ mount -V
mount from util-linux 2.36.1 (libmount 2.36.1: btrfs, namespaces, assert,
debug)
$ pacman -Q util-linux 
util-linux 2.36.1-4
Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#3 lore raw
In reply to Eric Sandeen
Quoted 28 lines · Eric Sandeen
Quoted 20 lines · Dave Chinner
Quoted 19 lines · On Sun, Feb 07, 2021 at 05:06:36AM +0000, [email protected]…

https://bugzilla.kernel.org/show_bug.cgi?id=211605

            Bug ID: 211605
           Summary: Re-mount XFS causes "noattr2 mount option is
                    deprecated" warning
           Product: File System
           Version: 2.5
    Kernel Version: 5.10.13
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: low
          Priority: P1
         Component: XFS
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

...

Quoted 4 lines

The kernel is warning about a mount option being specified that isn't even in the set emitted in /proc/mounts. Nor is it on your command line. Yet the kernel is warning about it, and that implies that mount has passed it to the kernel incorrectly.

Quoted 4 lines

I am confused about how "noattr2" showed up.

But we do still emit "attr2" in /proc/mounts, and a remount will complain about /that/, so we do need to stop emitting deprecated options in /proc/mounts.

No, it does not warn on my systems about attr2, either. Like I said, there are no warnings on remount at all because mount it not passing the /proc/mounts information back into the kernel:

# strace -emount -v mount -o remount,ro /mnt/scratch
mount("/dev/vdc", "/mnt/scratch", 0x561f3b93c690, MS_RDONLY|MS_REMOUNT, NULL) = 0
#

This really looks like a mount version/distro issue, not a kernel issue...

Cheers,

Dave.

Signature · 2 lines
Dave Chinner
[email protected]
#10 lore raw

[Bug 211605] Re-mount XFS causes "attr2 mount option is deprecated" warning

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=211605

--- Comment #6 from Dave Chinner ([email protected]) ---

Quoted 29 lines · Eric Sandeen
Quoted 1 line · Dave Chinner

On Sun, Feb 07, 2021 at 05:06:36AM +0000,

Quoted 19 lines · [email protected] wrote:
Quoted 19 lines

https://bugzilla.kernel.org/show_bug.cgi?id=211605

            Bug ID: 211605
           Summary: Re-mount XFS causes "noattr2 mount option is
                    deprecated" warning
           Product: File System
           Version: 2.5
    Kernel Version: 5.10.13
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: low
          Priority: P1
         Component: XFS
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

...

Quoted 4 lines

The kernel is warning about a mount option being specified that isn't even in the set emitted in /proc/mounts. Nor is it on your command line. Yet the kernel is warning about it, and that implies that mount has passed it to the kernel incorrectly.

Quoted 5 lines

I am confused about how "noattr2" showed up.

But we do still emit "attr2" in /proc/mounts, and a remount will complain about /that/, so we do need to stop emitting deprecated options in /proc/mounts.

No, it does not warn on my systems about attr2, either. Like I said, there are no warnings on remount at all because mount it not passing the /proc/mounts information back into the kernel:

# strace -emount -v mount -o remount,ro /mnt/scratch
mount("/dev/vdc", "/mnt/scratch", 0x561f3b93c690, MS_RDONLY|MS_REMOUNT, NULL) =
0
#

This really looks like a mount version/distro issue, not a kernel issue...

Cheers,

Dave.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#4 lore raw
In reply to Eric Sandeen
Quoted 3 lines · Eric Sandeen

Pavel, can you fix this up, since your patch did the deprecations? I guess we missed this on review.

Scratch that, Dave points out that they need to stay until they are removed.

Quoted 2 lines

Ideally the xfs(5) man page in xfsprogs should be updated as well to reflect the deprecated items.

man page probably should still be updated tho (unless I missed a patch...)

-Eric

#11 lore raw

[Bug 211605] Re-mount XFS causes "attr2 mount option is deprecated" warning

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=211605

--- Comment #7 from Eric Sandeen ([email protected]) ---

Quoted 3 lines · Eric Sandeen

Pavel, can you fix this up, since your patch did the deprecations? I guess we missed this on review.

Scratch that, Dave points out that they need to stay until they are removed.

Quoted 3 lines

Ideally the xfs(5) man page in xfsprogs should be updated as well to reflect the
deprecated items.

man page probably should still be updated tho (unless I missed a patch...)

-Eric

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#12 lore raw

[Bug 211605] Re-mount XFS causes "attr2 mount option is deprecated" warning

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=211605

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #8 from [email protected] ---
I have the same issue. I am using Arch Linux too.

Even if I do not use "defaults" for xfs in /etc/fstab I still find the attr2 mount option in /proc/mounts:

fstab:
UUID=xxx-xxx-xxx / xfs rw,noatime,inode64,logbufs=8,logbsize=32k,noquota 0 1

/proc/mounts:
/dev/nvme0n1p2 / xfs rw,noatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#13 lore raw

[Bug 211605] Re-mount XFS causes "attr2 mount option is deprecated" warning

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=211605

--- Comment #9 from Eric Sandeen ([email protected]) --- Having "attr2" in /proc/mounts is OK. We will have a fix to suppress the warning on remount.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#14 lore raw

[Bug 211605] Re-mount XFS causes "attr2 mount option is deprecated" warning

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=211605

Pavel Reichl ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #10 from Pavel Reichl ([email protected]) --- Hello,

upstream kernel now contains following commits:

92cf7d36384b9 xfs: Skip repetitive warnings about mount options 0f98b4ece18da xfs: rename variable mp to parsing_mp

This should fix the reported problem. Can we close the bug now?

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#15 lore raw

[Bug 211605] Re-mount XFS causes "attr2 mount option is deprecated" warning

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=211605

Eric Sandeen ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |CODE_FIX

--- Comment #11 from Eric Sandeen ([email protected]) --- Yep!

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#16 lore raw

[Bug 211605] Re-mount XFS causes "attr2 mount option is deprecated" warning

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=211605

victor03303 ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #12 from victor03303 ([email protected]) --- I have the same issue.

Kernel in use: 5.11.0-17-generic
O.S.: Lubuntu 21.04

fstab file:

UUID=xxxx-xxxx                            /boot/efi      vfat    umask=0077 0 2
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx swap           swap    defaults   0 0
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /              xfs     defaults   0 1
/swapfile                                 swap           swap    defaults   0 0

LABEL=Crucial2,5" /mnt/Crucial2,5" auto nosuid,nodev,nofail,x-gvfs-show 0 0

What's the current status of this bug?

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#17 lore raw

[Bug 211605] Re-mount XFS causes "attr2 mount option is deprecated" warning

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=211605

--- Comment #13 from Pavel Reichl ([email protected]) --- Hi Victor,

I'm not sure I follow - but as you can see the bug status is: 'RESOLVED CODE_FIX' and the fix is in upstream tag v5.13-rc1 .

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#18 lore raw

[Bug 211605] Re-mount XFS causes "attr2 mount option is deprecated" warning

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=211605

Sam James ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #14 from Sam James ([email protected]) --- See also
https://lore.kernel.org/linux-xfs/176107134023.4152072.12787167413342928659.stgit@frogsfrogsfrogs/.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.