Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1062558rdg; Fri, 13 Oct 2023 09:07:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEDNYMztNBsHT1Gx/GiYmomyOF2S/rZ2zjglCzvdLnYqlDyCUzq4SDjLBZN4px1K3lTO8q0 X-Received: by 2002:a17:903:6ce:b0:1c6:d0a:cf01 with SMTP id kj14-20020a17090306ce00b001c60d0acf01mr745510plb.11.1697213247529; Fri, 13 Oct 2023 09:07:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697213247; cv=none; d=google.com; s=arc-20160816; b=Zasazsa/CPHnmhIvn/Ivbh9TXebVJ9ufjEyQlRbQjtxrG8+/x/5bREvZiLZuGcNlSv WeiimhvvRWqV5l3BOTbzB9P316jbaNN3vRd+nfV3gRHgpeSvRB1rA2QhxMZI+NXFtfcV AkYNXqngDaXEkEtT25BzqsvjPaGAYtg0UTRGzglO7VVWXRHqXhKImwqb9DOUpw610eEf HXt4pDyzvmMM7rbWIjm7in0EEXcmRcoXFiDnYK5SszdFjUEmCobbyk2hXvzAwvc9a1Xq GxmBB8tKB0hZVQwYhLObUMI8fFJ+QBfHZsruQOIhbZ7irE4reQKgb9U1Gig9RHLFu8Sy gyMA== 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=Hms+OxujO9sLX9/qumf5gjzFiznbdtqDuL9OGzZ3468=; fh=QCasRecNkSMoqSQLnZiX89u33dCID3L05AOtURpI2pA=; b=WBDMuYGEipx97HkkMIJVWaquJxaFDIu6r1trlykC69EmhGEQHHPBoMyPSlMEXo8hwb aAvfmm17GHBnxwreFcdL6NV3Ce3H+k7ixZihRB2/DABWUhWNyalG9i0y7wkhIB0ouu9Q uSRhqrH9maPk7WgzwCyylz8bzKjioL7wVjjunWEIKALE3GIU7cOQVsygM2f+eKodHW4Y qwPgYgsU/NBs8/NuqTM2KydL0XGKFWf8wZCQEIQITJBt/hE9rTeKrSoapziJKtv4GxpG bz/YK4ITEfYgasR45FDbre7pm2pN5YypWeMTEwlu7vgndooc1ja6Bq2Rao/plo/ilCe0 /LXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JGn3j0+w; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id y24-20020a1709029b9800b001c77172c43asi4358346plp.261.2023.10.13.09.07.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 09:07:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JGn3j0+w; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-nfs-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 lipwig.vger.email (Postfix) with ESMTP id CF878835FD21; Fri, 13 Oct 2023 09:07:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232654AbjJMQHO (ORCPT + 99 others); Fri, 13 Oct 2023 12:07:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232689AbjJMQGY (ORCPT ); Fri, 13 Oct 2023 12:06:24 -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 2D88911B for ; Fri, 13 Oct 2023 09:05:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697213132; 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=Hms+OxujO9sLX9/qumf5gjzFiznbdtqDuL9OGzZ3468=; b=JGn3j0+wdydR/7MdwfOgNLPC1YzGWpOjHZjpnmcFikN/v1qGveyFu4b5le9G1UtYuyeX9l o65oFpdCG6Kan6yFknuL9DxLiwRVExZ0jOHvsKsJq5VdXXYrOXZSGWUR04WVslupTDdB+R Dfa8uXerX7gwMaVA5ak41PACppjogm4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-336-F7n1hDLgPkOovJNiv4j3xA-1; Fri, 13 Oct 2023 12:05:28 -0400 X-MC-Unique: F7n1hDLgPkOovJNiv4j3xA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1006A801234; Fri, 13 Oct 2023 16:05:27 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7CCBB1C06535; Fri, 13 Oct 2023 16:05:24 +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 , Ilya Dryomov , Christian Brauner , 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, linux-cachefs@redhat.com Subject: [RFC PATCH 18/53] netfs: Add a hook to allow tell the netfs to update its i_size Date: Fri, 13 Oct 2023 17:03:47 +0100 Message-ID: <20231013160423.2218093-19-dhowells@redhat.com> In-Reply-To: <20231013160423.2218093-1-dhowells@redhat.com> References: <20231013160423.2218093-1-dhowells@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 13 Oct 2023 09:07:23 -0700 (PDT) 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 cc: 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 4115274e3129..39b3eeefa03c 100644 --- a/include/linux/netfs.h +++ b/include/linux/netfs.h @@ -250,6 +250,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); @@ -257,6 +258,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); }; /*