Whamcloud - gitweb
LU-1581 utils: introduce osd_tune()
[fs/lustre-release.git] / lustre / utils / mount_utils.c
index 4c570a4..08e4b40 100644 (file)
@@ -508,6 +508,32 @@ int osd_prepare_lustre(struct mkfs_opts *mop,
        return ret;
 }
 
+int osd_tune_lustre(char *dev, struct mount_opts *mop)
+{
+       struct lustre_disk_data *ldd = &mop->mo_ldd;
+       int ret;
+
+       switch (ldd->ldd_mount_type) {
+       case LDD_MT_LDISKFS:
+       case LDD_MT_LDISKFS2:
+               ret = ldiskfs_tune_lustre(dev, mop);
+               break;
+#ifdef HAVE_ZFS_OSD
+       case LDD_MT_ZFS:
+               ret = zfs_tune_lustre(dev, mop);
+               break;
+#endif /* HAVE_ZFS_OSD */
+       default:
+               fatal();
+               fprintf(stderr, "unknown fs type %d '%s'\n",
+                               ldd->ldd_mount_type, MT_STR(ldd));
+               ret = EINVAL;
+               break;
+       }
+
+       return ret;
+}
+
 int osd_init(void)
 {
        int ret = 0;