linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: "Holger Hoffstätte" <holger.hoffstaette@googlemail.com>
Cc: linux-ext4@vger.kernel.org, "Theodore Ts'o" <tytso@mit.edu>
Subject: Re: Lazytime undone by/not working with remount?
Date: Mon, 18 May 2015 10:21:35 +0200	[thread overview]
Message-ID: <20150518082135.GK4834@ws.net.home> (raw)
In-Reply-To: <55575399.6010801@googlemail.com>

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@redhat.com>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-05-18  8:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-16 11:05 Lazytime undone by/not working with remount? Holger Hoffstätte
2015-05-16 14:26 ` Holger Hoffstätte
     [not found] ` <55575399.6010801@googlemail.com>
2015-05-18  8:21   ` Karel Zak [this message]
2015-05-18 15:18     ` Eric Sandeen
2015-05-18 15:36       ` Holger Hoffstätte
2015-05-18 15:23     ` Theodore Ts'o
2015-05-18 15:38       ` Holger Hoffstätte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150518082135.GK4834@ws.net.home \
    --to=kzak@redhat.com \
    --cc=holger.hoffstaette@googlemail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).