Whamcloud - gitweb
- mds_fid2dentry() should check generation number as it did before
authoralex <alex>
Thu, 8 Jul 2004 18:37:00 +0000 (18:37 +0000)
committeralex <alex>
Thu, 8 Jul 2004 18:37:00 +0000 (18:37 +0000)
- mds_open() logs parent/name couple. this helps recovery debugging

lustre/mds/handler.c
lustre/mds/mds_open.c

index 44597b1..4591616 100644 (file)
@@ -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;
index 1acafaa..b159950 100644 (file)
@@ -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;