From a1a41597bfd55e709024bd91aaf024159362679c Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Tue, 26 Sep 2017 16:14:51 +0200 Subject: 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 Cc: Ming Lei Cc: Hannes Reinecke Cc: Omar Sandoval Cc: Jens Axboe Signed-off-by: Karel Zak --- sys-utils/losetup.8 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sys-utils/losetup.8') 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. -- cgit v1.2.3-55-g7522