lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 29 Dec 2011 12:20:10 +0800
From:	Wu Fengguang <fengguang.wu@...el.com>
To:	Wanlong Gao <gaowanlong@...fujitsu.com>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: Bug in BLKBSZSET/GET ioctl ?

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.
You'll get consistent results if somehow keep it referenced, for
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ