Whamcloud - gitweb
LU-1881 oi: not shrink the last entry in OI index node
authorFan Yong <yong.fan@whamcloud.com>
Tue, 11 Sep 2012 07:07:30 +0000 (15:07 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 13 Sep 2012 18:15:30 +0000 (14:15 -0400)
commit7025f949f4d8225d546152f62008f2375cbab81e
treea46dd68a8f903edadfe1ae3d64306ad356bb39e5
parent3d9154152531e7fbdb6c9a1291827acfc7df41f7
LU-1881 oi: not shrink the last entry in OI index node

Shrinking OI index node to recycle idle leaf for the last entry
will cause subsequent lookup/insert ops to access invaild space.
So just keep the last entry there, which can be reused directly
by next new node.

Other fixes:

1) The recycled empty OI blocks should be recorded on divice and
be re-loaded after the device remounted. Then they can be reused
when needs new OI blocks.

2) Need not check iam_container::ic_idle_failed in iam_new_node().

3) Clear iam_frame::at_shifted when iam_path_release().

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I46611c208563a943a0980110b2c416186e6d1249
Reviewed-on: http://review.whamcloud.com/3931
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_iam.c
lustre/osd-ldiskfs/osd_iam_lfix.c
lustre/osd-ldiskfs/osd_iam_lvar.c
lustre/tests/sanity.sh