Whamcloud - gitweb
LU-8900 snapshot: simulate readonly device
[fs/lustre-release.git] / lustre / osd-zfs / osd_oi.c
index 08aa27f..0f0526b 100644 (file)
@@ -148,6 +148,9 @@ osd_oi_create(const struct lu_env *env, struct osd_device *o,
        if (rc == 0)
                return -EEXIST;
 
+       if (o->od_dt_dev.dd_rdonly)
+               return -EROFS;
+
        /* create fid-to-dnode index */
        tx = dmu_tx_create(o->od_os);
        if (tx == NULL)