Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2184594rwl; Thu, 13 Apr 2023 02:55:11 -0700 (PDT) X-Google-Smtp-Source: AKy350ax2BTtyYIlAmSoTZCc60cRGZ9znPA57UrhGqys/RiugXSwP8rKUOEyyCCYhlsk3cAWw7sL X-Received: by 2002:a05:6a00:1a87:b0:63b:2348:e91e with SMTP id e7-20020a056a001a8700b0063b2348e91emr3341643pfv.4.1681379711230; Thu, 13 Apr 2023 02:55:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681379711; cv=none; d=google.com; s=arc-20160816; b=Aw8q1Z2Zisk6j4aV5FfGYLoDAgXznXTN7rNPtyEU3NyQoOT0ohNyAZ70nVOaNbONN4 oHB6NDAxdcjewjSmw27Vaqx1uFlx643dnwB1OIRbH46viuVhDJjL3/+d9uIMZrHwKyim emf9NF36LPCzFisPN7ZxDyAn1hf04hkFJt1vu8PwK8ET7+co4ae0tmo3lQ1PCj3lf3qy 13VWB7Qpk2miP/FxDx35Yg/nj60jD6yPkMAd2JX5vYffEguoxZh2w91ZahmPUcuPyOqb SYEk4zyevIOtJUpLvUFJS9yIdvr7Q9hnHkO/nnejzEkPV3hR3u7ZPMHk6Sz0CKL+16WC xT+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NfruDYUJGVIG1zPkpSOTVqpKuWLeZ6eNv2gEjZGegh4=; b=GQU7TFb0wozOZlMbtTA++0e2A3cdOCz1aYHIqzq9BCvyNUKjzr1lCHGlvxY6VNCIpB nApsZaFYObXlAPDahnaW9Q/SR95prHOx2uCkfp3axjF3Tu6YaO0JXTq5T+P3u8vyhPcX pdDocETmsHjXlUd4scpFBAZJ/p0sL+ftgGpUp278nW829C5QLF3BLd2ArxR1+MKm+TGU WquVZILf2dpq8IstAGGj1CA6dIFsoqjJYkbQF4Qz9fsqFfyvQy6b6ELbaz3w5b59gJdG MTc8A0bxqqDPcC/H+dQkqZkZVuz4q7YPyUZVrBTcRS0kpfrdeIu1YpyW6qytVnttOJpA qnew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dJ4W4Ln0; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h10-20020aa79f4a000000b0063811bd03e7si1503268pfr.185.2023.04.13.02.54.56; Thu, 13 Apr 2023 02:55:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dJ4W4Ln0; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229949AbjDMJwS (ORCPT + 99 others); Thu, 13 Apr 2023 05:52:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229722AbjDMJwQ (ORCPT ); Thu, 13 Apr 2023 05:52:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F65293FE; Thu, 13 Apr 2023 02:52:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 448AC63AD4; Thu, 13 Apr 2023 09:52:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FF22C433EF; Thu, 13 Apr 2023 09:52:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681379527; bh=tOciDCp8qi8DHPLg2Ate0CMyTYDMlL8JRb3MMdcifxI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dJ4W4Ln0REqvIdNrpovgLlnuk9oU7FpEW+l215+FxemvQCDTCDt0P1IAtJkP079HW RpWSPVZLFXztDQmqHoAUVkkFdMbF13Uz5VCLBNgLY3V58BzIVnzv0HXLNKb94Ok/Nn eZyVT9IU7ZVIFcO4+9rplOiGO9VYNo07Zci20JC7byCCqijpXc2nBiowc2rnP2UUjh gdEw7wIbkmNp29YuwQndSHIY99YKj4Ld4RGSswaQ7LT6pTsgOec5ekfGblU6bsWni1 osdFq+a+q6rHBX2U20sIBhVjZb9uxxR44NPQjH/y4pq7CpFLwfCuMw1jqTTyHQFly5 h8ewOnUYYkTeQ== Date: Thu, 13 Apr 2023 11:51:59 +0200 From: Christian Brauner To: Christoph Hellwig Cc: Matthew Wilcox , "Ritesh Harjani (IBM)" , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, Jan Kara , "Darrick J . Wong" , Ojaswin Mujoo Subject: Re: [RFCv2 2/8] libfs: Add __generic_file_fsync_nolock implementation Message-ID: <20230413-gewichen-ziehung-3ced0ad0982b@brauner> References: <6fad2ec25bccbbb9b3effbd18c2d6d6965b9a33c.1681188927.git.ritesh.list@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Apr 12, 2023 at 04:43:03AM -0700, Christoph Hellwig wrote: > On Tue, Apr 11, 2023 at 01:33:17PM +0100, Matthew Wilcox wrote: > > On Mon, Apr 10, 2023 at 10:27:10PM -0700, Christoph Hellwig wrote: > > > On Tue, Apr 11, 2023 at 10:51:50AM +0530, Ritesh Harjani (IBM) wrote: > > > > +/** > > > > + * __generic_file_fsync_nolock - generic fsync implementation for simple > > > > + * filesystems with no inode lock > > > > > > No reallz need for the __ prefix in the name. > > > > It kind of makes sense though. > > > > generic_file_fsync does the flush > > __generic_file_fsync doesn't do the flush > > __generic_file_fsync_nolock doesn't do the flush and doesn't lock/unlock > > Indeed. Part of it is that the naming is a bit horrible. > Maybe it should move to buffer.c and be called generic_buffer_fsync, > or generic_block_fsync which still wouldn't be perfect but match the > buffer.c naming scheme. > > > > > > > +extern int __generic_file_fsync_nolock(struct file *, loff_t, loff_t, int); > > > > > > No need for the extern. And at least I personally prefer to spell out > > > the parameter names to make the prototype much more readable. > > > > Agreed, although I make an exception for the 'struct file *'. Naming that > > parameter adds no value, but a plain int is just obscene. > > > > int __generic_file_fsync_nolock(struct file *, loff_t start, loff_t end, > > bool datasync); > > While I agree that it's not needed for the file, leaving it out is a bit > silly. I think we should just be consistent and try to enforce that the parameter name is added in new patches. It's often easier for grepping and there's really not a lot of value in leaving it out in general.