Linux filesystem development
 help / color / mirror / Atom feed
* fstests: Verify behaviour of "seek" in a directory
@ 2026-08-27 23:36 NeilBrown
  2026-08-27 23:36 ` [PATCH] fstests: generic: Add test of seek in directories NeilBrown
  0 siblings, 1 reply; 14+ messages in thread
From: NeilBrown @ 2026-08-27 23:36 UTC (permalink / raw)
  To: fstests; +Cc: linux-fsdevel, Chuck Lever

Hi,

 I would like to propose the following test to be added to fstests.  It
 checks the behaviour of a directory with respect to seek.  As described
 in the patch and the code, it expects names which are not removed or
 moved to have a stable position in the result of getdents64 with
 respect to each other and with respect to any seek offset (d_off)
 reported of any entry.  This means that if we stop and any point while
 scanning a directory, remember the most recent d_off, close the
 directory, then later open and seek to that offset and keep reading,
 then we will find all the names that existed for the whole time and see
 those only once.

 Names that are added or removed are not tests as we expect them
 possibly appear not at all or even multiple times.

 My particular motivation is to confirm that the current tmpfs doesn't
 behave correctly, and to test an alternate implementation that I will
 propose which does pass this test.

 I discovered that while xfs and ext4 pass the test, btrfs doesn't.
 It appears that with btrfs the target of a rename does not keep its
 position in the directory listing order.

Thanks,
NeilBrown

 [PATCH] fstests: generic: Add test of seek in directories

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

end of thread, other threads:[~2026-09-01  9:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-27 23:36 fstests: Verify behaviour of "seek" in a directory NeilBrown
2026-08-27 23:36 ` [PATCH] fstests: generic: Add test of seek in directories NeilBrown
2026-08-28  4:13   ` Matthew Wilcox
2026-08-28 11:12     ` NeilBrown
2026-08-28 14:55       ` Theodore Tso
2026-08-30 22:22         ` NeilBrown
2026-08-31  1:37           ` Theodore Tso
2026-08-31 13:16       ` Christoph Hellwig
2026-09-01  1:05         ` NeilBrown
2026-09-01  9:18           ` Christoph Hellwig
2026-08-30 23:13   ` Chuck Lever
2026-08-31 12:59   ` Christoph Hellwig
2026-08-31 22:47     ` NeilBrown
2026-09-01  9:09       ` Christoph Hellwig

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