From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.6 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D512C433F5 for ; Mon, 6 Sep 2021 11:14:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1859560F3A for ; Mon, 6 Sep 2021 11:14:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240039AbhIFLPf (ORCPT ); Mon, 6 Sep 2021 07:15:35 -0400 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:46211 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232819AbhIFLPd (ORCPT ); Mon, 6 Sep 2021 07:15:33 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=joseph.qi@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0UnRwFtM_1630926866; Received: from B-D1K7ML85-0059.local(mailfrom:joseph.qi@linux.alibaba.com fp:SMTPD_---0UnRwFtM_1630926866) by smtp.aliyun-inc.com(127.0.0.1); Mon, 06 Sep 2021 19:14:27 +0800 Subject: Re: [PATCH] ocfs2: avoid getting dlm lock of the target directory multiple times during reflink process To: Gang He , mark@fasheh.com, jlbec@evilplan.org Cc: linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com, akpm@linux-foundation.org References: <20210826075941.28480-1-ghe@suse.com> From: Joseph Qi Message-ID: <41bc413d-0926-0eae-6772-076314bbae53@linux.alibaba.com> Date: Mon, 6 Sep 2021 19:14:26 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210826075941.28480-1-ghe@suse.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Gang, On 8/26/21 3:59 PM, Gang He wrote: > During the reflink process, we should acquire the target directory > inode dlm lock at the beginning, and hold this dlm lock until end > of the function. > With this patch, we avoid dlm lock ping-pong effect when clone > files to the same directory simultaneously from multiple nodes. > There is a typical user scenario, users regularly back up files > to a specified directory through the reflink feature from the > multiple nodes. > Since now it take dir inode lock across the whole reflink, it may impact other concurrent operations under the same directory. Have you evaluated such cases? Thanks, Joseph