Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7237617rwr; Tue, 2 May 2023 11:25:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6EfqLerluYbdPl4BXHatvrVRxh3VArwlDcPO8pNfMTsXOQJyh88GKVLyFNgx1CyXlCb4Sf X-Received: by 2002:a05:6a20:158c:b0:f2:e399:b114 with SMTP id h12-20020a056a20158c00b000f2e399b114mr22827722pzj.1.1683051950741; Tue, 02 May 2023 11:25:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683051950; cv=none; d=google.com; s=arc-20160816; b=DQD+xRaZ5QaD2hJKKf20vDzDnexiARcJjMLJnP6kN0EO8g47stiuZ8tgGmdnz9AYdo nYGR68mqj3sRfvkycTp3JT1J+uQMTfHH6bJ9An+BRusY5Uw725oSgvJEMt9H1ZQER77K 1tcdZTWQBvQbFaBCgBS87GwXEIuvjBAOt6sIffPlfmUPvqYVaulW3A/GJH9abFHxAhyD D6yyY5pgBp+B8QRaIfJyJBfcj3j7466hiWPjNKPyLRRIJ2iZs82FjQmBbo2QxuB2yjHL S96Ory3FAi0MOucb8ulGiimGby/dK+C9ThCedYZRMZyF8CCqeuNdc15tZnkLA3DpKdLD Xqug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-transfer-encoding :content-id:mime-version:subject:cc:to:from:organization :dkim-signature; bh=mUsCC6BRu1wAgmjm+W7fv+mnroL8pCHvi0QoCItydVY=; b=pY8C6n2PuTfgD3KAH32/OmiIcUdbg7Is1bgdWl++wY59ER3q73G1rz8mBn79KZ0Lrc E9iRRn+s1gjIQW+Umu6ayOS3q2fO9d8u2J1FWq+Q4uWOfaTFV+MxYbmM8e4YvhE2YcXV fnb1Tyon1F5qO1y1B4E9skzEqKwbHBykH8K7MkBugkcTxBgftr8663dPhw+fBvS8bLVs v+hikZYy+iC4hFxN701cjWR/EGNvYhlEMDjomrTuDHaJz3uZOtKBN53YvnTkMDikGVT0 kUHmTMtOsQmf3lLflycS5zcxiPnnQf1NDEW+dSt5Ben+I6bJnd7R3jLxOfCjnxhLfPxo HKdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="d1/E3D0P"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j71-20020a638b4a000000b0052c4fdb2c7fsi1033196pge.635.2023.05.02.11.25.36; Tue, 02 May 2023 11:25:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="d1/E3D0P"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233615AbjEBSWz (ORCPT + 99 others); Tue, 2 May 2023 14:22:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbjEBSWy (ORCPT ); Tue, 2 May 2023 14:22:54 -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 D688EEC for ; Tue, 2 May 2023 11:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683051722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mUsCC6BRu1wAgmjm+W7fv+mnroL8pCHvi0QoCItydVY=; b=d1/E3D0PxONMbkzE7RS3BGo3rDdr0Ew1wu1yLJQtXgCRVL0uoDr7+k/X8NvJtAVQptufPa sHr5nItCZ28524i73gkmmN32x5zzCno6sXbJoFS0cSGOhAXBmKczUZk8qz49PjwnFPe9nF op48rw5q+9srSji7pZ9Nz+KAD+Mr9GA= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-198-VPhYOgCoNHyawjnCFdSdWQ-1; Tue, 02 May 2023 14:22:01 -0400 X-MC-Unique: VPhYOgCoNHyawjnCFdSdWQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5C79B3825BA7; Tue, 2 May 2023 18:22:01 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA0A61410F24; Tue, 2 May 2023 18:22:00 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells To: Linus Torvalds Cc: David Howells , Marc Dionne , linux-afs@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] afs: Fix directory size handling MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1647978.1683051720.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Tue, 02 May 2023 19:22:00 +0100 Message-ID: <1647979.1683051720@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, Could you apply these three fixes to AFS directory handling? (1) Make sure that afs_read_dir() sees any increase in file size if the file unexpectedly changed on the server (e.g. due to another client making a change). (2) Make afs_getattr() always return the server's dir file size, not the locally edited one, so that pagecache eviction doesn't cause the dir file size to change unexpectedly. (3) Prevent afs_read_dir() from getting into an endless loop if the serve= r indicates that the directory file size is larger than expected. Thanks, David --- The following changes since commit 865fdb08197e657c59e74a35fa32362b12397f5= 8: Merge tag 'input-for-v6.4-rc0' of git://git.kernel.org/pub/scm/linux/ker= nel/git/dtor/input (2023-05-01 17:18:56 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git tags= /afs-fixes-20230502 for you to fetch changes up to 9ea4eff4b6f4f36546d537a74da44fd3f30903ab: afs: Avoid endless loop if file is larger than expected (2023-05-02 17:2= 3:50 +0100) ---------------------------------------------------------------- AFS fixes ---------------------------------------------------------------- David Howells (1): afs: Fix getattr to report server i_size on dirs, not local size Marc Dionne (2): afs: Fix updating of i_size with dv jump from server afs: Avoid endless loop if file is larger than expected fs/afs/dir.c | 4 ++++ fs/afs/inode.c | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-)