Re: Lazytime undone by/not working with remount?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 16, 2015 at 04:26:33PM +0200, Holger Hoffstätte wrote:
> > playing with lazytime on 4.0.4-rc1 + yesterday's fencepost patch) I noticed
> > something odd. Mounting secondary (non-root) partitions with lazytime works
> > fine, but / does not seem to retain the value from fstab - apparently because
> > it is remounted rw during boot, and lazytime gets swallowed/undone.
> > 
> > Same effect when trying to remount manually with lazytime:
> > 
> > tux>findmnt /
> > TARGET SOURCE    FSTYPE OPTIONS
> > /      /dev/sda1 ext4   rw,noatime
> > 
> > tux>mount -o lazytime,remount / 
> > 
> > tux>dmesg 
> > [ 5208.482505] EXT4-fs (sda1): re-mounted. Opts: (null)
> > 
> > tux>findmnt /                  
> > TARGET SOURCE    FSTYPE OPTIONS
> > /      /dev/sda1 ext4   rw,noatime
> > 
> > tux>mount --version
> > mount from util-linux 2.26.2 (libmount 2.26.0: assert, debug)
> > 
> > Newly mounting unmounted partitions works fine.
> > 
> > Any ideas?
> 
> This turned out to be a regression in util-linux 2.26.x. :-(

 I don't think so. Try strace, for example:

 # strace -e mount mount -o lazytime,remount /home/archive
 mount("/dev/sdb1", "/home/archive", 0xcf1210, MS_REMOUNT|0x2000000, NULL) = 0
                                                          ^^^^^^^^^
                           (1<<25) aka 0x2000000 is MS_LAZYTIME


 The util-linux since version 2.26.2 supports MS_LAZYTIME flag. 
 
 I see the problem on another place. The ext4 fs driver has unique
 feature that it's able to accept "lazytime" option as string
 (util-linux < 2.26.2) as well as MS_LAZYTIME vfs flag (>= 2.26.2).

 IMHO the function ext4_remount() does not check VFS *flags for
 MS_LAZYTIME at all. The code probably cares about sb->s_flags only
 (these flags are generated by parse_options() when parse options
 string). It seems that only MS_RDONLY is expected in *flags. 

 Ted?

    Karel


-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux