Whamcloud - gitweb
b=17485 Don't reset the lov_objid to last_id sent by OST
i=andrew
i=hongchao
Resetting the lov_objid values to last_id reported by
the OST in mds_lov_get_objid() unconditionally is just wrong and can cause
the same object to be allocated twice by the MDS.
The SKIP_ORPHAN feature is supposed to work as follows:
* during orphan recovery, the MDS must supply to the OST the lov_objid
value;
* on the OST side:
- if MDS's lov_objid > OST's last_id, the OST recreates the missing objects
up to lov_objid and packs this value in the reply;
- if OST's last_id > MDS's lov_objid, the OST destroys orphan objects from
lov_objid + 1 up to last_id and does *not* change last_id. The OST packs
in the reply the value of last_id which is from where the MDS should
restart allocations if it does not want to reuse orphans.
* the MDS sets next_id to the value reported by the OST in the orphan recovery
request.
If we always discard the lov_objid values as done currently in mds_lov_get_objid(),
orphan recovery is just a noop and neither clears orphans nor recreates missing
objects.