From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: Wu Fengguang <fengguang.wu@intel.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Bug in BLKBSZSET/GET ioctl ?
Date: Thu, 29 Dec 2011 12:28:44 +0800 [thread overview]
Message-ID: <4EFBEC7C.4060902@cn.fujitsu.com> (raw)
In-Reply-To: <20111229042010.GA22132@localhost>
On 12/29/2011 12:20 PM, Wu Fengguang wrote:
> On Thu, Dec 29, 2011 at 11:51:45AM +0800, Wanlong Gao wrote:
>> Hi all:
>>
>> This is first reported to *libguestfs*: https://bugzilla.redhat.com/show_bug.cgi?id=624335
>>
>> Then, I looked into upstream util-linux and it seems nothing wrong. I'm not convinced that it's a kernel bug.
>>
>> produce:
>>
>> ---
>> # ./util-linux/disk-utils/blockdev --getbsz /dev/sda6
>> 4096
>> # ./util-linux/disk-utils/blockdev --setbsz 2048 /dev/sda6
>> # ./util-linux/disk-utils/blockdev --getbsz /dev/sda6
>> 4096
>> # ./util-linux/disk-utils/blockdev --setbsz 512 /dev/sda6
>> # ./util-linux/disk-utils/blockdev --getbsz /dev/sda6
>> 4096
>
> I think each blockdev invocation is working on a *new* bdev object.
But the address of *new* bdev is the same?
I did printk, and they all returned the same address.
> You'll get consistent results if somehow keep it referenced, for
But isn't it a bug? It seems that the setbsz has no effect?
Thanks,
-Wanlong
> example, run a background copy task:
>
> # cp /dev/sda6 /dev/null &
>
> # ./util-linux/disk-utils/blockdev --getbsz /dev/sda6
> # ./util-linux/disk-utils/blockdev --setbsz 512 /dev/sda6
> # ./util-linux/disk-utils/blockdev --getbsz /dev/sda6
>
> Thanks,
> Fengguang
>
next prev parent reply other threads:[~2011-12-29 4:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-29 3:51 Bug in BLKBSZSET/GET ioctl ? Wanlong Gao
2011-12-29 3:56 ` Wanlong Gao
2011-12-29 8:19 ` Richard W.M. Jones
2011-12-29 4:20 ` Wu Fengguang
2011-12-29 4:28 ` Wanlong Gao [this message]
2011-12-29 4:40 ` Wu Fengguang
2011-12-29 6:09 ` Wanlong Gao
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=4EFBEC7C.4060902@cn.fujitsu.com \
--to=gaowanlong@cn.fujitsu.com \
--cc=fengguang.wu@intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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