* [PATCH] xfsprogs: Don't ever try to set the device blocksize in repair
@ 2011-02-21 19:06 Eric Sandeen
2011-02-22 20:04 ` Alex Elder
0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2011-02-21 19:06 UTC (permalink / raw)
To: xfs-oss
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>
---
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);
_______________________________________________
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] xfsprogs: Don't ever try to set the device blocksize in repair
2011-02-21 19:06 [PATCH] xfsprogs: Don't ever try to set the device blocksize in repair Eric Sandeen
@ 2011-02-22 20:04 ` Alex Elder
0 siblings, 0 replies; 2+ messages in thread
From: Alex Elder @ 2011-02-22 20:04 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs-oss
On Mon, 2011-02-21 at 13:06 -0600, Eric Sandeen wrote:
> 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>
> ---
On Linux anyway, the way it's used here is pretty
pointless anyway. It passes either 0 or 1, which
means either don't set it (if "living dangerously")
or do set it, to the minimum XFS sector size, 512
bytes. Hence it'll screw up on > 512-byte sector
devices.
If there was a reason for setting it, it should
do so by setting it to the device's logical block
size rather than assuming 512.
But I don't see a reason to set it either, so the
change looks good to me.
Reviewed-by: Alex Elder <aelder@sgi.com>
_______________________________________________
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:[~2011-02-22 20:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-21 19:06 [PATCH] xfsprogs: Don't ever try to set the device blocksize in repair Eric Sandeen
2011-02-22 20:04 ` Alex Elder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox