Whamcloud - gitweb
LU-1976 io: check index node before recycle empty leaf
authorFan Yong <yong.fan@whamcloud.com>
Thu, 20 Sep 2012 15:45:19 +0000 (23:45 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 21 Sep 2012 23:25:54 +0000 (19:25 -0400)
commit1dd3f59981914a90cbeddedab5dfc91fa28764c6
tree8fb4f095b3c57ed2a2b38a6d24884d9b04f53ff6
parentf34820a2c280dbaa3cdb3dafa9abaae62eeb6dbf
LU-1976 io: check index node before recycle empty leaf

There may be multiple threads trying to shrink the same OI index
node to recycle different empty OI leaf nodes concurrently, and
someone may enlarged or split the index node before the threads
shrinking the index node to recycle the empty OI leaf nodes.
These concurrent OI index node modifications will change leaf
node position in the index node. So before shrinking the index
node, we need to check and adjust related frame pointer to avoid
to shrink the index node improperly as to crash the memory.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I26063407f6c52f3e51ddb40e6c27aaa5cf63ec2b
Reviewed-on: http://review.whamcloud.com/4061
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osd-ldiskfs/osd_iam.c
lustre/osd-ldiskfs/osd_iam_lfix.c