[PATCH 2/5] ses: generate KOBJ_CHANGE on enclosure attach

2014-12-30 Thread Song Liu
From: Dan Williams dan.j.willi...@intel.com

In support of a /dev/disk/by-slot populated with data from the enclosure
and ses modules udev needs notification when the new interface
files/links are available.  Otherwise, any udev rules specified for the
disk cannot assume that the enclosure topology has settled.

Signed-off-by: Dan Williams dan.j.willi...@intel.com
Signed-off-by: Song Liu songliubrav...@fb.com
Reviewed-by: Jens Axboe ax...@fb.com
Reviewed-by: Hannes Reinecke h...@suse.de
---
 drivers/scsi/ses.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index 7dd9cf5..6662b0c 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -349,7 +349,8 @@ static int ses_enclosure_find_by_addr(struct 
enclosure_device *edev,
if (scomp-addr != efd-addr)
continue;
 
-   enclosure_add_device(edev, i, efd-dev);
+   if (enclosure_add_device(edev, i, efd-dev) == 0)
+   kobject_uevent(efd-dev-kobj, KOBJ_CHANGE);
return 1;
}
return 0;
-- 
1.8.1

--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 2/5] SES: generate KOBJ_CHANGE on enclosure attach

2014-09-12 Thread Song Liu
From 741aa4b6043af741e28c0c414d48249f878353dc Mon Sep 17 00:00:00 2001
From: Dan Williams dan.j.willi...@intel.com
Date: Thu, 21 Aug 2014 11:43:22 -0700
Subject: [PATCH 2/5] SES: generate KOBJ_CHANGE on enclosure attach

In support of a /dev/disk/by-slot populated with data from the enclosure
and ses modules udev needs notification when the new interface
files/links are available.  Otherwise, any udev rules specified for the
disk cannot assume that the enclosure topology has settled.

Signed-off-by: Dan Williams dan.j.willi...@intel.com
Signed-off-by: Song Liu songliubrav...@fb.com
Reviewed-by: Jens Axboe ax...@fb.com
Reviewed-by: Hannes Reinecke h...@suse.de
---
 drivers/scsi/ses.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index c52fd98..87cf970b 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -349,7 +349,8 @@ static int ses_enclosure_find_by_addr(struct 
enclosure_device *edev,
if (scomp-addr != efd-addr)
continue;
 
-   enclosure_add_device(edev, i, efd-dev);
+   if (enclosure_add_device(edev, i, efd-dev) == 0)
+   kobject_uevent(efd-dev-kobj, KOBJ_CHANGE);
return 1;
}
return 0;
-- 
1.8.1

--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/5] SES: generate KOBJ_CHANGE on enclosure attach

2014-08-25 Thread Song Liu
From: Song Liu [mailto:songliubrav...@fb.com] 
Sent: Monday, August 25, 2014 10:26 AM
To: Song Liu
Cc: Dan Williams; Hannes Reinecke
Subject: [PATCH 2/5] SES: generate KOBJ_CHANGE on enclosure attach

From: Dan Williams dan.j.willi...@intel.com

In support of a /dev/disk/by-slot populated with data from the enclosure and 
ses modules udev needs notification when the new interface files/links are 
available.  Otherwise, any udev rules specified for the disk cannot assume that 
the enclosure topology has settled.

Signed-off-by: Dan Williams dan.j.willi...@intel.com
Signed-off-by: Song Liu songliubrav...@fb.com
Reviewed-by: Jens Axboe ax...@fb.com
Cc: Hannes Reinecke h...@suse.de
---
 drivers/scsi/ses.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c index c2e8a98..8f0a62a 
100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -349,7 +349,8 @@ static int ses_enclosure_find_by_addr(struct 
enclosure_device *edev,
if (scomp-addr != efd-addr)
continue;
 
-   enclosure_add_device(edev, i, efd-dev);
+   if (enclosure_add_device(edev, i, efd-dev) == 0)
+   kobject_uevent(efd-dev-kobj, KOBJ_CHANGE);
return 1;
}
return 0;
--
1.8.1

--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html