Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp150802rdb; Thu, 21 Dec 2023 05:36:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IHG6Iu0GEqYcM3nRXEim5GYvMQIqOtk48TAPl8bev1Qn82ZWnP/6VbjZnbbRNuwx4FOSzRz X-Received: by 2002:a17:906:84:b0:a23:499c:75b2 with SMTP id 4-20020a170906008400b00a23499c75b2mr4576617ejc.70.1703165812967; Thu, 21 Dec 2023 05:36:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703165812; cv=none; d=google.com; s=arc-20160816; b=0hcQYkLpNY/glLPtOzrznAwODym1b112m3HhXX/ImHqrc17n95fnjuKBTdXygI6EBC /pdlmJay5Kd+XCn2y7hGT3qq9dTR55OcUk6qITqtvE0+koZyQAQSanKv61IMSjitaRKU ZNYGz+eYkT7CqxrrRoYWJttzaopcmd8Ztjw8TZP4kzfR6P8EWNNHBt1jNEXG2af1PK1I eeaVzK9h8PcifgPxIKyIzXjHY1P2Ef9eOPsZqetKkAOo5btG7lRjR+lnBVTOM0fmhNUI Gm7jfXlVVWS2nD+fDytP4/QrsueoD/Lg/A7jxYbdCybPU8VsxWWvvgstJOAFEsOrFGpB idZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=X8K+OvIZVFEHRX7sH3CruOEYZX1ff0eup403Lbxotk8=; fh=ib4gl95HfLmZdfX9QIMf3rTepWCH9JlNymcDKJTPhJg=; b=GmKRb+QeAa0WsJYwuGzmm+eRQECaSME/K/8BY4ABNHj/TyIIhZaG4Xm0u8Cuc2zx4q EBvH7hzWuau8ljgv2Yo1R+FsZzHVCqqIFhl29pqp1b/iuz8vGUlSq2pQVEhKgaWqEDGn QfM6utKIH89rDjpBPugZj9/OI0scoYyJlJqhWr+PRoyd784eAt0BXCmPuDR2YNZ42TMv SyYi6gED7vRRI8kJRhbXZBVffBa3A9jCjqiFHA4Sq8Ecq8D7XaoWz/DRlxv0esCyOYo1 ZbR0SZrFsvAWOIx8b9WH6Exua53RrFFuUCeQ7tfzonCtUUeRAK9uZBuibR25YzumDu42 VBHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DOIqpvnc; spf=pass (google.com: domain of linux-nfs+bounces-749-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-749-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id lf7-20020a170907174700b00a26ac3034f4si273559ejc.158.2023.12.21.05.36.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 05:36:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-749-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DOIqpvnc; spf=pass (google.com: domain of linux-nfs+bounces-749-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-749-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B7FBE1F2535D for ; Thu, 21 Dec 2023 13:36:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C6D782EC3; Thu, 21 Dec 2023 13:25:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DOIqpvnc" X-Original-To: linux-nfs@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7A4781E3C for ; Thu, 21 Dec 2023 13:25:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1703165138; 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=X8K+OvIZVFEHRX7sH3CruOEYZX1ff0eup403Lbxotk8=; b=DOIqpvnc6Xa25Ls6/OQxl5WYGvIKOXwpirQK1KIAVYLZEGc34231L3yJJnO4AU/S6TiSXB R7SSew9coBMK7BdVNVXfkrg/IDzRGvbk11tewdjeKRpZ+z1lj1ikSVe5QZiY4+hE5iZdRm GW5ruC9LWnTKiMUS0TLHclp1kgRX4G0= 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-39-Xy-IC_YbNmSx5qxFD0MfpQ-1; Thu, 21 Dec 2023 08:25:35 -0500 X-MC-Unique: Xy-IC_YbNmSx5qxFD0MfpQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (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 8C94A85CEA7; Thu, 21 Dec 2023 13:25:22 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.39.195.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACF17492BC6; Thu, 21 Dec 2023 13:25:18 +0000 (UTC) From: David Howells To: Jeff Layton , Steve French Cc: David Howells , Matthew Wilcox , Marc Dionne , Paulo Alcantara , Shyam Prasad N , Tom Talpey , Dominique Martinet , Eric Van Hensbergen , Ilya Dryomov , Christian Brauner , 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 v5 20/40] netfs: Add a hook to allow tell the netfs to update its i_size Date: Thu, 21 Dec 2023 13:23:15 +0000 Message-ID: <20231221132400.1601991-21-dhowells@redhat.com> In-Reply-To: <20231221132400.1601991-1-dhowells@redhat.com> References: <20231221132400.1601991-1-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 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 Reviewed-by: Jeff Layton 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 d08bd37bc3ce..f87193fa0f16 100644 --- a/include/linux/netfs.h +++ b/include/linux/netfs.h @@ -243,6 +243,7 @@ struct netfs_request_ops { void (*free_request)(struct netfs_io_request *rreq); void (*free_subrequest)(struct netfs_io_subrequest *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); @@ -250,6 +251,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); }; /*