Whamcloud - gitweb
fix many bugs that prevented previously-mounted filesystems from
authorphil <phil>
Sun, 24 Aug 2003 21:05:02 +0000 (21:05 +0000)
committerphil <phil>
Sun, 24 Aug 2003 21:05:02 +0000 (21:05 +0000)
mounting a second time:
 - set the oscc_next_id (via obd_setattr) before we use that value to
   recover orphans
 - when recovering orphans, send the actual last-used ID (oscc_next_id - 1),
   instead of oscc_next_id
 - in filter_destroy_precreated, call filter_destroy with a NULL oti
   to avoid saving locks for the reply-ack
 - remove the boot count component of the filter objid; it is no
   longer required and makes orphan recovery harder
 - start the filter objid count at 1
 - orphan recovery is a dangerous process which if done incorrectly
   will delete the wrong objects; with that in mind, we now call a
   dramatically simpler lov_create_orphans() instead of the normal
   out-of-control lov_create

lustre/osc/osc_create.c

index d683ff5..80bc9dc 100644 (file)
@@ -156,7 +156,7 @@ int osc_create(struct lustre_handle *exph, struct obdo *oa,
        /* this is the special case where create removes orphans */
        if (oa->o_valid == (OBD_MD_FLID | OBD_MD_FLFLAGS) &&
            oa->o_flags == OBD_FL_DELORPHAN) {
-               oa->o_id = oscc->oscc_next_id;
+               oa->o_id = oscc->oscc_next_id - 1;
                 rc = osc_real_create(oscc->oscc_exph, oa, ea, NULL);
                RETURN(rc);
        }