Re: [PATCH for-next 3/3] null_blk: introduce badblocks_once parameter

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

 



On 12/17/24 11:49 PM, Shin'ichiro Kawasaki wrote:
  static ssize_t memb_group_features_show(struct config_item *item, char *page)
  {
  	return snprintf(page, PAGE_SIZE,
-			"badblocks,blocking,blocksize,cache_size,fua,"
-			"completion_nsec,discard,home_node,hw_queue_depth,"
-			"irqmode,max_sectors,mbps,memory_backed,no_sched,"
-			"poll_queues,power,queue_mode,shared_tag_bitmap,"
-			"shared_tags,size,submit_queues,use_per_node_hctx,"
-			"virt_boundary,zoned,zone_capacity,zone_max_active,"
-			"zone_max_open,zone_nr_conv,zone_offline,zone_readonly,"
-			"zone_size,zone_append_max_sectors,zone_full,"
-			"rotational\n");
+			"badblocks,badblocks_once,blocking,blocksize,"
+			"cache_size,completion_nsec,"
+			"discard,"
+			"fua,"
+			"home_node,hw_queue_depth,"
+			"irqmode,"
+			"max_sectors,mbps,memory_backed,"
+			"no_sched,"
+			"poll_queues,power,"
+			"queue_mode,"
+			"rotational,"
+			"shared_tag_bitmap,shared_tags,size,submit_queues,"
+			"use_per_node_hctx,"
+			"virt_boundary,"
+			"zoned,zone_capacity,zone_max_active,zone_max_open,"
+			"zone_nr_conv,zone_offline,zone_readonly,zone_size,"
+			"zone_append_max_sectors,zone_full\n");
  }

The entire list of attributes occurs twice in the null_blk source code.
This is error prone. Has it been considered to modify
memb_group_features_show() such that it iterates over the
nullb_device_attrs array instead of duplicating information that already
exists in that array?

Thanks,

Bart.





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux