Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5654902rwl; Tue, 11 Apr 2023 08:16:06 -0700 (PDT) X-Google-Smtp-Source: AKy350YdUFCsxGUKtgqLs0dODQPrC2ubjzMkeLKmsCm86td/ZbiQa9ojnHt3zqodtBQ7Vkt2+ktH X-Received: by 2002:a17:906:17c9:b0:92f:7c42:8637 with SMTP id u9-20020a17090617c900b0092f7c428637mr13184039eje.30.1681226166175; Tue, 11 Apr 2023 08:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681226166; cv=none; d=google.com; s=arc-20160816; b=GBoK2Z99GLj3h7wrwbexqP4KFoy0YmVXR7egT9BIL7KNlDoRW9qyVp4Us0/Vh/uYcH 7q/1U9f9geNastVFAMZCanZ6hT4ucPjULnc8lQ69+KKO1urKMcA5Hu6OsUueYnCHAUBX +7QuanUrQoxWi+q/XlmeNWjJD2lReOWuwEBCrJiimZmoKlGSeuL8v+1Nk2ZwnG8w0irj PCM6zAvHf74hfr3zuCCkLBQnKCJQItHrH/p97kbRiFVtoXMcviOiPJiwYe/txe+IiJYI 7rjAoF/YQMYgxNwrdWTyXw6RU8af9FC62eHy1z0Yh4H49ec8+X0jBekDnV/FdZo+DFBb xW8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:subject:cc:to:from:message-id:date :dkim-signature; bh=9o0AHkisQOv5tXi4eDVw+mqq4mAfpkhDRa5S3sXV+aI=; b=XrE+AHML6o2HMbmQP0xWOB5MatC2yZ0jzOj1IKQdeBqG3wgfwU12jJ20MBQgk+Tf2U 0DaoYlVEnaKhFYlLRQo/jNxTgtTAhSY87TJ1iDMIOW4Kpz/4Orb3GQMCUdGbE7qIoa8H l9Q+JuAHFHEJuDilaINZ32mwNUZq+yvp/MdXFUpSZZhiMIXrNq2L0P8QTDRuUWEEryQZ zonmH/gueuYuSeejOaKPCq50g0BMv1vlqQQozkF8PjuM2fD6Qf2Rn84akP+NsHNnc4dZ j7C2hckUIjBVsepaxTzsLfgQmZ+jKi3dkjE1ttTbnPxpwb95b9AE9GnZmMdLwEUI6MZw wu3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=C5n7WD7T; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qm13-20020a170907674d00b009334769e7ebsi408301ejc.790.2023.04.11.08.15.33; Tue, 11 Apr 2023 08:16:06 -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=@gmail.com header.s=20210112 header.b=C5n7WD7T; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230484AbjDKPOT (ORCPT + 99 others); Tue, 11 Apr 2023 11:14:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231259AbjDKPNm (ORCPT ); Tue, 11 Apr 2023 11:13:42 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7B49526C; Tue, 11 Apr 2023 08:12:36 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id v9so13623453pjk.0; Tue, 11 Apr 2023 08:12:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681225954; x=1683817954; h=in-reply-to:subject:cc:to:from:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=9o0AHkisQOv5tXi4eDVw+mqq4mAfpkhDRa5S3sXV+aI=; b=C5n7WD7Tx+rIWnaesEt2bqaEUma73ExoLTIxbxrTjJQ63PMsQF26lv1ghrOl4kB3NU SKmnroRrgJT8PLMeIiZURZp9zXzLuZNsNtn8K+gW7pen6QTbQT+5UJ6fIocEcuhuIaRx 02fKZonpTwpTp1CeFewx4AKaCw+cuM5kgVecYT/78Ug9N0hmqkh+Z3qM4i8L/d8mMLmm lhUUvsauzPtBhlBDF9uAbky6gUEvmPUBVVlfzBZ1IcVRDgxLrEuIZ8paJCVXQ0zW1Ssr JnMrewbgocXQpCeLrvNEoR/aIwqXXvgPKnFubepSi4ndDUwrXSM/D26GIIEf3okekO+g svtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681225954; x=1683817954; h=in-reply-to:subject:cc:to:from:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=9o0AHkisQOv5tXi4eDVw+mqq4mAfpkhDRa5S3sXV+aI=; b=qnVaW9n6fwuv0zFPkfqxBPbEjI8Q7JyuwYapmBq3y5vz/DZ3xO1tss7mzseLtvAr4S m6coYRuRxeIknYCz5G/2NVWzUfogMwc9TXEyN7WfXagxrjJK5PdXNev6aD1fyqgc7/ol rC9QMM4hOBbMHrlHjXqSS7P70Zy7sQkxWtEWwSA5lCzFuvVGxH3oh1LPB31GE4g+imjQ /vNF3Z2Ka6W40Fysbz89JpUQKHYdYRiDqNpk31iQH1MQocpRRj7b4rOIf6Fc/7SpS9+6 nVrODru/VJorYZDOtiQWiAqvDBm+K9/70FvC/G3bEAxtIrzK4fevaKYgfOsnzN92b/N0 Fc5w== X-Gm-Message-State: AAQBX9ci2z+SXUxKevCqvVQUcyMFClPALnnvEf4UJGq465DleCxe+ddq uv68E7rU0IM2RHqxwG0a868= X-Received: by 2002:a17:902:fa8e:b0:1a6:4e86:6ca1 with SMTP id lc14-20020a170902fa8e00b001a64e866ca1mr2848132plb.9.1681225954165; Tue, 11 Apr 2023 08:12:34 -0700 (PDT) Received: from rh-tp ([2406:7400:63:7035:9095:349e:5f0b:ded0]) by smtp.gmail.com with ESMTPSA id e4-20020a170902d38400b001a651326089sm2109049pld.309.2023.04.11.08.12.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Apr 2023 08:12:33 -0700 (PDT) Date: Tue, 11 Apr 2023 20:42:28 +0530 Message-Id: <87zg7ezc4j.fsf@doe.com> From: Ritesh Harjani (IBM) To: Matthew Wilcox , Christoph Hellwig Cc: 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 In-Reply-To: X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Matthew Wilcox writes: > 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 Yes. > >> > +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) Sure. Will make the change. -ritesh