public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Shailendra Tripathi <stripathi@agami.com>
To: Chris Wedgwood <cw@f00f.org>
Cc: Rene Salmon <rsalmon@tulane.edu>, xfs@oss.sgi.com
Subject: Re: LVM and XFS cannot set blocksize on block device
Date: Wed, 27 Sep 2006 17:25:09 +0530	[thread overview]
Message-ID: <451A669D.9020503@agami.com> (raw)
In-Reply-To: <20060926224053.GA31542@tuatara.stupidest.org>

>>Thanks for the reply. The "-s size=4096" helped I was able to create
>>the file system, then mount it and use it.  I did however get a
>>warning still about "cannot set blocksize on block device".

> 
> I don't know much about the LVM code, my guess is that
> ioctl(... ,BLKBSZSET, ...) is failing, strace would confirm this.


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.




>>Everything seems to be working but I am a bit worried about the
>>warning message.  Following is the message.  Any ideas if it is safe
>>to ignore this or any way to get rid of it?
> 
> 
> What does:
> 
>   blockdev --getbsz /dev/vg_u00/lv_u00
> 
> say?
> 
> 
> If mkfs.xfs is trying to set a blocksize that already matches the
> underlying device, it woudn't be hard to silence the warning by doing
> a check before unconditionally setting it, though I don't know that
> it's worth it.
> 
> 

  reply	other threads:[~2006-09-27 11:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-25 22:11 LVM and XFS cannot set blocksize on block device Rene Salmon
2006-09-26  0:17 ` Chris Wedgwood
2006-09-26 13:58   ` Rene Salmon
2006-09-26 22:40     ` Chris Wedgwood
2006-09-27 11:55       ` Shailendra Tripathi [this message]
2006-09-27 13:16         ` Rene Salmon
2006-09-28 10:33           ` Tim Shimmin
2006-09-27 15:48         ` Eric Sandeen
2006-09-28 10:23         ` Tim Shimmin
2006-09-28 15:32           ` Chris Wedgwood
2006-10-02  7:28             ` Timothy Shimmin
2006-10-03  7:35         ` Timothy Shimmin
2006-10-06 20:36           ` Rene Salmon
2006-10-11  9:59             ` Timothy Shimmin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=451A669D.9020503@agami.com \
    --to=stripathi@agami.com \
    --cc=cw@f00f.org \
    --cc=rsalmon@tulane.edu \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox