]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_repair: Don't ever try to set the device blocksize
authorEric Sandeen <sandeen@sandeen.net>
Wed, 23 Feb 2011 16:28:55 +0000 (10:28 -0600)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 23 Feb 2011 16:28:55 +0000 (10:28 -0600)
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@redhat.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
repair/init.c

index 654c406f09ec5bc7f479acd8685f0d83c61b1722..bc10cc483efe3b0bd5ff75e5922bd3846aae72e1 100644 (file)
@@ -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);