[LU-3486] LBUG when exporting Lustre 2.4 via NFS on SLES11SP2: ll_dops_init: ASSERTION( de->d_op == &ll_d_ops ) failed Created: 20/Jun/13 Updated: 10/Jun/14 Resolved: 06/Aug/13 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.4.0 |
| Fix Version/s: | Lustre 2.5.0 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Patrick Farrell (Inactive) | Assignee: | Lai Siyao |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
SLES11SP2 patchless client exporting the file system over NFS |
||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 8767 | ||||||||
| Description |
|
As noted in When attempting to do a mkdir (in the root of the exported file system, from the nfs client, with the nfs server a patchless SLES11SP2 2.4 client) and then an ls -la of this new directory, we got the following: Here's the code in ll_dops_init: if (lld == NULL && block != 0) { rc = ll_set_dd(de); if (rc) return rc; lld = ll_d2d(de); } if (lld != NULL && init_sa != 0) #ifdef HAVE_DCACHE_LOCK I've investigated the crash dump and found that the d_op pointer is set to ll_d_root_ops, rather than ll_d_ops. d_obtain_alias (replacement for d_alloc) only sets ll_d_ops as described in the comment above when it is creating an anonymous dentry (done when it can't find any aliases for the inode). Presumably, the root dentry would already have an alias, which is why it's not getting set. Prior to 2.6.38, d_op is set directly here to ll_d_ops. That suggests a few possible issues, with varying fixes: |
| Comments |
| Comment by Lai Siyao [ 24/Jun/13 ] |
|
I'm okay with the option 2. Because lustre root dentry won't be really revalidated, ll_dops_init() should not be called for it. But I don't know why root dentry is handled different from other dentries, Oleg, could you give some comment? |
| Comment by Patrick Farrell (Inactive) [ 24/Jun/13 ] |
|
Lai, With option 2, I'm saying if the root dentry shouldn't have ll_dops_init called on it, I'm not sure what we should change to avoid that. |
| Comment by Lai Siyao [ 24/Jun/13 ] |
|
Patrick, yes, it should work in this way, because currently we handle root dentry differently. But if we can make sure root dentry is no different from others, we can get rid of ll_d_root_ops, and make dentry handling more consistent and simpler. |
| Comment by Patrick Farrell (Inactive) [ 24/Jun/13 ] |
|
Lai, OK. It's worth noting that in kernel versions earlier than 2.6.38, ll_dops_init was setting the d_op pointer, since it wasn't set in d_obtain_alias in the kernel. So presumably, it was resetting the root dentry d_ops pointer from ll_d_root_ops to ll_d_ops. That suggests it's safe to not have the special ll_d_root_ops struct. The only different is that some operations are not defined in the root dentry ops. Just for reference, here are the two sets of operations: static struct dentry_operations ll_d_root_ops = {
.d_compare = ll_dcompare,
.d_revalidate = ll_revalidate_nd,
};
— struct dentry_operations ll_d_ops = {
.d_revalidate = ll_revalidate_nd,
.d_release = ll_release,
.d_delete = ll_ddelete,
.d_iput = ll_d_iput,
.d_compare = ll_dcompare,
};
|
| Comment by Lai Siyao [ 25/Jun/13 ] |
|
Yes, I noticed this, that's why I tend to remove ll_d_root_ops, and treat root dentry as normal ones. I'll make a patch to test. |
| Comment by Lai Siyao [ 27/Jun/13 ] |
|
Patch is on http://review.whamcloud.com/#/c/6797/ |
| Comment by Lai Siyao [ 06/Aug/13 ] |
|
patch landed. |
| Comment by James A Simmons [ 10/Jun/14 ] |
|
Patch http://review.whamcloud.com/#/c/6797 has been merged to the upstream kernel as commit: 3ea8f3bcabe422c6b5778089ae0929c1028e58f8 Since this is the case then is ticket can be closed. |