[Unionfs] kernel BUG at fs/unionfs/fanout.h:128!

Erez Zadok ezk at cs.sunysb.edu
Thu Sep 20 14:13:34 EDT 2007


In message <bffbecbb0709200411k3868a64fx7101a6ca685c0fbf at mail.gmail.com>, "Phillip Lougher" writes:
> On 9/20/07, Erez Zadok <ezk at cs.sunysb.edu> wrote:
> 
> > Oliver, I'm pretty certain that your patch is correct.  I've fixed a similar
> > bug elsewhere in the code not too long ago.
> >
> 
> Hi Erez,
> 
> We were hitting this issue in Canonical, after debugging I discovered
> this to be always caused by unionfs_flush calling
> unionfs_copy_attr_times on the parent dentry of the dentry being
> flushed.  Adding a check for negative parent dentry ibstart fixed the
> problem for us.
> 
> -       unionfs_copy_attr_times(dentry->d_parent->d_inode);
> +        if(ibstart(dentry->d_parent->d_inode) < 0) {
> +                printk(KERN_WARNING "unionfs_flush: skipping
> unionfs_copy_attr_times for parent, parent has no branches!\n");
> +        } else
> +               unionfs_copy_attr_times(dentry->d_parent->d_inode);
> 
> 
> 
> Phillip

Phillip, instead of the above check, which may have to be placed in multiple
places, the check for "< 0" is best placed once inside
unionfs_copy_attr_times().  This is what I did in fanout.h, and released
yesterday in 2.1.4.  I'd like to know if 2.1.4 works for you please.

Thanks,
Erez.


More information about the unionfs mailing list