xfs
[Top] [All Lists]

[PATCH] xfsprogs: Don't ever try to set the device blocksize in repair

To: xfs-oss <xfs@xxxxxxxxxxx>
Subject: [PATCH] xfsprogs: Don't ever try to set the device blocksize in repair
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Mon, 21 Feb 2011 13:06:57 -0600
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
On 4k devices, we get this warning from repair:

# xfs_repair /dev/sdc2
xfs_repair: warning - cannot set blocksize 512 on block device /dev/sdc2: 
Invalid argument
Phase 1 - find and verify superblock...
...

but things proceed without trouble after that.

I'm unable to find any history or reason for setting the
device blocksize at the beginning of repair, and in any case,
things clearly work without doing so.  So, let's just remove it.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

diff --git a/repair/init.c b/repair/init.c
index 654c406..bc10cc4 100644
--- a/repair/init.c
+++ b/repair/init.c
@@ -143,7 +143,7 @@ xfs_init(libxfs_init_t *args)
        }
 
        args->usebuflock = do_prefetch;
-       args->setblksize = !dangerously;
+       args->setblksize = 0;
        args->isdirect = LIBXFS_DIRECT;
        if (no_modify)
                args->isreadonly = (LIBXFS_ISREADONLY | LIBXFS_ISINACTIVE);

<Prev in Thread] Current Thread [Next in Thread>