panic: handle_written_inodeblock: bad size

Jeremy Chadwick freebsd at jdc.parodius.com
Wed Jul 21 09:11:00 UTC 2010


On Tue, Jul 20, 2010 at 02:47:51PM -0700, Jeremy Chadwick wrote:
> On Tue, Jul 20, 2010 at 10:57:09AM -0700, Jeremy Chadwick wrote:
> > On Tue, Jul 20, 2010 at 08:44:51AM -0700, Kirk McKusick wrote:
> > > You are on the right track with getting the filesystem information.
> > > Any place that one has an inode (say pointer ip), it is possible
> > > to get the filesystem information using ip->i_fs->fs_fsmnt. The
> > > mount point can also be found from the mount-point structure.
> >
> > [...] 
> > The biggest problem (for me) is testing.  I have no idea how to
> > trigger the error conditions in these functions.  I assume it varies;
> > maybe through fsdb(8) or interactively dropping to DDB and forcing
> > the condition.
> > 
> > I tend to do all of my work on this sort on a VM of FreeBSD (using
> > VMware Workstation), but if testing on bare metal is required I
> > have a testbed as well.
> 
> I've written (what I believe to be) the first stage of getting this
> accomplished, and have been (slowly) testing each of the functions I
> modified in src/sys/ufs/ffs/ffs_softdep.c.
> [...] 
> The diff so far, I think, is around 20KBytes.

I finished preliminary testing tonight.  There were two functions which
I couldn't verify work because I couldn't get the kernel to call them no
matter what I tried:

softdep_setup_allocext()
request_cleanup()

All the other functions I modified were tested by moving the panic()
call near the top of the function and doing whatever was needed.
Sometimes mounting a filesystem was all that was required to trigger it,
other times I had to make a new filesystem + sync, or umount.  In one
case I had to make a UFS1+SU filesystem.  It's not a completely 100%
accurate test, hence "preliminary".  :-)

I also fixed a couple cosmetical items with the code (things not lining
up right, some strings having ":" at the end of them when it should have
been within the initial formatting string itself, and one function which
used %s for "softdep" instead of just using the actual string itself).
These were few and far between.

Below is the patch/diff for RELENG_8 I've come up with.  I only tested
this on amd64:

http://jdc.parodius.com/freebsd/ffs_softdep.c.patch

Kirk, if you could review this I'd appreciate it.

-- 
| Jeremy Chadwick                                   jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |


More information about the freebsd-fs mailing list