public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [REGRESSION] nfs: Large amounts of GETATTR calls after file renaming on v5.10.241
@ 2025-11-21 18:56 Ahmed, Aaron
  2025-11-22  6:56 ` gregkh
  0 siblings, 1 reply; 5+ messages in thread
From: Ahmed, Aaron @ 2025-11-21 18:56 UTC (permalink / raw)
  To: stable@vger.kernel.org
  Cc: regressions@lists.linux.dev, trondmy@kernel.org,
	linux-nfs@vger.kernel.org, sashal@kernel.org,
	gregkh@linuxfoundation.org

Hi,

We have had customers report a regression on kernels versions 5.10.241 and above in which file renaming causes large amounts of GETATTR calls to made due to inode revalidation. This regression was pinpointed via bisected to commit 7378c7adf31d ("NFS: Don't set NFS_INO_REVAL_PAGECACHE in the inode cache validity") which is a backport of 36a9346c2252 (“NFS: Don't set NFS_INO_REVAL_PAGECACHE in the inode cache validity”). 

We were able to reproduce It with this script:
REPRO_PATH=/mnt/efs/repro
do_read()
{
    for x in {1..50}
    do
        cat $1 > /dev/null
    done
    grep GETATTR /proc/self/mountstats
}

echo foo > $REPRO_PATH/bar
echo "After create, before read:"
grep GETATTR /proc/self/mountstats

echo "First read:"
do_read $REPRO_PATH/bar

echo "Sleeping 5s, reading again (should look the same):"
sleep 5
do_read $REPRO_PATH/bar

mv $REPRO_PATH/bar $REPRO_PATH/baz
echo "Moved file, reading again:"
do_read $REPRO_PATH/baz

echo "Immediately performing another set of reads:"
do_read $REPRO_PATH/baz

echo "Cleanup, removing test file"
rm $REPRO_PATH/baz
which performs a few read/writes. On kernels without the regression the number of GETATTR calls remains the same while on affected kernels the amount increases after reading renamed file. 

This original commit comes from a series of patches providing attribute revalidation updates [1].  However, many of these patches are missing in v.5.10.241+. Specifically, 13c0b082b6a9 (“NFS: Replace use of NFS_INO_REVAL_PAGECACHE when checking cache validity”) seems like a prerequisite patch and would help remedy the regression.

#regzbot introduced: 7378c7adf31d

Thanks,
Aaron Ahmed

[1]  https://lore.kernel.org/all/20210414134353.11860-1-trondmy@kernel.org/

Signed-off-by: Aaron Ahmed <aarnhahmd@amazon.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-11-23 17:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-21 18:56 [REGRESSION] nfs: Large amounts of GETATTR calls after file renaming on v5.10.241 Ahmed, Aaron
2025-11-22  6:56 ` gregkh
2025-11-22 15:43   ` Trond Myklebust
2025-11-23  6:23     ` gregkh
2025-11-23 17:15       ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox