Whamcloud - gitweb
LU-8147 osd-zfs: fix osd_mount error path
[fs/lustre-release.git] / lustre / osd-zfs / osd_handler.c
index 43ae76d..334310d 100644 (file)
@@ -1089,13 +1089,19 @@ static struct lu_device *osd_device_alloc(const struct lu_env *env,
                                          struct lu_device_type *type,
                                          struct lustre_cfg *cfg)
 {
-       struct osd_device *dev;
-       int                rc;
+       struct osd_device       *dev;
+       struct osd_seq_list     *osl;
+       int                     rc;
 
        OBD_ALLOC_PTR(dev);
        if (dev == NULL)
                return ERR_PTR(-ENOMEM);
 
+       osl = &dev->od_seq_list;
+       INIT_LIST_HEAD(&osl->osl_seq_list);
+       rwlock_init(&osl->osl_seq_list_lock);
+       sema_init(&osl->osl_seq_init_sem, 1);
+
        rc = dt_device_init(&dev->od_dt_dev, type);
        if (rc == 0) {
                rc = osd_device_init0(env, dev, cfg);
@@ -1395,9 +1401,8 @@ static void __exit osd_exit(void)
 }
 
 extern unsigned int osd_oi_count;
-CFS_MODULE_PARM(osd_oi_count, "i", int, 0444,
-               "Number of Object Index containers to be created, "
-               "it's only valid for new filesystem.");
+module_param(osd_oi_count, int, 0444);
+MODULE_PARM_DESC(osd_oi_count, "Number of Object Index containers to be created, it's only valid for new filesystem.");
 
 MODULE_AUTHOR("OpenSFS, Inc. <http://www.lustre.org/>");
 MODULE_DESCRIPTION("Lustre Object Storage Device ("LUSTRE_OSD_ZFS_NAME")");