Re: [PATCH v2] xfs: byte range buffer dirty region tracking

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

 



On Wed, Feb 14, 2018 at 01:08:07PM -0500, Brian Foster wrote:
> On Wed, Feb 14, 2018 at 08:49:12AM -0800, Darrick J. Wong wrote:
> > On Wed, Feb 14, 2018 at 08:09:39AM -0500, Brian Foster wrote:
> > > On Wed, Feb 14, 2018 at 09:02:20AM +1100, Dave Chinner wrote:
> > > Yep. It's a specially crafted symlink creation on a small FSB, v4
> > > filesystem with fragmented free space. We log symlink buffers on v4
> > > filesystems without any header, so the buffer content is not dictated by
> > > any internal fs metadata format. If the link target is large enough to
> > > span multiple blocks and free space is fragmented such that those blocks
> > > are discontiguous, we can end up logging (solely) the first byte of the
> > > last buffer of the link target.

I'd completely forgotten about that whacky corner case in the v4
format. :(

> > > This is actually reproducible on demand so I'll just append a basic
> > > recipe rather than collect the debug data and whatnot..
> > > 
> > > Brian
> > > 
> > > --- 8< ---
> > > 
> > > dev=<dev>
> > > mnt=/mnt
> > > 
> > > sym=`for i in $(seq 0 512); do echo -n a; done`
> > > 
> > > mkfs.xfs -f -mcrc=0 -bsize=512 -dsize=25m $dev
> > > mount $dev $mnt
> > > 
> > > dd if=/dev/zero of=$mnt/spc1
> > > ~/xfstests-dev/src/punch-alternating $mnt/spc1
> > > dd if=/dev/zero of=$mnt/spc2
> > > xfs_io -c "fpunch 5m 25m" $mnt/spc2
> > > 
> > > for i in $(seq 0 2); do
> > >         ln -s $sym $mnt/link.$i
> > >         xfs_io -c fsync $mnt
> > > done
> > > 
> > > umount $mnt
> > 
> > Did one of the "fragment free space, do stuff" xfstests hit this?  If
> > not, would it be worth turning into a test?
> > 
> 
> This was just an experiment on this patch. I haven't run xfstests so I
> can't say for sure whether some existing test would have caught it
> (though I suspect Dave would have hit the problem by now, if so). I'm

Nope, a v4 512 byte block size filesystem is so far outside my
normal test config matrix it's not funny. In fact, I almost never
test on v4 filesystems anymore, and I rarely think of them when
developing new code as it's essentially a legacy format now....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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