aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2009-05-24 20:05:05 +0300
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-06-10 09:00:25 -0500
commit021e2230d6c04d80289fceb2d21c9ce93a615b32 (patch)
treef8a4eeb7be9aa2ea65bf343680893e30d02ead92 /include
parentfc2fac5b5f11e2bee3bf37215c8746236f5ea188 (diff)
downloadkernel_samsung_tuna-021e2230d6c04d80289fceb2d21c9ce93a615b32.zip
kernel_samsung_tuna-021e2230d6c04d80289fceb2d21c9ce93a615b32.tar.gz
kernel_samsung_tuna-021e2230d6c04d80289fceb2d21c9ce93a615b32.tar.bz2
[SCSI] osduld: use filp_open() when looking up an osd-device
This patch was inspired by Al Viro, for simplifying and fixing the retrieval of osd-devices by in-kernel users, eg: file systems. In-Kernel users, now, go through the same path user-mode does by opening a file on the osd char-device and though holding a reference to both the device and the Module. A file pointer was added to the osd_dev structure which is now allocated for each user. The internal osd_dev is no longer exposed outside of the uld. I wanted to do that for a long time so each libosd user can have his own defaults on the device. The API is left the same, so user code need not change. It is no longer needed to open/close a file handle on the osd char-device from user-mode, before mounting an exofs on it. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> CC: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'include')
-rw-r--r--include/scsi/osd_initiator.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/scsi/osd_initiator.h b/include/scsi/osd_initiator.h
index b44dc53..02bd9f7 100644
--- a/include/scsi/osd_initiator.h
+++ b/include/scsi/osd_initiator.h
@@ -48,6 +48,7 @@ enum osd_std_version {
*/
struct osd_dev {
struct scsi_device *scsi_device;
+ struct file *file;
unsigned def_timeout;
#ifdef OSD_VER1_SUPPORT