Skip to contentSkip to conversation

scsi: remove show_use_blk_mq()

PATCH In review Jason Yan 4 participants 6 messages Apr 1, 2020 – Apr 2, 2020 SCSI

lore
Share & tools
lore

Jason Yan

author
#0 lore raw

PATCH 1/1 scsi: remove show_use_blk_mq()

This code is useless now so remove it.

Cc Ewan D. Milne <[email protected]>
Cc Christoph Hellwig <[email protected]>,
Cc Hannes Reinecke <[email protected]>
Cc Bart Van Assche <[email protected]>
Cc Ming Lei <[email protected]>
Cc John Garry <[email protected]>
---
 drivers/scsi/scsi_sysfs.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/scsi/scsi_sysfs.c +0 -8
index 163dbcb741c1..6480e27982ab 100644
@@ -386,15 +386,7 @@ show_host_busy(struct device *dev, struct device_attribute *attr, char *buf)
 }
 static DEVICE_ATTR(host_busy, S_IRUGO, show_host_busy, NULL);
 
-static ssize_t
-show_use_blk_mq(struct device *dev, struct device_attribute *attr, char *buf)
-{
-	return sprintf(buf, "1\n");
-}
-static DEVICE_ATTR(use_blk_mq, S_IRUGO, show_use_blk_mq, NULL);
-
 static struct attribute *scsi_sysfs_shost_attrs[] = {
-	&dev_attr_use_blk_mq.attr,
 	&dev_attr_unique_id.attr,
 	&dev_attr_host_busy.attr,
 	&dev_attr_cmd_per_lun.attr,
Signature · 1 line
2.17.2
#1 lore raw
Quoted 2 lines · Jason Yan

This code is useless now so remove it.

note: I did not delete this in "scsi: core: Delete scsi_use_blk_mq", to avoid risk of breaking some user still using this

thanks,
John

Quoted 32 lines
Cc Ewan D. Milne <[email protected]>
Cc Christoph Hellwig <[email protected]>,
Cc Hannes Reinecke <[email protected]>
Cc Bart Van Assche <[email protected]>
Cc Ming Lei <[email protected]>
Cc John Garry <[email protected]>
---
  drivers/scsi/scsi_sysfs.c | 8 --------
  1 file changed, 8 deletions(-)
drivers/scsi/scsi_sysfs.c +0 -8
index 163dbcb741c1..6480e27982ab 100644
@@ -386,15 +386,7 @@ show_host_busy(struct device *dev, struct device_attribute *attr, char *buf)
  }
  static DEVICE_ATTR(host_busy, S_IRUGO, show_host_busy, NULL);
 
-static ssize_t
-show_use_blk_mq(struct device *dev, struct device_attribute *attr, char *buf)
-{
-	return sprintf(buf, "1\n");
-}
-static DEVICE_ATTR(use_blk_mq, S_IRUGO, show_use_blk_mq, NULL);
-
  static struct attribute *scsi_sysfs_shost_attrs[] = {
-	&dev_attr_use_blk_mq.attr,
  	&dev_attr_unique_id.attr,
  	&dev_attr_host_busy.attr,
  	&dev_attr_cmd_per_lun.attr,
author
#2 lore raw
Quoted 6 lines · John Garry
Quoted 2 lines · Jason Yan

This code is useless now so remove it.

note: I did not delete this in "scsi: core: Delete scsi_use_blk_mq", to avoid risk of breaking some user still using this

Maybe. But removing a module param may break the user space too. Actually when the legacy path of single queue is removed, plenty of sys attributes have been removed. And this one needs to go sooner or later.

Quoted 39 lines

thanks,
John

Quoted 31 lines
Cc Ewan D. Milne <[email protected]>
Cc Christoph Hellwig <[email protected]>,
Cc Hannes Reinecke <[email protected]>
Cc Bart Van Assche <[email protected]>
Cc Ming Lei <[email protected]>
Cc John Garry <[email protected]>

---
  drivers/scsi/scsi_sysfs.c | 8 --------

  1 file changed, 8 deletions(-)
drivers/scsi/scsi_sysfs.c +0 -8
index 163dbcb741c1..6480e27982ab 100644
@@ -386,15 +386,7 @@ show_host_busy(struct device *dev, struct 
 device_attribute *attr, char *buf)
   }
   static DEVICE_ATTR(host_busy, S_IRUGO, show_host_busy, NULL);
-static ssize_t
-show_use_blk_mq(struct device *dev, struct device_attribute *attr, 
 char *buf)
-{
-    return sprintf(buf, "1\n");
-}
-static DEVICE_ATTR(use_blk_mq, S_IRUGO, show_use_blk_mq, NULL);
-
   static struct attribute *scsi_sysfs_shost_attrs[] = {
-    &dev_attr_use_blk_mq.attr,
       &dev_attr_unique_id.attr,
       &dev_attr_host_busy.attr,
Quoted 2 lines

      &dev_attr_cmd_per_lun.attr,

.

#3 lore raw

Jason,

Quoted 1 line

Maybe. But removing a module param may break the user space too.

It won't break loading the module.

The intent is to leave the sysfs parameter in place for a while to make sure nobody depends on it.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
author
#4 lore raw
Quoted 10 lines · Martin K. Petersen

Jason,

Quoted 1 line

Maybe. But removing a module param may break the user space too.

It won't break loading the module.

The intent is to leave the sysfs parameter in place for a while to make sure nobody depends on it.

OK, thanks.

#5 lore raw
In reply to Jason Yan
Quoted 20 lines · Jason Yan

This code is useless now so remove it.

Cc Ewan D. Milne <[email protected]>
Cc Christoph Hellwig <[email protected]>,
Cc Hannes Reinecke <[email protected]>
Cc Bart Van Assche <[email protected]>
Cc Ming Lei <[email protected]>
Cc John Garry <[email protected]>
---
  drivers/scsi/scsi_sysfs.c | 8 --------
  1 file changed, 8 deletions(-)
drivers/scsi/scsi_sysfs.c +0 -0
index 163dbcb741c1..6480e27982ab 100644
@@ -386,15 +386,7 @@ show_host_busy(struct device *dev, struct device_attribute *attr, char *buf)
  }
  static DEVICE_ATTR(host_busy, S_IRUGO, show_host_busy, NULL);

drivers/scsi/scsi_sysfs.c show_host_busy(struct device *dev, struct device_attribute *attr, char *buf) · line 397

Quoted 10 lines
drivers/scsi/scsi_sysfs.c +0 -8
 
-static ssize_t
-show_use_blk_mq(struct device *dev, struct device_attribute *attr, char *buf)
-{
-	return sprintf(buf, "1\n");
-}
-static DEVICE_ATTR(use_blk_mq, S_IRUGO, show_use_blk_mq, NULL);
-
  static struct attribute *scsi_sysfs_shost_attrs[] = {
-	&dev_attr_use_blk_mq.attr,

Looks like the removal of a sysfs attribute.
Wouldn't this break user space ABI?
I checked Documentation/ABI/ but could not find this attribute having been obsolete (but it does not seem testing or stable either).

[linux/Documentation/ABI](0)$ git grep use_blk_mq .
testing/sysfs-block-dm:41:What: /sys/block/dm-<num>/dm/use_blk_mq

Quoted 4 lines
drivers/scsi/scsi_sysfs.c +0 -0
  	&dev_attr_unique_id.attr,
  	&dev_attr_host_busy.attr,
  	&dev_attr_cmd_per_lun.attr,
Signature · 11 lines
Mit freundlichen Gruessen / Kind regards
Steffen Maier

Linux on IBM Z Development

https://www.ibm.com/privacy/us/en/
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Matthias Hartmann
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294