Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp554361ybc; Sat, 23 Nov 2019 03:52:38 -0800 (PST) X-Google-Smtp-Source: APXvYqyBEOBREJg+d+vjsVUo4edhOqmzuVMgUEmoBrPEIa1zfTXgJ8eGgUwPH8z2OlkTFwYb7RPK X-Received: by 2002:a17:906:76cf:: with SMTP id q15mr9788208ejn.247.1574509958887; Sat, 23 Nov 2019 03:52:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574509958; cv=none; d=google.com; s=arc-20160816; b=NVuZmoK+OuPBgZxvovnR/Xig1+Mf1d4jwbmC1S/Q3EEuE5vNq1TDXWmLf0HbZQK+6m DgvZJ+3YIJZecaFiGck1OVpzlC+jokk8tQjmWuKB9vuc3qyrxYiGyj4sQWZvMQSHM3g2 xsasnF1uw2zKnKnAAJYjCIQKURUBNXnVnh2zCEvJMD7u84JyKwwxPJP171S8HyLCv6MZ UpIwivPD7fukUOKggkUSadjyH1JxXejZQtWxf/m37PwiDJBM82xVt9OGXftSxNhSeAkJ wcnJwiYGpq57xY5sh3JNw5bCMfjOSh73vSVTjm1FD+Y6FNshkUsRzWaIhvBtSkIT5WTe Y7Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject; bh=phGdf4shCPpXfChHrs//uuJK2/3DNyZ1D8iLBQdNsco=; b=y1HjvQXgwrOawhyg68atXYy9+oyjKOkZEwLZXeXw4A8rUvDKWGmDkNa02nWWVmv73c waBiZaBgq8FFroyMcxnHR7LmKLTya2EsPwMmV85mpwihVp+trbDoVjvZgBX3h5R5uRyu N03QGuwuBOj/XZjdKtm/MuGxOO+osfpGFpVNghx6wNirZBBvsw70Bg9dJc6kZ1r2UqaW TEPjusC91AbNTsMis5i9vgYoJXWszf8U0sEr+g/WZA0H6Q9BXI9AQETai+lT9GjLpIBg Z+PC9yShC6itx4ac/JgHjKqjL8aVroDolnUwt/Eq5w/LcoH/7Vd94FRi4D3vX3LGeckp iKOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n25si633823ejc.180.2019.11.23.03.52.03; Sat, 23 Nov 2019 03:52:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726488AbfKWLv5 (ORCPT + 99 others); Sat, 23 Nov 2019 06:51:57 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:20128 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726451AbfKWLv5 (ORCPT ); Sat, 23 Nov 2019 06:51:57 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xANBpfiH064389 for ; Sat, 23 Nov 2019 06:51:53 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2weysvdjtx-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 23 Nov 2019 06:51:53 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 23 Nov 2019 11:51:52 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Sat, 23 Nov 2019 11:51:50 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xANBpnYK58458236 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 23 Nov 2019 11:51:49 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1A23F5204F; Sat, 23 Nov 2019 11:51:49 +0000 (GMT) Received: from localhost.localdomain (unknown [9.199.55.140]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id BC07652050; Sat, 23 Nov 2019 11:51:47 +0000 (GMT) Subject: Re: [RFCv3 2/4] ext4: Add ext4_ilock & ext4_iunlock API To: Matthew Wilcox Cc: Matthew Bobrowski , jack@suse.cz, tytso@mit.edu, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org References: <20191120050024.11161-1-riteshh@linux.ibm.com> <20191120050024.11161-3-riteshh@linux.ibm.com> <20191120112339.GB30486@bobrowski> <20191120121831.9639B42047@d06av24.portsmouth.uk.ibm.com> <20191120163500.GT20752@bombadil.infradead.org> From: Ritesh Harjani Date: Sat, 23 Nov 2019 17:21:46 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20191120163500.GT20752@bombadil.infradead.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 19112311-0008-0000-0000-0000033682B2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19112311-0009-0000-0000-00004A55B2F5 Message-Id: <20191123115147.BC07652050@d06av21.portsmouth.uk.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-11-23_02:2019-11-21,2019-11-23 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 suspectscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 clxscore=1015 bulkscore=0 mlxlogscore=734 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1911230098 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 11/20/19 10:05 PM, Matthew Wilcox wrote: > On Wed, Nov 20, 2019 at 05:48:30PM +0530, Ritesh Harjani wrote: >> Not against your suggestion here. >> But in kernel I do see a preference towards object followed by a verb. >> At least in vfs I see functions like inode_lock()/unlock(). >> >> Plus I would not deny that this naming is also inspired from >> xfs_ilock()/iunlock API names. > > I see those names as being "classical Unix" heritage (eh, maybe SysV). > >> hmm, it was increasing the name of the macro if I do it that way. >> But that's ok. Is below macro name better? >> >> #define EXT4_INODE_IOLOCK_EXCL (1 << 0) >> #define EXT4_INODE_IOLOCK_SHARED (1 << 1) > > In particular, Linux tends to prefer read/write instead of > shared/exclusive terminology. rwlocks, rwsems, rcu_read_lock, seqlocks. > shared/exclusive is used by file locks. And XFS ;-) > > I agree with Jan; just leave them opencoded. Sure. > > Probably worth adding inode_lock_downgrade() to fs.h instead of > accessing i_rwsem directly. > Yup, make sense. but since this series is independent of that change, let me add that as a separate patch after this series. Thanks for the review!! -ritesh