Your message dated Fri, 15 Jul 2016 16:17:21 -0400
with message-id <[email protected]>
and subject line Re: Bug#831423: e2fsprogs: tune2fs -l modifies file system
has caused the Debian Bug report #831423,
regarding e2fsprogs: tune2fs -l modifies file system
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
831423: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=831423
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: e2fsprogs
Version: 1.43.1-1
Severity: normal
The 'tune2fs -l' command modifies the file system. The man page says:
-l List the contents of the filesystem superblock, including the
current values of the parameters that can be set via this program.
To recreate the problem:
# stat --format=%y /
2016-07-15 07:23:18.767919229 -0600
# tune2fs -l /dev/mapper/v1-root > /dev/null
# stat --format=%y /
2016-07-15 13:56:20.703068156 -0600
Interestingly:
# chattr +i /
# lsattr -d /
----i-------------- /
# stat --format=%y /
2016-07-15 13:56:20.703068156 -0600
# tune2fs -l /dev/mapper/v1-root > /dev/null
# stat --format=%y /
2016-07-15 13:56:20.703068156 -0600
But no errors were produced. So even though it is modifying the file
system it isn't checking error codes.
Thank you for maintaining these utilities in Debian.
Bob
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages e2fsprogs depends on:
ii e2fslibs 1.43.1-1
ii libblkid1 2.28-5
ii libc6 2.23-1
ii libcomerr2 1.43.1-1
ii libss2 1.43.1-1
ii libuuid1 2.28-5
ii util-linux 2.28-5
e2fsprogs recommends no packages.
Versions of packages e2fsprogs suggests:
pn e2fsck-static <none>
pn fuse2fs <none>
ii gpart 1:0.3-3
ii parted 3.2-15
-- no debconf information
--- End Message ---
--- Begin Message ---
tags 831423 +unreproducible
thanks
On Fri, Jul 15, 2016 at 02:00:42PM -0600, Bob Proulx wrote:
> Package: e2fsprogs
> Version: 1.43.1-1
> Severity: normal
>
> The 'tune2fs -l' command modifies the file system.
Your test is invalid. stat --format=%y / checks the modtime of the
root directory. Let's try this on an umounted file system, shall we?
# mke2fs -Fq -t ext4 /tmp/foo.img 100k
Filesystem too small for a journal
# md5sum /tmp/foo.img
935ede824a1e5281dda45acdd9ce87ee /tmp/foo.img
# stat /tmp/foo.img
File: '/tmp/foo.img'
Size: 102400 Blocks: 56 IO Block: 4096 regular file
Device: 21h/33d Inode: 7779798 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Context: unconfined_u:object_r:user_tmp_t:s0
Access: 2016-07-15 16:11:16.964096619 -0400
Modify: 2016-07-15 16:11:06.044206092 -0400
Change: 2016-07-15 16:11:06.044206092 -0400
Birth: -
# tune2fs -l /tmp/foo.img > /dev/null
# md5sum /tmp/foo.img
935ede824a1e5281dda45acdd9ce87ee /tmp/foo.img
# stat /tmp/foo.img
File: '/tmp/foo.img'
Size: 102400 Blocks: 56 IO Block: 4096 regular file
Device: 21h/33d Inode: 7779798 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Context: unconfined_u:object_r:user_tmp_t:s0
Access: 2016-07-15 16:11:31.563950277 -0400
Modify: 2016-07-15 16:11:06.044206092 -0400
Change: 2016-07-15 16:11:06.044206092 -0400
Birth: -
You can see here that the /tmp/foo.img file isn't being modified at
all.
The root file system is mounted, and any number of things other than
tune2fs could be modifying the file system --- some other program, the
shell running the tune2fs program, etc.
- Ted
P.S If you use strace you will see that the file system is opened
O_RDONLY. So it's not *possible* for tune2fs -l to modify the file
system whose file system state is being displayed:
open("/tmp/foo.img", O_RDONLY) = 3
--- End Message ---