public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] scsi: sd: Fix physical block size issues of host-managed zoned disks
@ 2023-03-03  1:44 Shin'ichiro Kawasaki
  2023-03-03  1:44 ` [PATCH 1/2] scsi: sd: Check physical sector alignment of sequential zone writes Shin'ichiro Kawasaki
  2023-03-03  1:44 ` [PATCH 2/2] scsi: sd: Fix wrong zone_write_granularity value at revalidate Shin'ichiro Kawasaki
  0 siblings, 2 replies; 11+ messages in thread
From: Shin'ichiro Kawasaki @ 2023-03-03  1:44 UTC (permalink / raw)
  To: linux-scsi, Martin K . Petersen
  Cc: Damien Le Moal, Johannes Thumshirn, Shin'ichiro Kawasaki

In general, writes to SCSI disks are required to align to the logical block
size. On the other hand, ZBC and ZAC specifications require that the writes to
sequential write required zones to align to the physical block size. When
ZBC/ZAC host-managed zoned disks have the physical block size different from the
logical block size, writes aligned to the logical block size fail. The sysfs
attribute zone_write_granularity was introduced so that userland programs can
tell what is the alignment size for sequential write required zones. As for
ZBC/ZAC host-managed zoned disks, zone_write_granularity shows the physical
block size.

However, there are two issues related to this requirement of the physical block
size alignment. The first issue is unclear failure report. On the write fail,
the disks return the unaligned write command error, which may happen for other
causes other than the physical block size alignment. The second issue is wrong
value of zone_write_granularity sysfs attribute. In most cases, it shows
correct values. But during revalidate of the disks, it shows wrong values. The
two patches in this series address the two issues.

Shin'ichiro Kawasaki (2):
  scsi: sd: Check physical sector alignment of sequential zone writes
  scsi: sd: Fix wrong zone_write_granularity value at revalidate

 drivers/scsi/sd.c     | 17 ++++++++++++++++-
 drivers/scsi/sd_zbc.c |  8 --------
 2 files changed, 16 insertions(+), 9 deletions(-)

-- 
2.38.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-03-06  8:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-03  1:44 [PATCH 0/2] scsi: sd: Fix physical block size issues of host-managed zoned disks Shin'ichiro Kawasaki
2023-03-03  1:44 ` [PATCH 1/2] scsi: sd: Check physical sector alignment of sequential zone writes Shin'ichiro Kawasaki
2023-03-03  5:34   ` kernel test robot
2023-03-03  6:44   ` Damien Le Moal
2023-03-03  8:57     ` Johannes Thumshirn
2023-03-03 18:03   ` Bart Van Assche
2023-03-04  3:03     ` Damien Le Moal
2023-03-04 15:21       ` Bart Van Assche
2023-03-06  6:15         ` Shinichiro Kawasaki
2023-03-06  7:58         ` Johannes Thumshirn
2023-03-03  1:44 ` [PATCH 2/2] scsi: sd: Fix wrong zone_write_granularity value at revalidate Shin'ichiro Kawasaki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox