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 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 F0F72C433EF for ; Mon, 6 Sep 2021 11:15:06 +0000 (UTC) Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7D85560F3A for ; Mon, 6 Sep 2021 11:15:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7D85560F3A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=oss.oracle.com Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1868in1W000958; Mon, 6 Sep 2021 11:15:05 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3avxtqa0yt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Sep 2021 11:15:05 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 186B6Ajd157294; Mon, 6 Sep 2021 11:15:04 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 3avqtc7c9u-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Mon, 06 Sep 2021 11:15:04 +0000 Received: from localhost ([127.0.0.1] helo=lb-oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1mNCad-0003Hf-4s; Mon, 06 Sep 2021 04:15:03 -0700 Received: from aserp3020.oracle.com ([141.146.126.70]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1mNCa9-0003Gi-L7 for ocfs2-devel@oss.oracle.com; Mon, 06 Sep 2021 04:14:33 -0700 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 186B64kA171676 for ; Mon, 6 Sep 2021 11:14:33 GMT Received: from mx0a-00069f01.pphosted.com (mx0a-00069f01.pphosted.com [205.220.165.26]) by aserp3020.oracle.com with ESMTP id 3av0m32fvs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 06 Sep 2021 11:14:32 +0000 Received: from pps.filterd (m0246574.ppops.net [127.0.0.1]) by mx0b-00069f01.pphosted.com (8.16.1.2/8.16.0.43) with SMTP id 1864tcWK022441 for ; Mon, 6 Sep 2021 11:14:32 GMT Received: from out30-45.freemail.mail.aliyun.com (out30-45.freemail.mail.aliyun.com [115.124.30.45]) by mx0b-00069f01.pphosted.com with ESMTP id 3avx3wh758-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 06 Sep 2021 11:14:31 +0000 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 To: Gang He , mark@fasheh.com, jlbec@evilplan.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-Language: en-US X-Source-IP: 115.124.30.45 X-ServerName: out30-45.freemail.mail.aliyun.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:spf1.service.alibaba.com include:spf2.service.alibaba.com include:spf1.ocm.aliyun.com include:spf2.ocm.aliyun.com include:spf1.staff.mail.aliyun.com include:a.hichina.mail.aliyun.com include:b.hichina.mail.aliyun.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10098 signatures=668682 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 suspectscore=0 spamscore=0 impostorscore=0 mlxscore=0 phishscore=0 lowpriorityscore=0 clxscore=274 mlxlogscore=999 adultscore=0 malwarescore=0 bulkscore=0 priorityscore=95 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2108310000 definitions=main-2109060071 domainage_hfrom=8180 X-Spam: Clean Cc: linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com Subject: Re: [Ocfs2-devel] [PATCH] ocfs2: avoid getting dlm lock of the target directory multiple times during reflink process X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10098 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 bulkscore=0 suspectscore=0 spamscore=0 malwarescore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2108310000 definitions=main-2109060071 X-Proofpoint-GUID: r0ofwyTej-cYc0P3Uegmwd5EeKASuBDW X-Proofpoint-ORIG-GUID: r0ofwyTej-cYc0P3Uegmwd5EeKASuBDW 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 _______________________________________________ Ocfs2-devel mailing list Ocfs2-devel@oss.oracle.com https://oss.oracle.com/mailman/listinfo/ocfs2-devel