Client ll_glimpse_callback() could fail to get inode if the inode is
already been cleared, and this glimpse callback will fail for
-ELDLM_NO_LOCK_DATA, so server should update LVB from disk
(in filter_intent_policy()) when it received such error from client.
Issue:
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I29b2fe4b35114359b0ad62106de48f5f2f696636
Reviewed-on: http://review.whamcloud.com/507
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
LASSERTF(l->l_glimpse_ast != NULL, "l == %p", l);
rc = l->l_glimpse_ast(l, NULL); /* this will update the LVB */
+ /* Update the LVB from disk if the AST failed (this is a legal race) */
+ /* Client might return -ELDLM_NO_LOCK_DATA if the inode has been cleared
+ * in client cache, since the data must has been flushed to OST in such
+ * case, we should update LVB from disk. LU-274 */
+ if (rc != 0)
+ ldlm_res_lvbo_update(res, NULL, 0, 1);
+
lock_res(res);
*reply_lvb = *res_lvb;