.sp
.in +5
.B losetup
-.I loopdev
+[\fIloopdev\fP]
.sp
.B losetup -l
.RB [ \-a ]
.B "losetup \-D"
.sp
.in -5
-Print the name of the first unused loop device:
-.sp
-.in +5
-.B "losetup \-f"
-.sp
-.in -5
Set up a loop device:
.sp
.in +5
.IR offset ]
.RB [ \-\-sizelimit
.IR size ]
+.RB [ \-\-sector\-size
+.IR size ]
.in +8
.RB [ \-Pr ]
.RB [ \-\-show ] " \-f" | \fIloopdev\fP
.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).
+.BR \-b , " \-\-sector-size " \fIsize
+Set the logical sector size of the loop device in bytes (since Linux 4.14). The
+option may be used when create a new loop device as well as stand-alone command
+to modify sector size of the already existing loop device.
.TP
.BR \-c , " \-\-set\-capacity " \fIloopdev
Force the loop driver to reread the size of the file associated with the
COL_RO,
COL_SIZELIMIT,
COL_DIO,
- COL_BLOCKSIZE,
+ COL_LOGSEC,
};
/* basic output flags */
[COL_SIZELIMIT] = { "SIZELIMIT", 5, SCOLS_FL_RIGHT, N_("size limit of the file in bytes")},
[COL_MAJMIN] = { "MAJ:MIN", 3, 0, N_("loop device major:minor number")},
[COL_DIO] = { "DIO", 1, SCOLS_FL_RIGHT, N_("access backing file with direct-io")},
- [COL_BLOCKSIZE] = { "BLOCKSIZE", 4, SCOLS_FL_RIGHT, N_("logical block size in bytes")},
+ [COL_LOGSEC] = { "LOG-SEC", 4, SCOLS_FL_RIGHT, N_("logical sector size in bytes")},
};
static int columns[ARRAY_SIZE(infos) * 2] = {-1};
case COL_PARTSCAN:
p = loopcxt_is_partscan(lc) ? "1" : "0";
break;
- case COL_BLOCKSIZE:
+ case COL_LOGSEC:
if (loopcxt_get_blocksize(lc, &x) == 0)
xasprintf(&np, "%jd", x);
break;
fputs(USAGE_SEPARATOR, out);
fputs(_(" -o, --offset <num> start at offset <num> into file\n"), out);
fputs(_(" --sizelimit <num> device is limited to <num> bytes of the file\n"), out);
- fputs(_(" -b --logical-blocksize <num> set the logical block size to <num>\n"), out);
+ fputs(_(" -b --sector-size <num> set the logical sector size to <num>\n"), out);
fputs(_(" -P, --partscan create a partitioned loop device\n"), out);
fputs(_(" -r, --read-only set up a read-only loop device\n"), out);
fputs(_(" --direct-io[=<on|off>] open backing file with O_DIRECT\n"), out);
{ "associated", required_argument, NULL, 'j' },
{ "json", no_argument, NULL, 'J' },
{ "list", no_argument, NULL, 'l' },
- { "logical-blocksize", required_argument, NULL, 'b' },
+ { "sector-size", required_argument, NULL, 'b' },
{ "noheadings", no_argument, NULL, 'n' },
{ "offset", required_argument, NULL, 'o' },
{ "output", required_argument, NULL, 'O' },
columns[ncolumns++] = COL_RO;
columns[ncolumns++] = COL_BACK_FILE;
columns[ncolumns++] = COL_DIO;
- columns[ncolumns++] = COL_BLOCKSIZE;
+ columns[ncolumns++] = COL_LOGSEC;
}
if (act == A_FIND_FREE && optind < argc) {