Re: [PATCH 4/8] scsi: sd_zbc: Introduce struct zoned_disk_info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/17/22 16:16, Damien Le Moal wrote:
On 4/16/22 05:17, Bart Van Assche wrote:
+/**
+ * struct zoned_disk_info - Properties of a zoned SCSI disk.

Nit: you could say "ZBC SCSI device" to be more inline with standards
vocabulary here instead of "zoned SCSI disk".

Will fix.

+ * @nr_zones: number of zones.
+ * @zone_blocks: number of logical blocks per zone.
+ */
+struct zoned_disk_info {
+	u32		nr_zones;
+	u32		zone_blocks;
+};
+
  struct scsi_disk {
  	struct scsi_device *device;
@@ -78,10 +88,10 @@ struct scsi_disk {
  	struct gendisk	*disk;
  	struct opal_dev *opal_dev;
  #ifdef CONFIG_BLK_DEV_ZONED
-	u32		nr_zones;
-	u32		rev_nr_zones;
-	u32		zone_blocks;
-	u32		rev_zone_blocks;
+	/* Updated during revalidation before the gendisk capacity is known. */
+	struct zoned_disk_info	early_zone_info;
+	/* Updated during revalidation after the gendisk capacity is known. */
+	struct zoned_disk_info	zone_info;
  	u32		zones_optimal_open;
  	u32		zones_optimal_nonseq;
  	u32		zones_max_open;

Nit: It would be nice to pack everything under the #ifdef into the same
structure...

Hmm ... my goal is to only include the ZBC SCSI device properties in struct
zoned_disk_info that are evaluated twice (before and after the gendisk
capacity is known). Most ZBC-related members of struct scsi_disk are only
evaluated once.

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux