Whamcloud - gitweb
LU-7893 osd-zfs: fix error handling in osd_mount()
[fs/lustre-release.git] / lustre / osd-zfs / osd_handler.c
index ff4bc58..5d1ae30 100644 (file)
@@ -817,6 +817,7 @@ static int osd_objset_open(struct osd_device *o)
 
        rc = -dmu_objset_own(o->od_mntdev, DMU_OST_ZFS, B_FALSE, o, &o->od_os);
        if (rc) {
+               CERROR("%s: can't open %s\n", o->od_svname, o->od_mntdev);
                o->od_os = NULL;
                goto out;
        }
@@ -973,7 +974,7 @@ static int osd_mount(const struct lu_env *env,
 
        rc = osd_objset_open(o);
        if (rc)
-               GOTO(err, rc);
+               RETURN(rc);
 
        o->od_xattr_in_sa = B_TRUE;
        o->od_max_blksz = SPA_OLD_MAXBLOCKSIZE;
@@ -1089,13 +1090,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);