mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
FROMGIT: scsi: sd: sd_zbc: Return early in sd_zbc_check_zoned_characteristics()
Return early in sd_zbc_check_zoned_characteristics() for host-aware
disks. This patch does not change any functionality but makes a later patch
easier to read.
Link: https://lore.kernel.org/r/20220421183023.3462291-6-bvanassche@acm.org
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
[ bvanassche: extracted this change from a larger patch ]
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Bug: 230616396
(cherry picked from commit 60caf37581 mkp-scsi/staging)
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Change-Id: Ib9b5e6cbcefdae3cfe1e677cb9e7e86c6f442b08
This commit is contained in:
committed by
Jaegeuk Kim
parent
368693d3e2
commit
2f6918f3a3
@@ -594,14 +594,15 @@ static int sd_zbc_check_zoned_characteristics(struct scsi_disk *sdkp,
|
||||
sdkp->zones_optimal_open = get_unaligned_be32(&buf[8]);
|
||||
sdkp->zones_optimal_nonseq = get_unaligned_be32(&buf[12]);
|
||||
sdkp->zones_max_open = 0;
|
||||
} else {
|
||||
/* Host-managed */
|
||||
sdkp->urswrz = buf[4] & 1;
|
||||
sdkp->zones_optimal_open = 0;
|
||||
sdkp->zones_optimal_nonseq = 0;
|
||||
sdkp->zones_max_open = get_unaligned_be32(&buf[16]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Host-managed */
|
||||
sdkp->urswrz = buf[4] & 1;
|
||||
sdkp->zones_optimal_open = 0;
|
||||
sdkp->zones_optimal_nonseq = 0;
|
||||
sdkp->zones_max_open = get_unaligned_be32(&buf[16]);
|
||||
|
||||
/*
|
||||
* Check for unconstrained reads: host-managed devices with
|
||||
* constrained reads (drives failing read after write pointer)
|
||||
|
||||
Reference in New Issue
Block a user