Whamcloud - gitweb
Changed mds_lov_set_nextid mds_lov_set_growth to use obd_set_info
authorrread <rread>
Fri, 29 Aug 2003 23:33:29 +0000 (23:33 +0000)
committerrread <rread>
Fri, 29 Aug 2003 23:33:29 +0000 (23:33 +0000)
instead of obd_setattr, and added this code to lov_ and osc_set_info.
It is now ok if stripe_cnt  != target_cnt.

Removed the mds_lov_lsm, lsmsize fields, as they are no longer
needed now that we use obd_set_info.

Renamed lov_create_orphans to lov_clear_orphans, as that is what it does.

Fixed filter_next_id() and filter_last_id() to really be next and
last. (I take "last" to mean last value that filter_next_id()
returned.)

Added some tests to replay_single.sh.

lustre/osc/osc_create.c

index db50710..dbe1f2c 100644 (file)
@@ -152,9 +152,13 @@ int osc_create(struct obd_export *exp, struct obdo *oa,
         }
 
        /* this is the special case where create removes orphans */
-       if (oa->o_valid == (OBD_MD_FLID | OBD_MD_FLFLAGS) &&
+       if (oa->o_valid == OBD_MD_FLFLAGS &&
            oa->o_flags == OBD_FL_DELORPHAN) {
-               oa->o_id = oscc->oscc_next_id - 1;
+                /* delete from next_id on up */
+                oa->o_valid |= OBD_MD_FLID;
+                oa->o_id = oscc->oscc_next_id;
+                if (oa->o_id == 0)
+                        RETURN(0);
                 rc = osc_real_create(oscc->oscc_exp, oa, ea, NULL);
 
                 spin_lock(&osccd->osccd_lock);