Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2548247rwd; Mon, 22 May 2023 00:01:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6jBOD1OUoFHp9H51gwm/SmaVtgqXnolIC5c30VLS8evdNFkwK5/OG7JpBBiAarFJJ33YVw X-Received: by 2002:a05:6a21:788f:b0:10b:7400:cef7 with SMTP id bf15-20020a056a21788f00b0010b7400cef7mr2937586pzc.17.1684738887814; Mon, 22 May 2023 00:01:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684738887; cv=none; d=google.com; s=arc-20160816; b=1Ckqqc0DWapy4TfT0f94lg96kpdYE5nopowm9ezqURUnUXLt59HIA/E+RPJT9FywW8 lJeWPLdErfq2J9vUjiTqhO6u6tYBgB96+AU8CYFUreTWYs3uGMRoVNpmbGoIADpsMXQB ZEjrMQj4HZbWCuxIIavYXezR/dy9cw9zRC7s0bauz0OJ61cY5Bru21TG/IOYprFIFqbl 0DPZ5u4Fq42GHEU9wy0Il6lgrKLDBSLbGAwBd724xcKE4mhEuwyH1nmWU16HKmwY5G1n NLRNzpQvbtdefG//hEywD83E1tXDW5hL/MNyY8m1ftQgIWh9aBdXelAjv3NsLycfF6Cm kbQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-transfer-encoding :content-id:mime-version:subject:cc:to:references:in-reply-to:from :organization:dkim-signature; bh=WPmCmuYomWuJ+5LnnTa+OzAzhut1gbOGrEeSAMZunF8=; b=PLYNVhNucAFSPX3lnCan9ynhMQ/Uzl6bco0EACqXm5dG8uxwsUiSO52PVbP0A3F0Ei /hoJR0CEkIeHZEVEEq66kYW8VAYo2vmw2unzxYgUIuC8y8t4PX60ZBTuMGWjR9hEhb8P srl0TD+0UF+gQhHMj1ZPsoPYpjj6nGt0I8091ARpiaqzi8Q0Alzjl+HySncnbfgzrnF+ UKamckSvoN/JtXoYWwqhEzy5xUA413UQerHpAc8yGdvDepx1KvMaWG70bULzr5zwE5S6 n283AhWt8q96+62O/eeICEA3+NKXYj8G4y3drA5RgqA/zi601fxEuMpdfbVNPhsjEitG 3pnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VPWN+RJT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s30-20020a63925e000000b005303a66d415si4391887pgn.405.2023.05.22.00.01.12; Mon, 22 May 2023 00:01:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@redhat.com header.s=mimecast20190719 header.b=VPWN+RJT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232233AbjEVGym (ORCPT + 99 others); Mon, 22 May 2023 02:54:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232018AbjEVGyP (ORCPT ); Mon, 22 May 2023 02:54:15 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F48B19A3 for ; Sun, 21 May 2023 23:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684738206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WPmCmuYomWuJ+5LnnTa+OzAzhut1gbOGrEeSAMZunF8=; b=VPWN+RJTT0u5G3YhqHIs5bDv6Py8R1kyX5Mqv0UFRMuQWDj/Ne4h8dQ0dHEa0+MgJJ2F06 uQHFHKOxB/QRlrRl/gtiXIEhLXTHzpUGI0QoR/1chIRkIobgqVechgTynXYqyMiJw/GFQe pIbuw1mfqueD/a0kwpNgBkBqzrNQ+68= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-308-o3bjNUnbPDuBiGmpC7NUHw-1; Mon, 22 May 2023 02:50:03 -0400 X-MC-Unique: o3bjNUnbPDuBiGmpC7NUHw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5281C3828894; Mon, 22 May 2023 06:50:02 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.39.192.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 58B271121315; Mon, 22 May 2023 06:49:59 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <376ab23b-52d0-d7fd-2dd9-414cbb474e01@linux.alibaba.com> References: <376ab23b-52d0-d7fd-2dd9-414cbb474e01@linux.alibaba.com> <20230520000049.2226926-1-dhowells@redhat.com> <20230520000049.2226926-23-dhowells@redhat.com> To: Joseph Qi Cc: dhowells@redhat.com, Jens Axboe , Al Viro , Christoph Hellwig , Matthew Wilcox , Jan Kara , Jeff Layton , David Hildenbrand , Jason Gunthorpe , Logan Gunthorpe , Hillf Danton , Christian Brauner , Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Christoph Hellwig , Mark Fasheh , Joel Becker , ocfs2-devel@oss.oracle.com Subject: Re: [PATCH v21 22/30] ocfs2: Provide a splice-read stub MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2414054.1684738198.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Mon, 22 May 2023 07:49:58 +0100 Message-ID: <2414055.1684738198@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org So something like the attached changes? Any suggestions as to how to impr= ove the comments? David --- diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index f7e00b5689d5..86add13b5f23 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2552,7 +2552,7 @@ static ssize_t ocfs2_file_read_iter(struct kiocb *io= cb, * * Take and drop the meta data lock to update inode fields * like i_size. This allows the checks down below - * generic_file_read_iter() a chance of actually working. + * copy_splice_read() a chance of actually working. */ ret =3D ocfs2_inode_lock_atime(inode, filp->f_path.mnt, &lock_level, !nowait); @@ -2593,7 +2593,7 @@ static ssize_t ocfs2_file_splice_read(struct file *i= n, loff_t *ppos, (unsigned long long)OCFS2_I(inode)->ip_blkno, in->f_path.dentry->d_name.len, in->f_path.dentry->d_name.name, - 0); + flags); = /* * We're fine letting folks race truncates and extending writes with @@ -2601,10 +2601,10 @@ static ssize_t ocfs2_file_splice_read(struct file = *in, loff_t *ppos, * rw_lock during read. * * Take and drop the meta data lock to update inode fields like i_size. - * This allows the checks down below generic_file_splice_read() a - * chance of actually working. + * This allows the checks down below filemap_splice_read() a chance of + * actually working. */ - ret =3D ocfs2_inode_lock_atime(inode, in->f_path.mnt, &lock_level, true)= ; + ret =3D ocfs2_inode_lock_atime(inode, in->f_path.mnt, &lock_level, 1); if (ret < 0) { if (ret !=3D -EAGAIN) mlog_errno(ret);