[lustre-devel] [PATCH 186/622] lustre: obdclass: report all obd states for OBD_IOC_GETDEVICE

James Simmons jsimmons at infradead.org
Thu Feb 27 13:10:54 PST 2020


The wrong state '--' which is reported when the obd device is
inactive. Reporting the "IN" state cover all the information that
is provided by 'devices' debugfs file. Now all the information
from 'devices' can be collected from the lustre sysfs tree.

WC-bug-id: https://jira.whamcloud.com/browse/LU-8066
Lustre-commit: adfec49f334d ("LU-8066 obdclass: report all obd states for OBD_IOC_GETDEVICE")
Signed-off-by: James Simmons <uja.ornl at yahoo.com>
Reviewed-on: https://review.whamcloud.com/33774
Reviewed-by: Ben Evans <bevans at cray.com>
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 fs/lustre/obdclass/class_obd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/lustre/obdclass/class_obd.c b/fs/lustre/obdclass/class_obd.c
index 4ef9cca..0435f62 100644
--- a/fs/lustre/obdclass/class_obd.c
+++ b/fs/lustre/obdclass/class_obd.c
@@ -427,6 +427,8 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
 
 		if (obd->obd_stopping)
 			status = "ST";
+		else if (obd->obd_inactive)
+			status = "IN";
 		else if (obd->obd_set_up)
 			status = "UP";
 		else if (obd->obd_attached)
-- 
1.8.3.1



More information about the lustre-devel mailing list