From: "Lukáš Czerner" <lczerner@redhat.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Lukas Czerner <lczerner@redhat.com>, xfs@oss.sgi.com
Subject: Re: [PATCH] xfs_mkfs: Do not discard if '-N' is provided
Date: Tue, 12 Feb 2013 16:37:37 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.2.00.1302121635070.2315@(none)> (raw)
In-Reply-To: <511A5BAA.5000203@sandeen.net>
On Tue, 12 Feb 2013, Eric Sandeen wrote:
> Date: Tue, 12 Feb 2013 09:11:38 -0600
> From: Eric Sandeen <sandeen@sandeen.net>
> To: Lukas Czerner <lczerner@redhat.com>
> Cc: xfs@oss.sgi.com
> Subject: Re: [PATCH] xfs_mkfs: Do not discard if '-N' is provided
>
> On 2/12/13 5:59 AM, Lukas Czerner wrote:
> > When '-N' is specified we really should not write anything to the
> > device, neither we should attempt to discard the device.
> >
> > This commit fixes xfs_mkfs to not attempt to discard the device in the
> > case user specified '-N' flag.
>
> Thanks, and yes - ouch, this shouldn't happen with -N, that's bad!
>
> But it doesn't look like this is against the current git tree,
> it applies only with a lot of fuzz & offsets.
Ah, I've been using
git://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git
and I can remember that it's not the first time I've realized that I
am using wrong repo. Obviously i am not paying a lot of attention to
the xfs channel, but does this keep changing, or is it just me ? :)
Will resend the patch based on the
git://oss.sgi.com/xfs/cmds/xfsprogs.git
thanks Eric!
-Lukas
>
> -Eric
>
> > Signed-off-by: Lukas Czerner <lczerner@redhat.com>
> > ---
> > mkfs/xfs_mkfs.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> > index a889620..95e27e0 100644
> > --- a/mkfs/xfs_mkfs.c
> > +++ b/mkfs/xfs_mkfs.c
> > @@ -2010,7 +2010,7 @@ _("block size %d cannot be smaller than logical sector size %d\n"),
> > exit(1);
> > }
> >
> > - if (discard) {
> > + if (discard && !Nflag) {
> > discard_blocks(xi.ddev, xi.dsize);
> > if (xi.rtdev)
> > discard_blocks(xi.rtdev, xi.rtsize);
> >
>
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-02-12 15:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-12 11:59 [PATCH] xfs_mkfs: Do not discard if '-N' is provided Lukas Czerner
2013-02-12 15:11 ` Eric Sandeen
2013-02-12 15:37 ` Lukáš Czerner [this message]
2013-02-14 19:19 ` Ben Myers
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='alpine.LFD.2.00.1302121635070.2315@(none)' \
--to=lczerner@redhat.com \
--cc=sandeen@sandeen.net \
--cc=xfs@oss.sgi.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