Re: LVM and XFS cannot set blocksize on block device

Eric Sandeen
2006-09-27T15:50:07Z

Shailendra Tripathi wrote:

> libxfs_device_open () seems to be working with the pre-conceived notion
> of assuming block devices of only 512 bytes in size.
>
> if (!readonly && setblksize && (statb.st_mode & S_IFMT) == S_IFBLK)
> platform_set_blocksize(fd, path, statb.st_rdev, 512);
>
> This eventually calls to set the blk sz to 512. Since, your volume does
> not support less than 4k, it returns EINVAL. I think, libxfs_init should
> be modified to take pass on the -s size option to this call so that it
> does not happen.
> However, I don't see any problem despite this failure. Everything
> else should work fine.
>

Yep, this looks to me like an oversight when the larger-sector-size
support was added. Seems like if the device can't be set to a smaller
sector size than X, then the tools should run as if a sector size of X
had been specified?

-Eric