On Wed, Jan 17, 2024 at 10:30:23AM -0800, Christoph Hellwig wrote: > On Mon, Sep 25, 2023 at 02:59:16PM -0700, Darrick J. Wong wrote: > > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > > > XFS and tools (mkfs, copy, repair) don't generally rely on the block > > device page cache, preferring instead to use directio. For whatever > > reason, the debugger was never made to do this, but let's do that now. > > > > This should eliminate the weird fstests failures resulting from > > udev/blkid pinning a cache page while the unmounting filesystem writes > > to the superblock such that xfs_db finds the stale pagecache instead of > > the post-unmount superblock. > > After some debugging I found out that this breaks a bunch of tests > (at least xfs/002 xfs/070 xfs/424 in the quick group) on 4k device > because xfs_db tries some unaligned reads. > > For xfs/002 that is the libxfs_buf_read in __set_cur, when setting the > type to data, but I haven't looked at the other test in detail. Hmm. Perhaps the userspace buftarg setup should go find the physical sector size of the device? That "bb_count = 1" in set_iocur_type looks a bit smelly. > Should I look into finding all these assumptions in xfs_db, or > just make the direct I/O enablement conditional n a 612 byte sector > size? Let me go run a lbasize=4k fstests run overnight and see what happens. IIRC zorro told me last year that it wasn't pretty. --D