From: pschwan Date: Tue, 3 Sep 2002 21:15:19 +0000 (+0000) Subject: ldlm_handle_convert was putting the lock immediately onto the conversion queue and X-Git-Tag: v1_7_100~4919 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=1654b5b4308a0676972ce1aef624b81ac310280c;hp=4f35d4cf58b1ef878713742225559757b06c91b3;p=fs%2Flustre-release.git ldlm_handle_convert was putting the lock immediately onto the conversion queue and then returning with flags=0, instead of flags=LDLM_FL_BLOCK_CONV. Thus, the client believed that the conversion had succeeded immediately, marked the lock accordingly, and continued on its merry way, even if it didn't actually have the lock. --- diff --git a/lustre/ldlm/ldlm_lock.c b/lustre/ldlm/ldlm_lock.c index facceee..900decb 100644 --- a/lustre/ldlm/ldlm_lock.c +++ b/lustre/ldlm/ldlm_lock.c @@ -819,8 +819,12 @@ struct ldlm_resource *ldlm_lock_convert(struct ldlm_lock *lock, int new_mode, if (lock->l_completion_ast) lock->l_completion_ast(lock, 0); } - } else + } else { + /* FIXME: We should try the conversion right away and possibly + * return success without the need for an extra AST */ list_add_tail(&lock->l_res_link, &res->lr_converting); + *flags |= LDLM_FL_BLOCK_CONV; + } l_unlock(&ns->ns_lock);