* Kernel does not respect tune2fs -E mount_opts=foo
@ 2016-08-23 12:57 Marcos Mello
2016-08-23 15:48 ` tytso
0 siblings, 1 reply; 3+ messages in thread
From: Marcos Mello @ 2016-08-23 12:57 UTC (permalink / raw)
To: linux-ext4
e2fsprogs 1.43.1. Kernel 4.7.1 with
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
CONFIG_EXT4_USE_FOR_EXT2=y
Steps to reproduce the issue:
# mkfs.ext4 -q /dev/sda2
# tune2fs -E mount_opts="noatime" /dev/sda2
tune2fs 1.43.1 (08-Jun-2016)
Setting extended default mount options to 'noatime'
# tune2fs -l /dev/sda2 | grep -i 'mount options'
Default mount options: user_xattr acl
Mount options: noatime
# mount /dev/sda2 /mnt
# findmnt /mnt
TARGET SOURCE FSTYPE OPTIONS
/mnt /dev/sda2 ext4 rw,relatime,data=ordered
^^^^^^^^
# touch /mnt/aaa
# stat /mnt/aaa
File: '/mnt/aaa'
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 802h/2050d Inode: 12 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2016-08-23 08:14:10.056525341 -0300
Modify: 2016-08-23 08:14:10.056525341 -0300
Change: 2016-08-23 08:14:10.056525341 -0300
Birth: -
# cat /mnt/aaa
# stat /mnt/aaa
File: '/mnt/aaa'
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 802h/2050d Inode: 12 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2016-08-23 08:19:27.081474536 -0300
Modify: 2016-08-23 08:14:10.056525341 -0300
Change: 2016-08-23 08:14:10.056525341 -0300
Birth: -
Other options like noacl, nouser_xattr, are ignored too. This
filesystem is not listed in fstab.
Marcos
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Kernel does not respect tune2fs -E mount_opts=foo
2016-08-23 12:57 Kernel does not respect tune2fs -E mount_opts=foo Marcos Mello
@ 2016-08-23 15:48 ` tytso
2016-08-23 16:01 ` Marcos Mello
0 siblings, 1 reply; 3+ messages in thread
From: tytso @ 2016-08-23 15:48 UTC (permalink / raw)
To: Marcos Mello; +Cc: linux-ext4
The problem you are running into is not something we can fix,
unfortunately, or at least not in a full and general way. The problem
is that there are certain mount options which are parsed by the mount
command (in userspace) and then translated to a mount flag, which is
then passed to the mount command as a bitmask, and which is
interpreted by the VFS layer before calling the file system.
The mount options field in the superblock is parsed by the ext4 file
system along with options that were not parsed by the mount binary,
passed to the VFS, which then passed it to ext4 file system driver.
In theory, we could interpret relatime in ext4 and replicate its
effects. For relatime, this is trivial to do. There may be other
mount options which are interepted by the mount userspace program, and
implemented in the VFS, where this would be much less easy to do.
> Other options like noacl, nouser_xattr, are ignored too. This
> filesystem is not listed in fstab.
This is exactly the same issue.
Cheers,
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Kernel does not respect tune2fs -E mount_opts=foo
2016-08-23 15:48 ` tytso
@ 2016-08-23 16:01 ` Marcos Mello
0 siblings, 0 replies; 3+ messages in thread
From: Marcos Mello @ 2016-08-23 16:01 UTC (permalink / raw)
To: tytso; +Cc: linux-ext4
2016-08-23 12:48 GMT-03:00 <tytso@mit.edu>:
> The problem you are running into is not something we can fix,
> unfortunately, or at least not in a full and general way. The problem
> is that there are certain mount options which are parsed by the mount
> command (in userspace) and then translated to a mount flag, which is
> then passed to the mount command as a bitmask, and which is
> interpreted by the VFS layer before calling the file system.
>
> The mount options field in the superblock is parsed by the ext4 file
> system along with options that were not parsed by the mount binary,
> passed to the VFS, which then passed it to ext4 file system driver.
>
> In theory, we could interpret relatime in ext4 and replicate its
> effects. For relatime, this is trivial to do. There may be other
> mount options which are interepted by the mount userspace program, and
> implemented in the VFS, where this would be much less easy to do.
>
>> Other options like noacl, nouser_xattr, are ignored too. This
>> filesystem is not listed in fstab.
>
> This is exactly the same issue.
>
Thanks for the explanation. A hint about this limitation in tune2fs
man page would help.
Marcos
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-23 16:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-23 12:57 Kernel does not respect tune2fs -E mount_opts=foo Marcos Mello
2016-08-23 15:48 ` tytso
2016-08-23 16:01 ` Marcos Mello
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox