Whamcloud - gitweb
ORNL-3 mntopt: consider low-layer options for MDT ACL flags
[fs/lustre-release.git] / lustre / mdd / mdd_device.c
index 0dbfbd4..5f3a492 100644 (file)
@@ -30,6 +30,9 @@
  * Use is subject to license terms.
  */
 /*
+ * Copyright (c) 2011 Whamcloud, Inc.
+ */
+/*
  * This file is part of Lustre, http://www.lustre.org/
  * Lustre is a trademark of Sun Microsystems, Inc.
  *
@@ -1492,11 +1495,18 @@ static int mdd_iocontrol(const struct lu_env *env, struct md_device *m,
         mdd = lu2mdd_dev(&m->md_lu_dev);
 
         /* Doesn't use obd_ioctl_data */
-        if (cmd == OBD_IOC_CHANGELOG_CLEAR) {
+        switch (cmd) {
+        case OBD_IOC_CHANGELOG_CLEAR: {
                 struct changelog_setinfo *cs = karg;
                 rc = mdd_changelog_user_purge(mdd, cs->cs_id, cs->cs_recno);
                 RETURN(rc);
         }
+        case OBD_IOC_GET_MNTOPT: {
+                mntopt_t *mntopts = (mntopt_t *)karg;
+                *mntopts = mdd->mdd_dt_conf.ddp_mntopts;
+                RETURN(0);
+        }
+        }
 
         /* Below ioctls use obd_ioctl_data */
         if (len != sizeof(*data)) {
@@ -1518,7 +1528,7 @@ static int mdd_iocontrol(const struct lu_env *env, struct md_device *m,
                                               MCUD_UNREGISTER);
                 break;
         default:
-                rc = -EOPNOTSUPP;
+                rc = -ENOTTY;
         }
 
         RETURN (rc);