mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 15:43:08 -04:00
s390/dasd: Report ESE capability and format mode at device online
Extend the device information line logged when a volume comes online with the ESE hardware capability and the on-disk format mode. The format mode (full or on demand) is derived from the on-disk format label alone, so a volume that is not backed by ESE hardware but was still formatted on demand is reported correctly. Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Stefan Haberland <sth@linux.ibm.com> Link: https://patch.msgid.link/20260805111612.1285190-18-sth@linux.ibm.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
268e40548d
commit
6c1be943fd
@@ -2522,6 +2522,7 @@ static int dasd_eckd_end_analysis(struct dasd_block *block)
|
||||
struct dasd_device *device = block->base;
|
||||
struct dasd_eckd_private *private = device->private;
|
||||
struct eckd_count *count_area;
|
||||
const char *ese_str, *fmt_str;
|
||||
unsigned int sb, blk_per_trk;
|
||||
int status, i;
|
||||
struct dasd_ccw_req *init_cqr;
|
||||
@@ -2608,15 +2609,29 @@ static int dasd_eckd_end_analysis(struct dasd_block *block)
|
||||
private->rdc_data.trk_per_cyl *
|
||||
blk_per_trk);
|
||||
|
||||
/*
|
||||
* Report the ESE hardware capability and the format mode. The mode
|
||||
* comes from dasd_eckd_on_demand_format() (the on-disk label, or the
|
||||
* ESE state when no label is present), matching the on_demand_formatting
|
||||
* sysfs attribute.
|
||||
*/
|
||||
ese_str = dasd_eckd_ese_capable(device) ? ", ESE" : "";
|
||||
fmt_str = "";
|
||||
if (dasd_eckd_on_demand_format(device))
|
||||
fmt_str = ", on-demand format";
|
||||
else if (dasd_eckd_ese_capable(device))
|
||||
fmt_str = ", full format";
|
||||
|
||||
dev_info(&device->cdev->dev,
|
||||
"DASD with %u KB/block, %lu KB total size, %u KB/track, "
|
||||
"%s\n", (block->bp_block >> 10),
|
||||
"DASD with %u KB/block, %lu KB total size, %u KB/track, %s%s%s\n",
|
||||
(block->bp_block >> 10),
|
||||
(((unsigned long) private->real_cyl *
|
||||
private->rdc_data.trk_per_cyl *
|
||||
blk_per_trk * (block->bp_block >> 9)) >> 1),
|
||||
((blk_per_trk * block->bp_block) >> 10),
|
||||
private->uses_cdl ?
|
||||
"compatible disk layout" : "linux disk layout");
|
||||
"compatible disk layout" : "linux disk layout",
|
||||
ese_str, fmt_str);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user