Message ID | 20231117211544.1740466-17-dhowells@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp818474vqn; Fri, 17 Nov 2023 13:18:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhHJZk3QOyMbUjhFlVzl1Yj0MqS8V6X8JXCkuLv2fzH1a63MGRpyB6BVm3Vs1BBMbCiaGW X-Received: by 2002:a05:6a00:a1b:b0:68f:ecb9:5fde with SMTP id p27-20020a056a000a1b00b0068fecb95fdemr833448pfh.34.1700255884447; Fri, 17 Nov 2023 13:18:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700255884; cv=none; d=google.com; s=arc-20160816; b=eKGczV5mHpelKzlpwOc0rkWmJGlM5wro0rgvWh5u+fauteN/mDzetK5P4EW3jAIdd7 dzLbtd2SCO/mVWZ2GDZqAPhQynYkx+OF4Enw7Ixq8TBz9c4f8VOTC23x9zy7BsBUNhWE EOy2gWNQm+DGaNZr/sb15riFtOVJrUZo3f6jpAghe069EqoGhrVCc6C7x2b19BUff04p agOYWr1pz7Icz4+AB5PbH78r1aHKaa0WuA3sxsc5GzC20Tq4JoZotpIIAxjpRCLmK+Bm FgAtkI3InqOF3d8XdbDjhnfx8Fyu2ZECJTudhW3zVw+TS3QJIauW+LABB6eHOCJJ9Fg9 Vl4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/h/RtPpFFvVcBRZ5JrGbnLPxoOOyaaScpnNAYMwDAl8=; fh=lVY/c7gYUTDnyYYKKvGQU3Q29dA69hck6eN/HP5dBQ0=; b=vTx5n2hiuZJdSvOVtNiOHENwNqChvORCpOYlA2HDyvdFKsrFUsUoHcPsLFMyh1hEhU 7RrUfn02e7yiQMwDA6fnmTVYoMOde51Jd6pIPvYhKanr8oYWz9stAJJRmqiBN5ov2DDJ Y7fJLAwAH49A2bDRHED7gmME0JTdzMzjcbTIcD7790jl2oEEjdyyIghM+KvQfpVRL82q NUCfS5V77UcDzO3Y5SjBSiLRjom0hPhNfdzaAs3M4GnMehz6ekrwQT7DtczGije2yrc6 BsCZWWaTLwsePOqI4JuVqS2yWfmNjZGW/hacVKurxUkd/GUqc12a+0FKl7pSuGFBAZIG oyyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GL7iSqCE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id 23-20020a631657000000b005b8ee1c0c68si2589595pgw.605.2023.11.17.13.18.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 13:18:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GL7iSqCE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9492C82BB550; Fri, 17 Nov 2023 13:18:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346384AbjKQVRt (ORCPT <rfc822;jaysivo@gmail.com> + 29 others); Fri, 17 Nov 2023 16:17:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346281AbjKQVRW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 17 Nov 2023 16:17:22 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1129019B2 for <linux-kernel@vger.kernel.org>; Fri, 17 Nov 2023 13:16:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700255808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/h/RtPpFFvVcBRZ5JrGbnLPxoOOyaaScpnNAYMwDAl8=; b=GL7iSqCEC/T6IEm2DAVh0FDkV9gQtrNOJppzKWKOIfOIzujT3ofXDeysESBka87r/uNueY eGRaYDFGHGFSFryOc875U9opO5CwiJUzTa2c9O9XiwufTNAJTJ+SmEsKNd00SEyGmBY412 xGW/xsyimWrBYoqNXTudEa2hXvMMVsU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-693-mgGBp15dO3CSvbe2TYPwvg-1; Fri, 17 Nov 2023 16:16:44 -0500 X-MC-Unique: mgGBp15dO3CSvbe2TYPwvg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2FB708527A9; Fri, 17 Nov 2023 21:16:43 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 929962026D4C; Fri, 17 Nov 2023 21:16:40 +0000 (UTC) From: David Howells <dhowells@redhat.com> To: Jeff Layton <jlayton@kernel.org>, Steve French <smfrench@gmail.com> Cc: David Howells <dhowells@redhat.com>, Matthew Wilcox <willy@infradead.org>, Marc Dionne <marc.dionne@auristor.com>, Paulo Alcantara <pc@manguebit.com>, Shyam Prasad N <sprasad@microsoft.com>, Tom Talpey <tom@talpey.com>, Dominique Martinet <asmadeus@codewreck.org>, Ilya Dryomov <idryomov@gmail.com>, Christian Brauner <christian@brauner.io>, linux-cachefs@redhat.com, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 16/51] netfs: Add a hook to allow tell the netfs to update its i_size Date: Fri, 17 Nov 2023 21:15:08 +0000 Message-ID: <20231117211544.1740466-17-dhowells@redhat.com> In-Reply-To: <20231117211544.1740466-1-dhowells@redhat.com> References: <20231117211544.1740466-1-dhowells@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 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_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 17 Nov 2023 13:18:03 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782847514236090193 X-GMAIL-MSGID: 1782847514236090193 |
Series |
netfs, afs, cifs: Delegate high-level I/O to netfslib
|
|
Commit Message
David Howells
Nov. 17, 2023, 9:15 p.m. UTC
Add a hook for netfslib's write helpers to call to tell the network
filesystem that it should update its i_size.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
---
include/linux/netfs.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/linux/netfs.h b/include/linux/netfs.h index 62b768260eda..21650db7da54 100644 --- a/include/linux/netfs.h +++ b/include/linux/netfs.h @@ -248,6 +248,7 @@ struct netfs_request_ops { void (*free_subrequest)(struct netfs_io_subrequest *rreq); int (*begin_cache_operation)(struct netfs_io_request *rreq); + /* Read request handling */ void (*expand_readahead)(struct netfs_io_request *rreq); bool (*clamp_length)(struct netfs_io_subrequest *subreq); void (*issue_read)(struct netfs_io_subrequest *subreq); @@ -255,6 +256,9 @@ struct netfs_request_ops { int (*check_write_begin)(struct file *file, loff_t pos, unsigned len, struct folio **foliop, void **_fsdata); void (*done)(struct netfs_io_request *rreq); + + /* Modification handling */ + void (*update_i_size)(struct inode *inode, loff_t i_size); }; /*