All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs_mkfs: Do not discard if '-N' is provided
@ 2013-02-12 11:59 Lukas Czerner
  2013-02-12 15:11 ` Eric Sandeen
  0 siblings, 1 reply; 4+ messages in thread
From: Lukas Czerner @ 2013-02-12 11:59 UTC (permalink / raw)
  To: xfs; +Cc: Lukas Czerner

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.

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);
-- 
1.7.7.6

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs_mkfs: Do not discard if '-N' is provided
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2013-02-12 15:11 UTC (permalink / raw)
  To: Lukas Czerner; +Cc: xfs

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.

-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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs_mkfs: Do not discard if '-N' is provided
  2013-02-12 15:11 ` Eric Sandeen
@ 2013-02-12 15:37   ` Lukáš Czerner
  2013-02-14 19:19     ` Ben Myers
  0 siblings, 1 reply; 4+ messages in thread
From: Lukáš Czerner @ 2013-02-12 15:37 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Lukas Czerner, xfs

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs_mkfs: Do not discard if '-N' is provided
  2013-02-12 15:37   ` Lukáš Czerner
@ 2013-02-14 19:19     ` Ben Myers
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Myers @ 2013-02-14 19:19 UTC (permalink / raw)
  To: Lukáš Czerner, Christoph Hellwig; +Cc: Eric Sandeen, xfs

Hey Lukas,

On Tue, Feb 12, 2013 at 04:37:37PM +0100, Lukáš Czerner wrote:
> 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 ? :)

It changed just twice, AFAIK.

Christoph, could you clean up the kernel.org trees to help resolve the
confusion?

> Will resend the patch based on the
> 
> git://oss.sgi.com/xfs/cmds/xfsprogs.git

This is the right place, thanks.

Regards,
	Ben

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-14 19:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2013-02-14 19:19     ` Ben Myers

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.