osduld: Add osdname & systemid sysfs at scsi_osd class
authorSachin Bhamare <sbhamare@panasas.com>
Fri, 10 Feb 2012 01:09:32 +0000 (17:09 -0800)
committerBoaz Harrosh <bharrosh@panasas.com>
Mon, 15 Oct 2012 23:21:17 +0000 (16:21 -0700)
commitb6755ffb0c03c2e763cc56f72cc2ceaba8ea2805
tree074e74b6d84791a44df4ec839b3bc9398e2a8601
parentddffeb8c4d0331609ef2581d84de4d763607bd37
osduld: Add osdname & systemid sysfs at scsi_osd class

This patch adds the support for following two read-only sysfs attributes
to scsi_osd class members : osdname & systemid

These attributes will show up as below in sysfs class hierarchy:
/sys/class/scsi_osd/osdX/osdname
/sys/class/scsi_osd/osdX/systemid

The osdname & systemid are OSD device attributes which uniquely
identify a device on the network, while it's IP and certainly
it's /dev/osdX device path might change.
Userspace utilities (e.g. mkfs.exofs) can parse these attributes to
identify the correct OSD in safer and faster way.

(Today osd apps open each device in the system and send a
 attributes query for these, in order to access the user
 requested device)

Signed-off-by: Sachin Bhamare <sbhamare@panasas.com>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
drivers/scsi/osd/osd_uld.c