This option has never worked. If you try setting the block size on a
block device, and then read it using --getbsz, you will see that the
block size never changes.
The reason for this is because the block size is specific to the
current file descriptor opening the block device, so the change of
block size only persists for as long as blockdev has the device open,
and is lost once blockdev exits.
Also the block size is not really used anywhere. Filesystems, for
example, have their own idea of block size and ignore this setting
completely.
(Thanks Masayoshi Mizuma for diagnosing the problem)
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
--getalignoff
--getmaxsect
--getbsz
- --setbsz
--getsize64
--setra
--getra
--rereadpt
$DEVS"
case $prev in
- '--setbsz')
- COMPREPLY=( $(compgen -W "bytes" -- $cur) )
- return 0
- ;;
- '--setbsz'|'--setfra')
+ '--setfra')
COMPREPLY=( $(compgen -W "sectors" -- $cur) )
return 0
;;
Get size in 512-byte sectors.
.IP "\fB\-\-rereadpt\fP"
Reread partition table
-.IP "\fB\-\-setbsz\fP \fIbytes\fP"
-Set blocksize.
.IP "\fB\-\-setfra\fP \fIsectors\fP"
Set filesystem readahead (same like --setra on 2.6 kernels).
.IP "\fB\-\-setra\fP \fIsectors\fP"
.argtype = ARG_INT,
.argval = -1,
.help = N_("get blocksize")
- },{
- IOCTL_ENTRY(BLKBSZSET),
- .name = "--setbsz",
- .argname = "<bytes>",
- .argtype = ARG_INT,
- .flags = FL_NORESULT,
- .help = N_("set blocksize")
},{
IOCTL_ENTRY(BLKGETSIZE),
.name = "--getsize",