From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Teigland Date: Thu, 12 Aug 2021 12:45:23 -0500 Subject: [Cluster-devel] Why does dlm_lock function fails when downconvert a dlm lock? In-Reply-To: <74009531-f6ef-4ef9-b969-353684006ddc@suse.com> References: <74009531-f6ef-4ef9-b969-353684006ddc@suse.com> Message-ID: <20210812174523.GC1757@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Thu, Aug 12, 2021 at 01:44:53PM +0800, Gang He wrote: > In fact, I can reproduce this problem stably. > I want to know if this error happen is by our expectation? since there is > not any extreme pressure test. > Second, how should we handle these error cases? call dlm_lock function > again? maybe the function will fails again, that will lead to kernel > soft-lockup after multiple re-tries. What's probably happening is that ocfs2 calls dlm_unlock(CANCEL) to cancel an in-progress dlm_lock() request. Before the cancel completes (or the original request completes), ocfs2 calls dlm_lock() again on the same resource. This dlm_lock() returns -EBUSY because the previous request has not completed, either normally or by cancellation. This is expected. A couple options to try: wait for the original request to complete (normally or by cancellation) before calling dlm_lock() again, or retry dlm_lock() on -EBUSY. Dave