From 94f65ef60e29e48cd9eff46305b63e7a290c236e Mon Sep 17 00:00:00 2001 From: alex <alex> Date: Thu, 8 Jul 2004 18:37:00 +0000 Subject: [PATCH] - mds_fid2dentry() should check generation number as it did before - mds_open() logs parent/name couple. this helps recovery debugging --- lustre/mds/handler.c | 6 ++---- lustre/mds/mds_open.c | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 44597b1e75..45916168da 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -309,11 +309,10 @@ struct dentry *mds_fid2dentry(struct mds_obd *mds, struct ll_fid *fid, if (!inode) RETURN(ERR_PTR(-ENOENT)); -#warning "I think we need something another here -bzzz" -#if 0 /* here we disabled generation check, as root inode i_generation * of cache mds and real mds are different. */ - if (generation && inode->i_generation != generation) { + if (inode->i_ino != mds->mds_rootfid.id && generation && + inode->i_generation != generation) { /* we didn't find the right inode.. */ CERROR("bad inode %lu, link: %lu ct: %d or generation %u/%u\n", inode->i_ino, (unsigned long)inode->i_nlink, @@ -322,7 +321,6 @@ struct dentry *mds_fid2dentry(struct mds_obd *mds, struct ll_fid *fid, dput(result); RETURN(ERR_PTR(-ENOENT)); } -#endif if (mnt) { *mnt = mds->mds_vfsmnt; diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c index 1acafaa738..b159950617 100644 --- a/lustre/mds/mds_open.c +++ b/lustre/mds/mds_open.c @@ -818,6 +818,10 @@ int mds_open(struct mds_update_record *rec, int offset, int mea_size, update_mode; ENTRY; + DEBUG_REQ(D_INODE, req, "parent "LPU64"/%u name %*s mode %o", + rec->ur_fid1->id, rec->ur_fid1->generation, + rec->ur_namelen - 1, rec->ur_name, rec->ur_mode); + parent_lockh[0].cookie = 0; parent_lockh[1].cookie = 0; -- GitLab