[LU-2657] Shouldn't deleting objects in mds_lov_update_objids() Created: 20/Jan/13  Updated: 20/Feb/13  Resolved: 19/Feb/13

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 1.8.8
Fix Version/s: Lustre 2.1.5, Lustre 1.8.9

Type: Bug Priority: Minor
Reporter: Niu Yawei (Inactive) Assignee: Niu Yawei (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
Severity: 3
Rank (Obsolete): 6200

 Description   

There is a code snippet from The code in mds_lov_update_objids():

                if (id > data[idx]) {
#ifndef HAVE_DELAYED_RECOVERY
                        int lost = id - data[idx] - 1;
                        /* we might have lost precreated objects due to VBR */
                        if (lost > 0 && obd->obd_recovering) {
                                CDEBUG(D_HA, "GAP in objids is %u\n", lost);
                                if (!obd->obd_version_recov)
                                        CWARN("Unexpected gap in objids\n");
                                /* lsm is allocated if NULL */
                                mds_log_lost_precreated(obd, &lsm, &stripes,
                                                        data[idx] + 1, lost, i);
                        }
#endif
                        data[idx] = id;
                        cfs_bitmap_set(mds->mds_lov_page_dirty, page);
                }
        }

Which is not quite right, because we can't guarantee the object id is always increased in transno order, and if the lov_objid file was removed by administrator (to fix the corrupted lov_objid file), many objects could be deleted mistakenly then.



 Comments   
Comment by Niu Yawei (Inactive) [ 21/Jan/13 ]

http://review.whamcloud.com/5137

Comment by Andreas Dilger [ 21/Jan/13 ]

Niu, is this still a problem for 2.1 or 2.4?

Comment by Niu Yawei (Inactive) [ 21/Jan/13 ]

Yes, it's still a problem for 2.1, but looks it has been fixed in ORI-692 for 2.4.

Comment by Niu Yawei (Inactive) [ 29/Jan/13 ]

patch for b2_1: http://review.whamcloud.com/5206

Comment by Niu Yawei (Inactive) [ 19/Feb/13 ]

patches landed.

Generated at Sat Feb 10 01:27:05 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.