Message ID | 20231221132400.1601991-21-dhowells@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-8468-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp414439dyi; Thu, 21 Dec 2023 05:37:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IEBWaoRGzmD6ABTA5dPqlArGuAZTwx5BfqI0sJ5mDWb/cgHpevUMP0DIR9yFX7w/l2u2B8c X-Received: by 2002:ac2:4e0e:0:b0:50b:f873:3197 with SMTP id e14-20020ac24e0e000000b0050bf8733197mr14026013lfr.131.1703165876498; Thu, 21 Dec 2023 05:37:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703165876; cv=none; d=google.com; s=arc-20160816; b=NBbcTtxxR2nXcwpYfmmPYYXrAZQh4Fc6t12dyQ3dnHZEjeOCCXRwlw7EIbJ5bSjfY/ JmTiMANXW/W9E+IsotkT9OQpgYsj35A1ayve+fOKJVxT9/0ymbdtKvo4Bpm4b+JnePiz uS12YDl4C1jAgxNzgKDRpD2hWCcRnmuoNLPiUjQIBmgfIcO0LtLFl9LFJcORU75daZR8 yZUqzKUQ4H2kfPi/k4MKHtObjCZpfIfJfgVTWWZCzHTod9v+H8iC+PCTs3f+95a5CdZ8 X3GQH55Nv1jlgEhtsLD4WAHD8bWYQ1DU96D58xP5eTI8LjWBToJZrHzCimHBVEcoV2Li ig7Q== 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=U/xLHjmYlBvvuohGH2zhN1ak4y/m6gdjRyZ1NzdrTcYR5uGqEvDmPlRmQOGU0H0rd3 ttEvDp8IcRBkDe7OwdK1SwqAWT3yMoohxxwlLctQ8Rq/GH3a3onK/HU79A6/yXy1AG3q GWyk/ejPpA7/kYVLeWgvqbZaf3Ijbc0yrlREbb6YMEU2nE71PpakSLg2LLmnMP8K9I76 FI8dHZEs58cPikOBiZIxWY3p2klNwZT/MlluPYMa44BtheqobP8nsuWa7Bu4Ynzl3ZW1 sfl5q0dFIp2Ndtv/1nb8x+FNOs6/4+HWlU08fuL9tcfHEzl1xxMTfZRjoY4d6j/zTWBO J2Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VnfVIka2; spf=pass (google.com: domain of linux-kernel+bounces-8468-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8468-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ga16-20020a170906b85000b00a232d6abe78si851785ejb.769.2023.12.21.05.37.56 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 05:37:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8468-ouuuleilei=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=VnfVIka2; spf=pass (google.com: domain of linux-kernel+bounces-8468-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8468-ouuuleilei=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 1CE7D1F23F54 for <ouuuleilei@gmail.com>; Thu, 21 Dec 2023 13:37:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C266583F40; Thu, 21 Dec 2023 13:25:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VnfVIka2" X-Original-To: linux-kernel@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 9C01081E43 for <linux-kernel@vger.kernel.org>; Thu, 21 Dec 2023 13:25:40 +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=1703165139; 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=VnfVIka2dp8Acvu6RiTtLjOxpov/tlTnPaSbsTbEg8/FT5cttbV9pBBbpihXMuEHYWFc9l 7cny+4ae7JvgiSy4KhoR0puHR5orAGG4WW/KM+slx9WO72C6hg5myzBYyaCzgNaNpx0GVZ 0UKKHhC+d9CQBCjNwACpnapL4fJqhfE= 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 <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>, Eric Van Hensbergen <ericvh@kernel.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 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-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785898862158673990 X-GMAIL-MSGID: 1785898862158673990 |
Series |
netfs, afs, 9p: Delegate high-level I/O to netfslib
|
|
Commit Message
David Howells
Dec. 21, 2023, 1:23 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> Reviewed-by: 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 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); }; /*