Re: [xfstests generic/648] 64k directory block size (-n size=65536) crash on _xfs_buf_ioapply

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 23, 2024 at 03:02:03PM +0800, Zorro Lang wrote:
> On Tue, Jan 23, 2024 at 09:49:37AM +1100, Dave Chinner wrote:
> > On Mon, Jan 22, 2024 at 09:18:56PM +0800, Zorro Lang wrote:
> > Zorro, in the mean time, can you write up an xfstest that creates a
> > small XFS filesystem with "-n size=64k" and a large log, sets it up
> > with single block fragmentation (falloc, punch alternate), then
> > creates a bunch of files (a few thousand) to create a set of
> > fragmented directory blocks, then runs 'shutdown -f' to force the
> > log and prevent metadata writeback, then unmounts and mounts the
> > filesystem. The mount of the filesystem should then trigger this
> > directory fragment recovery issue on any platform, not just s390.
> 
> Sure Dave, do you mean something likes this:

Almost. Free space needs to be fragmented before creating the
directory structure so that the directory blocks are fragmented.

> # mkfs.xfs -f -d size=1g -n size=64k -l size=200M /dev/loop0
> # mount /dev/loop0 /mnt/test

# fallocate 1g /mnt/test/file
# punch_alternate /mnt/test/file

> # for ((i=0; i<10000; i++));do echo > /mnt/tmp/dir/loooooooooooooooooooooooogfile$i;done && xfs_io -xc 'shutdown -f' /mnt/test
> # umount /mnt/test
> # mount /mnt/test

Otherwise this should trigger recover of the directory blocks and
hopefully trip over it.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux