All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: linux-ext4@vger.kernel.org
Cc: "Theodore Ts'o" <tytso@mit.edu>
Subject: nolazytime remount
Date: Wed, 19 Aug 2015 10:21:44 +0200	[thread overview]
Message-ID: <20150819082144.GB1689@ws.net.home> (raw)


We had issue with "lazytime" remount two mouths ago. This is already
fixed by Ted's patch a2fd66d06. So, now you can enable lazytime by
remount with MS_LAZYTIME flag, but how I can disable lazytime?

enable lazytime (works as expected):

 # findmnt /mnt/test
 TARGET    SOURCE    FSTYPE OPTIONS
 /mnt/test /dev/sdc1 ext4   rw,relatime,stripe=32,data=ordered

 # mount -o remount,lazytime /mnt/test

 # findmnt /mnt/test
 TARGET    SOURCE    FSTYPE OPTIONS
 /mnt/test /dev/sdc1 ext4   rw,relatime,lazytime,stripe=32,data=ordered


disable lazytime by "nolazytime":

 # mount -o remount,nolazytime /mnt/test
 # findmnt /mnt/test
 TARGET    SOURCE    FSTYPE OPTIONS
 /mnt/test /dev/sdc1 ext4   rw,relatime,lazytime,stripe=32,data=ordered
                                        ^^^^^^^^

In this case mount(8) command generates:
  mount("/dev/sdc1", "/mnt/test", 0x562ed2f7e210, MS_REMOUNT|MS_RELATIME, "stripe=32,data=ordered") = 0
syscall.


It seems that ext4_remount() allows to enable the option by MS_LAZYTIME,
but there is no sb->s_flags &= ~MS_LAZYTIME at all. It seems like a
regression, because old string based solution (handle_mount_opt()) contains:

  case Opt_nolazytime:
       sb->s_flags &= ~MS_LAZYTIME;
       return 1;


>From my point of view, a2fd66d06 commit is insufficient, for ext4_remount()
we also need "else" for MS_LAZYTIME:

	if (*flags & MS_LAZYTIME)
		sb->s_flags |= MS_LAZYTIME;
    else
        sb->s_flags &= ~MS_LAZYTIME;


The another possibility is that "lazytime" is possible enable only --
if yes, then handle_mount_opt() should be fixed to not provide
Opt_nolazytime.

Ted?

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

             reply	other threads:[~2015-08-19  8:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19  8:21 Karel Zak [this message]
2015-08-19 14:15 ` nolazytime remount tytso
2015-08-24  9:29   ` Karel Zak

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=20150819082144.GB1689@ws.net.home \
    --to=kzak@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.