Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jul 2010 02:10:58 -0700
From:      Jeremy Chadwick <freebsd@jdc.parodius.com>
To:        Kirk McKusick <mckusick@mckusick.com>
Cc:        "Mikhail T." <mi+thun@aldan.algebra.com>, fs@freebsd.org
Subject:   Re: panic: handle_written_inodeblock: bad size
Message-ID:  <20100721091058.GA74971@icarus.home.lan>
In-Reply-To: <20100720214751.GA58332@icarus.home.lan>
References:  <20100720134931.GA41352@icarus.home.lan> <201007201544.o6KFipaV084986@chez.mckusick.com> <20100720175709.GA52321@icarus.home.lan> <20100720214751.GA58332@icarus.home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
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@parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100721091058.GA74971>