Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dd0d0a8
)
de-serialised getattr, brw test ioctls
author
eeb
<eeb>
Tue, 20 Aug 2002 19:41:35 +0000
(19:41 +0000)
committer
eeb
<eeb>
Tue, 20 Aug 2002 19:41:35 +0000
(19:41 +0000)
lustre/obdclass/class_obd.c
patch
|
blob
|
history
diff --git
a/lustre/obdclass/class_obd.c
b/lustre/obdclass/class_obd.c
index
0bac970
..
7c31246
100644
(file)
--- a/
lustre/obdclass/class_obd.c
+++ b/
lustre/obdclass/class_obd.c
@@
-104,10
+104,21
@@
static int obd_class_ioctl (struct inode * inode, struct file * filp,
struct lustre_handle conn;
int rw = OBD_BRW_READ;
int err = 0;
struct lustre_handle conn;
int rw = OBD_BRW_READ;
int err = 0;
+ int serialised = 0;
ENTRY;
ENTRY;
- down(&obd_conf_sem);
-
+ switch (cmd)
+ {
+ case OBD_IOC_BRW_WRITE:
+ case OBD_IOC_BRW_READ:
+ case OBD_IOC_GETATTR:
+ break;
+ default:
+ down(&obd_conf_sem);
+ serialised = 1;
+ break;
+ }
+
if (!obd && cmd != OBD_IOC_DEVICE && cmd != TCGETS &&
cmd != OBD_IOC_LIST &&
cmd != OBD_IOC_NAME2DEV && cmd != OBD_IOC_NEWDEV) {
if (!obd && cmd != OBD_IOC_DEVICE && cmd != TCGETS &&
cmd != OBD_IOC_LIST &&
cmd != OBD_IOC_NAME2DEV && cmd != OBD_IOC_NEWDEV) {
@@
-558,7
+569,8
@@
static int obd_class_ioctl (struct inode * inode, struct file * filp,
out:
if (buf)
OBD_FREE(buf, len);
out:
if (buf)
OBD_FREE(buf, len);
- up(&obd_conf_sem);
+ if (serialised)
+ up(&obd_conf_sem);
RETURN(err);
} /* obd_class_ioctl */
RETURN(err);
} /* obd_class_ioctl */