| To: | Lukas Czerner <lczerner@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] xfs_mkfs: Do not discard if '-N' is provided |
| From: | Eric Sandeen <sandeen@xxxxxxxxxxx> |
| Date: | Tue, 12 Feb 2013 09:11:38 -0600 |
| Cc: | xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1360670381-19838-1-git-send-email-lczerner@xxxxxxxxxx> |
| References: | <1360670381-19838-1-git-send-email-lczerner@xxxxxxxxxx> |
| User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 |
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@xxxxxxxxxx>
> ---
> 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);
>
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 1/2] xfs: limit speculative prealloc size on sparse files, Brian Foster |
|---|---|
| Next by Date: | Re: [PATCH] xfs_mkfs: Do not discard if '-N' is provided, Lukáš Czerner |
| Previous by Thread: | [PATCH] xfs_mkfs: Do not discard if '-N' is provided, Lukas Czerner |
| Next by Thread: | Re: [PATCH] xfs_mkfs: Do not discard if '-N' is provided, Lukáš Czerner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |