* [PATCH v2] xfs_mkfs: Do not discard if '-N' is provided
@ 2013-02-12 15:44 Lukas Czerner
2013-02-14 22:07 ` Ben Myers
0 siblings, 1 reply; 2+ messages in thread
From: Lukas Czerner @ 2013-02-12 15:44 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>
---
v2: Rebase to the up-to-date repository
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 3cfab06..c84448e 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -1950,7 +1950,7 @@ _("block size %d cannot be smaller than logical sector size %d\n"),
}
}
- 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] 2+ messages in thread
* Re: [PATCH v2] xfs_mkfs: Do not discard if '-N' is provided
2013-02-12 15:44 [PATCH v2] xfs_mkfs: Do not discard if '-N' is provided Lukas Czerner
@ 2013-02-14 22:07 ` Ben Myers
0 siblings, 0 replies; 2+ messages in thread
From: Ben Myers @ 2013-02-14 22:07 UTC (permalink / raw)
To: Lukas Czerner; +Cc: xfs
On Tue, Feb 12, 2013 at 04:44:30PM +0100, 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.
>
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Wow. That's bad.
Reviewed-by: Ben Myers <bpm@sgi.com>
Applied. Thanks Lukas!
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-14 22:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-12 15:44 [PATCH v2] xfs_mkfs: Do not discard if '-N' is provided Lukas Czerner
2013-02-14 22:07 ` 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.