Re: [PATCH] blkdev_open/bd_claim vs BLKBSZSET
From: viro
Date: Mon Feb 23 2004 - 18:29:47 EST
On Tue, Feb 24, 2004 at 10:17:05AM +1100, Nathan Scott wrote:
> Hi there,
>
> I was modifying mkfs.xfs to use O_EXCL for 2.6, and hit a snag.
> It seems that once I've opened a block dev with O_EXCL I can no
> longer issue the BLKBSZSET ioctl to it. (Is that the expected
> behavior? If so, ignore...)
> And mkfs gets EBUSY back from the ioctl. Using the patch
> below, the ioctl succeeds cos the original filp bdev owner
> from open now matches with the owner in the ioctl call. I
> suspect that would be the correct behavior, but perhaps I'm
> overlooking some good reason for it being this way?
<shrug> it can be done that way, but I really wonder why the hell does
mkfs.xfs bother with BLKBSZSET in the first place?
FWIW, that ioctl is practically never the right thing to do these days.
I'm not saying that we shouldn't apply the patch - it looks sane - but
it looks like mkfs.xfs is doing something bogus.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/