Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5438442rwl; Tue, 11 Apr 2023 05:37:25 -0700 (PDT) X-Google-Smtp-Source: AKy350aH/0sIFdJHqOCNlFvTT4uqAbZFo5Gjzcqd8xawc5ig5hL70G401ixYZ9MJRi3BVA9O/WpM X-Received: by 2002:a17:906:68d3:b0:94a:8ada:d109 with SMTP id y19-20020a17090668d300b0094a8adad109mr5950008ejr.77.1681216644943; Tue, 11 Apr 2023 05:37:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681216644; cv=none; d=google.com; s=arc-20160816; b=ivwYpT45l1N9j54EXZqiHE9x4Vwsam07oRDX6I1oghJRo2Agdio9/nyM1RmtG+gCjp UsqWk1uwV8vXpRsMeRSFEF+OVY9jQm/Bex26wvVx7vcXGzbOwQNiSL2egpW4exeNcG8p W/mj+EYzHYo0IGOZo/PcAM+RN2roD6gimTgXQYKANhmloVfj2gDP5a46c5ZyzOiip4H6 JuH29V5CaFoyiNTGC9S2/3oL0/gQX0PbMo1UlP4m+C8j+PhBP6WNYg8nmkvNXzYX0BLC KgZrUWiRcIqUJCTJrYAp10NCZUTrwEzPcsA8l25PLXVnTygTOSj+b0jSGh08ZHY6T+T5 BWEw== 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=G1Acalzr88ZqqPHx98X1fWhGAgT2HLaxE6Li8jbXb70=; b=tmrXGcujme2z47pW1sYLpp0/mlj0pBLeLi4hQ9FcuQHljyJ1ZVRA77dJcXBAjmxN9M IhisueueAe2codPUwF6COlZ02n73w0U1q/afYLoFrcYgeENsYWnUqPdv828b+LviiNV1 xrY8bye6RVHSEKKLxzlQ/GHMcwuFgV7DiVP1pjicjhdG79GWYEE/ZwwHjVZWf+jDYGen 06wfeoKDOJkX859Mzy8pHzdxKr/IqNuZt6+QH7sfbmB2mUeB7YaCbWCqynx+xr3lYkh0 ze93RXbdGhdWX+t3u+VtLwP1U6im/FrlBg1gKsAY1V7W3G9zFOPIYlhwtW/m7bRsgrxE JfvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=FlUh03J3; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v16-20020a17090610d000b00944041f6c81si1770495ejv.476.2023.04.11.05.36.54; Tue, 11 Apr 2023 05:37:24 -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=@infradead.org header.s=casper.20170209 header.b=FlUh03J3; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbjDKMdY (ORCPT + 99 others); Tue, 11 Apr 2023 08:33:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229652AbjDKMdX (ORCPT ); Tue, 11 Apr 2023 08:33:23 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6952A2D6B; Tue, 11 Apr 2023 05:33:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=G1Acalzr88ZqqPHx98X1fWhGAgT2HLaxE6Li8jbXb70=; b=FlUh03J3Bp75ls7S0aE+bNLgK1 35UunEpUktNDfNJ+l6h7I2i8a2OQWOdmxIKBSDF+86J4CKMIjD9XZKSkqGk1uHAdr59iDuDVfHh1O K4l55jpD7SOq5Z+HYQ9S2pxSwT/sXg2fgZf8mN5bCl1ZjjG/nwEV1hGwUoS+0u5NtzDKW7MRT7vw2 d6okRJoziYSGx+ICCPYRgK6S6LB0pjdhpBCqMak5I883N1qIdlxgJqYg9ZZC2SDDGAc+b29PUid/T AYNXNlhHBg2k5S7XO/vtBMDJvb/VFpmjDzjffpdpgA8/xgqgxF5MsqmwuJz/h3UQQGMaw52k9ltyH QcZyukyA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pmDBV-005tl6-F1; Tue, 11 Apr 2023 12:33:17 +0000 Date: Tue, 11 Apr 2023 13:33:17 +0100 From: Matthew Wilcox To: Christoph Hellwig Cc: "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: References: <6fad2ec25bccbbb9b3effbd18c2d6d6965b9a33c.1681188927.git.ritesh.list@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 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 > > +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); (yes, the other variants don't use a bool for datasync, but they should)