From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7123EC77B7E for ; Tue, 2 May 2023 18:22:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233943AbjEBSWz (ORCPT ); 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 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(-)