Whamcloud - gitweb
LU-2742 oi: handle IGIF lookup
For the MDT upgraded from 1.8 device, OI scrub will immobilize the
IGIF and insert the mapping for "IGIF <=> ino#" into the OI file.
There are three cases to be processed:
1) After the upgrading, all IGIFs have been processed and inserted
into OI files. Then any IGIF object lookup should be processed
as normal FID does, means via OI. If no entry in the OI file,
then the IGIF object does not exist.
2) During the upgrading, some IGIFs may be already in OI files,
others may be not yet. Under such case, lookup an IGIF in OI
files may return -ENOENT, but it does not means the IGIF obj
does not exist. Since the new immobilize IGIF is the same as
the original one before backup/restore, OSD will generate
local identifier from IGIF directly as old 2.x did.
3) The upgrading is paused, and backup/restore. Means upgrading
from 1.8 may be partly processed, but some clients may hold
some immobilized IGIFs, and use them to access related objects.
Under such case, OSD does not know whether an given IGIF has
been processed or to be processed, and it also cannot generate
local ino#/gen# directly from the immobilized IGIF because of
the backup/restore. Then force OSD to lookup the given IGIF
in OI files, and if no entry, then ask the client to retry
after upgrading completed. No better choice.
Test-Parameters: testlist=sanity-scrub
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I7fff7898e2fcdf6b075bb04817f3b825c9a911b0
Reviewed-on: http://review.whamcloud.com/6254
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>