Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp332352rdb; Mon, 29 Jan 2024 03:56:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IHA2tC1VKTCpQjCoi51KrRoLT+xZx9Zg2OosBgM09DyoHd7Y8nTiGabWWwiGTQN9Qd4+Kyf X-Received: by 2002:a05:622a:251:b0:42a:8a40:e33c with SMTP id c17-20020a05622a025100b0042a8a40e33cmr4867834qtx.57.1706529389616; Mon, 29 Jan 2024 03:56:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706529389; cv=pass; d=google.com; s=arc-20160816; b=G7l+HrQdx5zQhx9nU1+St+CraHyVcTo0SHwj2D7MuvSDatCJtevnogY8WpgmGgvqY9 NA+dMFubDHV8uqZxGRkYLSrShqEyHBxetccN9G6bpCynHKOXRU03ESxA7kKxpIM38yyw A5eE+bmKP4UeJgYdR0pLT/u29RZuoN/sSa/S0guRcrpFk2HZn92N6ePdirX8HPMgZixM vPTyg7Bxg3x2aK5n8+t5qvnwwSdzKqHbWITPNI4jkdhI1b2gqNd83LroSeZlOjbU//uj GV3KgyHe/YSzfKbLQO8izaTD74tXhf8vwr2UcyMpb4q46bucBsCyu0776W1YVO4rm0Gn A/NA== ARC-Message-Signature: i=2; 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=l/klC/ghutWIOc1+EVzXLrxXcGHqt0/sieVr6S5RVKE=; fh=vOUjozwhnszqhoZ4kGb20/T9SnkwXZbVZWre2xyclaU=; b=xhaHvhsGWhBasOFOiGkCPXmcFX0piQV0zmEQ9IjMMGNfeNabEM49+fsuF4dsPfZ9G2 kXrXE1EPZac8OYnQOhZvLfgtz4f5x/W2XK21ctWuxDvDFR2gtmXS8s8i75WxtEXbIONg GxTu3rvtfiL45AJF+Uiw2NURwXg1Hg1+8/B8gBnTBFeI/yGUvoj5m/H9k6SZBPiQr+e7 lCqecP1xoh+DcHRRFbjOwwW3m2/YzYvWlggmMSsC7Lr32fg0vN3p3dKg9oqPrQT1npji ANOaPJlu8dWaD5xeRgd1J8fwwRr+eHE+9m2qzpNK4jq8B13fuv2jYnN8YptPZX7PmQqH 7svw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PoQLYHBC; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-42650-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42650-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id m17-20020a05622a119100b0042aabe62e5dsi646907qtk.110.2024.01.29.03.56.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 03:56:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42650-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PoQLYHBC; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-42650-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42650-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 617811C227F4 for ; Mon, 29 Jan 2024 11:56:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 97F7F60860; Mon, 29 Jan 2024 11:55:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PoQLYHBC" 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 8C916604C4 for ; Mon, 29 Jan 2024 11:55:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706529334; cv=none; b=NsGbXIbXT/7vXDXOmTDPQsJ5JqI4oUY5GZjPqTTB9AM/cQJJwi4rncfGpwSGdycRh2wwT+vc1kaOaJ2jeveXF43hEzGzuKsR2rRxd3foQBD+qg4pReYi0JuYoXmauXMyKPQ7ycZFUr7BbTpd6TAiy26nJooOdZvNevre5nRITbU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706529334; c=relaxed/simple; bh=1byjLmjT6ZOpcnDHKbSQxLlzmYce9B40FvFh6bkgVOc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mguKpIacKRlNSO5xVpslsfQzOughJQlMZ0kZ/OS/TQkNzGbqCkV4OHz2EIY+si23isTCk+FXAWEnNjfWQpBlu8EjE3t1BoBjVglhtImhdBQrL6kQcwdq/0a8tojInDpt0U/2+1tFpIRl8AqZjK7eMBao5FMYMeUY1OyrltnMw00= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=PoQLYHBC; arc=none smtp.client-ip=170.10.129.124 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=1706529328; 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=l/klC/ghutWIOc1+EVzXLrxXcGHqt0/sieVr6S5RVKE=; b=PoQLYHBCBwd7orH+JsGCpdf27fqQp8Wm9CKFvAKkbC2ggvoPAK/oemBi5pdtEJ2evyukQD yMEE9C+71o+fNc9LHhHwmB8sHdRkvwwprRsRsLxo1ng6d5vaHVSVveHNqB4PHLB6qSLFef D0eXgMr/fC/IAnXkNYhmSJKabztPi1M= 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-221-d1lzjPdMMbCmhQXLAPqJfA-1; Mon, 29 Jan 2024 06:55:25 -0500 X-MC-Unique: d1lzjPdMMbCmhQXLAPqJfA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 ADC73185A782; Mon, 29 Jan 2024 11:55:24 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.245]) by smtp.corp.redhat.com (Postfix) with ESMTP id 013882166B31; Mon, 29 Jan 2024 11:55:22 +0000 (UTC) From: David Howells To: Eric Van Hensbergen , Dominique Martinet , Latchesar Ionkov Cc: David Howells , Christian Schoenebeck , Matthew Wilcox , Jeff Layton , Christian Brauner , netfs@lists.linux.dev, v9fs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-cachefs@redhat.com Subject: [RFC PATCH 3/3] 9p: Always update remote_i_size in stat2inode Date: Mon, 29 Jan 2024 11:54:37 +0000 Message-ID: <20240129115512.1281624-4-dhowells@redhat.com> In-Reply-To: <20240129115512.1281624-1-dhowells@redhat.com> References: <20240129115512.1281624-1-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@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.6 Always update remote_i_size in v9fs_stat2inode*() if the size is available, even if we are asked not to update i_isize Suggested-by: Dominique Martinet Link: https://lore.kernel.org/r/ZZVctju5TEjS218p@codewreck.org/ Signed-off-by: David Howells cc: Eric Van Hensbergen cc: Latchesar Ionkov cc: Christian Schoenebeck cc: v9fs@lists.linux.dev cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org --- fs/9p/vfs_inode_dotl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c index 3505227e1704..aa3a77bb5e86 100644 --- a/fs/9p/vfs_inode_dotl.c +++ b/fs/9p/vfs_inode_dotl.c @@ -684,10 +684,10 @@ v9fs_stat2inode_dotl(struct p9_stat_dotl *stat, struct inode *inode, mode |= inode->i_mode & ~S_IALLUGO; inode->i_mode = mode; } - if (!(flags & V9FS_STAT2INODE_KEEP_ISIZE) && - stat->st_result_mask & P9_STATS_SIZE) { + if (stat->st_result_mask & P9_STATS_SIZE) { v9inode->netfs.remote_i_size = stat->st_size; - v9fs_i_size_write(inode, stat->st_size); + if (!(flags & V9FS_STAT2INODE_KEEP_ISIZE)) + v9fs_i_size_write(inode, stat->st_size); } if (stat->st_result_mask & P9_STATS_BLOCKS) inode->i_blocks = stat->st_blocks;