panic ffs_truncate3 (maybe fuse being evil)
Rick Macklem
rmacklem at uoguelph.ca
Sat Jan 16 02:00:14 UTC 2016
Kostik wrote:
> On Thu, Jan 14, 2016 at 10:14:18PM -0500, Rick Macklem wrote:
> > Kostik wrote:
> > > What is the exact value of lblkno ?
> > >
> > It was -1 for the crash I looked at. (Since all are the same backtrace and
> > happen for the same test sequence, I suspect they all are.)
> >
> > > There are two kinds of buffers with negative lblk which may exist on
> > > the UFS vnode queues. One is indirect block, and another is the metadata
> > > block. Metadata lblks are -1 and -2, indir blocks numbers are calculated
> > > by formula you can see in calculation of indir_lbn[] in ffs_truncate().
> > >
> > Thanks. I knew indirect blocks were -ve block #s, but I didn't know about
> > the metadata ones.
> s/metadata/ext attributes data/
>
> Sorry.
>
No problem. Extended attributes are metadata and I suspect there might be other
metadata handled this way someday.
> > So, if I've understood you correctly, a -1 b_lblkno is an extattr one and
> > the assert should allow it and not panic?
> Yes.
>
> >
> > I can change the assert, although it will end up about 6 lines of code;-)
> > If you think I should do this, I will do so and test it.
> It is under INVARIANTS anyway. I do see a value in checking that truncation
> is consistent. We did have many bugs there, which usually caused user data
> loss. Some caution is worth it, IMO.
>
>
I've attached the patch with the modified test for the panic.
I ran a test with the old one (with the panic changed to a printf) just before
this one and the printf happened, but no panic.
After the test, the file system fsck'd ok, so I think this might be ok.
I've added Kirk as a cc. Maybe he can review this?
I can't do commits until mid-April, so maybe you can commit it?
(I don't think there is any rush, since almost everyone will be using soft
updates. To be honest, I have no idea why I turned off soft updates at
some point for this filesystem.)
Thanks for your help, rick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffsinode.patch
Type: text/x-patch
Size: 767 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20160115/9fa6eb24/attachment.bin>
More information about the freebsd-fs
mailing list