[Lustre-discuss] 1.6.4.1 - LBUG on MDS

Niklas Edmundsson Niklas.Edmundsson at hpc2n.umu.se
Mon Jan 21 04:02:43 PST 2008


On Mon, 21 Jan 2008, Bernd Schubert wrote:

>> Hmm, ext3-unlink-race.patch didn't apply at all, and looking manually
>> I see no obvious place to apply it to.
>>
>> Diffing the ext3-trees between kernel.org 2.6.18.8 and debian 2.6.18 I
>> see no patch that obviously touches ext3_link/ENOENT/i_nlink:

<snip>

>> So I think that this bug is most likely present when using vanilla
>> kernel.org 2.6.18.8 too...
>>
>> Thoughts/suggestions?
>>
>> My gut feeling is that the MDS code is relying on some corner case
>> behaviour of ext3, and that this behaviour is changing with newer
>> kernels...
>
> Could you try this patch, this is what we are using and what should be in
> debians lustre svn

I'm building using the pkg-lustre/trunk repository, so I already had 
this patch when the MDS bug:ed out.


> diff -r a1bf8dcdfe1f lustre/mds/mds_reint.c
> --- a/lustre/mds/mds_reint.c	Mon Jul 09 17:00:16 2007 +0200
> +++ b/lustre/mds/mds_reint.c	Mon Jul 09 17:01:04 2007 +0200
> @@ -1481,7 +1481,12 @@ static int mds_orphan_add_link(struct md
>          * for linking and return real mode back then -bzzz */
>         mode = inode->i_mode;
>         inode->i_mode = S_IFREG;
> +
> +        /* 2.6.21 will refuse to add a link of inode->i_nlink == 0 */
> +        inode->i_nlink = 1;
>         rc = vfs_link(dentry, pending_dir, pending_child);
> +        inode->i_nlink--;
> +        mark_inode_dirty(inode);
>         if (rc)
>                 CERROR("error linking orphan %s to PENDING: rc = %d\n",
>                        rec->ur_name, rc);

> I didn't like the ext3-unlink-race.patch, it removes sanity checks someone
> certainly added for good reasons and therefore I introduced this patch.

In general it seems to me that a good chunk of the lustre code depends
on specific versions of ext3 behaviour, which coupled with the fact 
that it's not shipped with lustre but patched based on the kernel 
version of ext3 only seems to produce surprises at regular intervals. 
I really can't wait until this gets into userspace, which if I have 
understood correctly will happen with the lustre 1.8/ZFS-thingie...

/Nikke
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se     |    nikke at hpc2n.umu.se
---------------------------------------------------------------------------
  I'm in shape ... pear is a shape isn't it?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



More information about the lustre-discuss mailing list