Whamcloud - gitweb
LU-1129 obdfilter: handle race condition of recreating objects
authorYu Jian <yujian@whamcloud.com>
Mon, 14 Jan 2013 06:29:14 +0000 (14:29 +0800)
committerJohann Lombardi <johann.lombardi@intel.com>
Wed, 16 Jan 2013 06:25:15 +0000 (01:25 -0500)
commit271aa360cd5436600232c0e1517e73184bf36500
treef77fb308301293a8ffd853ffc28710b1cfb951db
parent4ca74d8b31f7342b4a228109f3665c4584580f4b
LU-1129 obdfilter: handle race condition of recreating objects

During OST recovery, a race can happen while handling replayed
OST_WRITE request during the MDS->OST orphan recovery period to
recreate missing objects, which can trigger ASSERTION(diff >= 0)
failure.

This patch handles the above issue by adding obd->obd_recovering
into the assertion to check whether the OST is in recovery or not.
If it's in recovery and diff < 0, then no assertion failure occurs,
the object has been recreated. If the OST is not in recovery and
diff < 0, then the assertion failure occurs.

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes testlist=sanity-quota
Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I346875378802385a95b0832b76d19f9957910cdf
Reviewed-on: http://review.whamcloud.com/5013
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
lustre/obdfilter/filter.c