Re: Bug in BLKBSZSET/GET ioctl ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/29/2011 12:40 PM, Wu Fengguang wrote:

> On Thu, Dec 29, 2011 at 12:28:44PM +0800, Wanlong Gao wrote:
>> 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.
> 
> Then the block size value should be reset in one of the bd_set_size()
> calls in __blkdev_get().


Is the behaviour right that setting bd_block_size to the logical_block_size
every time when __blkdev_get()?

> 
>>> 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?
> 
> Yeah, it does look like unexpected behavior to the end user..


And at least, the ioctl BLKBZSET seems useless.

Thanks
-Wanlong 

> 
> Thanks,
> Fengguang
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux