diff options
author | Stanislav Brabec | 2017-09-26 16:14:51 +0200 |
---|---|---|
committer | Karel Zak | 2017-09-27 14:30:02 +0200 |
commit | a1a41597bfd55e709024bd91aaf024159362679c (patch) | |
tree | ee740d8df1db5485c5886ff3f753927707752f1a /sys-utils/losetup.8 | |
parent | docs: add exec() exit codes to TODO (diff) | |
download | kernel-qcow2-util-linux-a1a41597bfd55e709024bd91aaf024159362679c.tar.gz kernel-qcow2-util-linux-a1a41597bfd55e709024bd91aaf024159362679c.tar.xz kernel-qcow2-util-linux-a1a41597bfd55e709024bd91aaf024159362679c.zip |
losetup: Add support for logical block size
Kernel since 4.14 supports setting of logical block size[1]. It allows to
create loop devices that report logical block size different from 512.
Add support for this feature to losetup.
References:
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/block/loop.c?id=89e4fdecb51cf5535867026274bc97de9480ade5
[kzak@redhat.com: - fix loopcxt_get_blocksize()
- remove lo_blocksize from loop_info64]
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Omar Sandoval <osandov@fb.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/losetup.8')
-rw-r--r-- | sys-utils/losetup.8 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys-utils/losetup.8 b/sys-utils/losetup.8 index 98a8e70d6..570704d72 100644 --- a/sys-utils/losetup.8 +++ b/sys-utils/losetup.8 @@ -116,6 +116,9 @@ The data start is moved \fIoffset\fP bytes into the specified file or device. .IP "\fB\-\-sizelimit \fIsize\fP" The data end is set to no more than \fIsize\fP bytes after the data start. .TP +.BR \-b , " \-\-logical-blocksize " \fIsize +Set the logical block size of the loop device in bytes (since Linux 4.14). +.TP .BR \-c , " \-\-set\-capacity " \fIloopdev Force the loop driver to reread the size of the file associated with the specified loop device. |