]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
blockdev: Remove the --setbsz (set blocksize) option which has never worked.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 8 Oct 2013 08:54:10 +0000 (09:54 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 8 Oct 2013 13:48:00 +0000 (15:48 +0200)
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>
bash-completion/blockdev
disk-utils/blockdev.8
disk-utils/blockdev.c

index ce986cb45fc0f50eca053c3258417237eaabb6c4..5889955626e2da0f7f3d323f99b63c201294d0ac 100644 (file)
@@ -19,7 +19,6 @@ _blockdev_module()
                --getalignoff
                --getmaxsect
                --getbsz
-               --setbsz
                --getsize64
                --setra
                --getra
@@ -29,11 +28,7 @@ _blockdev_module()
                --rereadpt
                $DEVS"
        case $prev in
-               '--setbsz')
-                       COMPREPLY=( $(compgen -W "bytes" -- $cur) )
-                       return 0
-                       ;;
-               '--setbsz'|'--setfra')
+               '--setfra')
                        COMPREPLY=( $(compgen -W "sectors" -- $cur) )
                        return 0
                        ;;
index 2b3d64c88f3d5e0d876ea4b1273175e478c36042..6ab43249f167a4cf817ca7274021c5815262a4fc 100644 (file)
@@ -67,8 +67,6 @@ Print sectorsize in bytes - usually 512.
 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"
index 4543818bd4f90dedcc9a4e6c19e7865afc1d7741..dc02d48c0f7057070d1c07db7a7de06d49495f8b 100644 (file)
@@ -121,13 +121,6 @@ static const struct bdc bdcms[] =
                .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",