Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1947663rdb; Thu, 7 Dec 2023 13:25:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IFXYgT+MrWZdy9s4PRdJlc7pvXlelegtq0bntw3DwFwGSKJtiOTQbHps6kPd2DhHVpznomc X-Received: by 2002:a17:902:ab54:b0:1d0:acfc:a662 with SMTP id ij20-20020a170902ab5400b001d0acfca662mr2752297plb.123.1701984324615; Thu, 07 Dec 2023 13:25:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701984324; cv=none; d=google.com; s=arc-20160816; b=xJDljflhOsMaEijBvNdtfY/Z7IT/o6ecuFrbcmajPmQwbyP6h8WNrjn7hBDmtRub1O JbuPIKjRDkvMXpnWwpVaZRrSiYHE+PYTu+UtmiOup2H1ruVnQqinAyYDdAWrSih7OOO+ GaoYkUH4tFpPCel1I+OwpzU+H2V5QN36rKRLV4HNCmNqExCdXkZCGrNcjKSXq9iVj49k z659150QyKjgvYCMa/xaOD4qFXohlp/kfyK5oJyCEVKRf8RUXBMeoEbsgXpY0HcFu0wW EMtjzlFwpjyeNdVCdYlUu4HbF6S82Bo3yvvM/7ZBSOtYeeBGx25ajxkpCDrjqmJQqy7/ jPag== 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=VpkcpqQGFjGGotXxykSSFj/z2Mj8Id/3cGjDF6fP5aE=; fh=ib4gl95HfLmZdfX9QIMf3rTepWCH9JlNymcDKJTPhJg=; b=LXNoNNAbACxCLdtdWO5A9no1RlPXmyXRNWkB/Hcvt51WbBlbCvzt5UoH3O3TR7ad6U HRbwHBvoYZIIFNZjtz0Nd0dWMBPtHTFdILkMTzJd1fjU6w1BaSNnQmhuBpJdyWMtRWVp AdBYuTNExiqMd2ZHC2cpp1+AJ0f1+w9d0brw+mXpyq46bmIqYgQbwEDmd9K7GDhEQlJP lgSfw9TqMe82mwyFM3n5BYLZTw/p1XJxs1LbPj4jUHoKTA1t97mBBJ4FT5H0rqppB+VW 9aWG65Gss4DVIEUvpbMN4MHky7ujdTZMHN3TXlOiBcWDaIDrEGMz1IH0EevtffrQeVNv UYdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=X9fFBNN9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id c16-20020a170903235000b001d08a8c56a7si358061plh.279.2023.12.07.13.25.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 13:25:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=X9fFBNN9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 20E6E832A074; Thu, 7 Dec 2023 13:25:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235697AbjLGVZB (ORCPT + 99 others); Thu, 7 Dec 2023 16:25:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235586AbjLGVYi (ORCPT ); Thu, 7 Dec 2023 16:24:38 -0500 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 34DBB1BD2 for ; Thu, 7 Dec 2023 13:23:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701984206; 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=VpkcpqQGFjGGotXxykSSFj/z2Mj8Id/3cGjDF6fP5aE=; b=X9fFBNN91kUJalhMlDl8LoMUN0A+1TkTqIdBnZIGfWRqT6V2Vw5472K/McR6pSp3tH8Rd8 LNu7qeNyM0xUxxuLyYNyeXnfh2OmnImliP0UfK6Hlc4XIOWlBxO4jdYzlmKL8PnJqKa2PM lMFiYJc8tnSqP3An3+CEiOIHzuFBi/o= 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-318-sXfvH7bCOUSVW6S8yfXyow-1; Thu, 07 Dec 2023 16:23:22 -0500 X-MC-Unique: sXfvH7bCOUSVW6S8yfXyow-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 21A79185A784; Thu, 7 Dec 2023 21:23:21 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.161]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5C37740C6EB9; Thu, 7 Dec 2023 21:23: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 v3 20/59] netfs: Add a hook to allow tell the netfs to update its i_size Date: Thu, 7 Dec 2023 21:21:27 +0000 Message-ID: <20231207212206.1379128-21-dhowells@redhat.com> In-Reply-To: <20231207212206.1379128-1-dhowells@redhat.com> References: <20231207212206.1379128-1-dhowells@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 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,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 morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 07 Dec 2023 13:25:22 -0800 (PST) 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 fce7a5a86e8e..a14af93efccf 100644 --- a/include/linux/netfs.h +++ b/include/linux/netfs.h @@ -245,6 +245,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); @@ -252,6 +253,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); }; /*