linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Piotr Sarna <p.sarna@partner.samsung.com>
Cc: adilger.kernel@dilger.ca, linux-kernel@vger.kernel.org,
	linux-ext4@vger.kernel.org, b.zolnierkie@samsung.com,
	Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH 1/2] ext4: fix handling of nodelalloc parameter
Date: Sat, 3 Aug 2013 21:36:58 -0400	[thread overview]
Message-ID: <20130804013658.GD19781@thunk.org> (raw)
In-Reply-To: <1375445027-25024-1-git-send-email-p.sarna@partner.samsung.com>

On Fri, Aug 02, 2013 at 02:03:46PM +0200, Piotr Sarna wrote:
> Commit 26092bf ("ext4: use a table-driven handler for mount options")
> introduced buggy handling of nodelalloc parameter in mount command.
> 
> After explicitly using delalloc or nodelalloc parameter in mount command,
> MOPT_EXPLICIT flag is set. After that, a test ensures that "data=journal"
> and "delalloc" parameters are not simultaneously activated.
> Unluckily, the mentioned test reports a bug in both situations:
> - "data=journal,delalloc"
> - "data=journal,nodelalloc"
> whereas the second one is perfectly legal and acceptable.
> 
> A simple solution to this problem is in setting EXPLICIT_DELALLOC flag
> properly. This patch ensures that EXPLICIT_DELALLOC flag is set only
> if "delalloc" parameter was used, and not set in case of "nodelalloc".

Thanks for this bug report and patch.  There is an even simpler way of
fixing this doesn't involve adding an additional check in the code,
though.  Just make the following change the table entry:

     {Opt_nodelalloc, EXT4_MOUNT_DELALLOC,
-      MOPT_EXT4_ONLY | MOPT_CLEAR | MOPT_EXPLICIT},
+      MOPT_EXT4_ONLY | MOPT_CLEAR},

I'll send out a patch which does this...

					- Ted

      parent reply	other threads:[~2013-08-04  1:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-02 12:03 [PATCH 1/2] ext4: fix handling of nodelalloc parameter Piotr Sarna
2013-08-02 12:03 ` [PATCH 2/2] ext4: improve mount/remount error handling Piotr Sarna
2013-08-09  3:03   ` Theodore Ts'o
2013-08-04  1:36 ` Theodore Ts'o [this message]

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=20130804013658.GD19781@thunk.org \
    --to=tytso@mit.edu \
    --cc=adilger.kernel@dilger.ca \
    --cc=b.zolnierkie@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.sarna@partner.samsung.com \
    /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).