From 58e60fa3901e232206e833d120f72519c7239d09 Mon Sep 17 00:00:00 2001 From: huanghua Date: Fri, 11 Jul 2008 05:21:58 +0000 Subject: [PATCH] Branch b1_8_gate b=11930 i=adilger i=nikita.danilov i=alex --- lustre/liblustre/super.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/lustre/liblustre/super.c b/lustre/liblustre/super.c index baf8ed9..adfac10 100644 --- a/lustre/liblustre/super.c +++ b/lustre/liblustre/super.c @@ -135,6 +135,8 @@ void llu_update_inode(struct inode *inode, struct mds_body *body, if (body->valid & OBD_MD_FLID) st->st_ino = body->ino; + if (body->valid & OBD_MD_FLGENER) + lli->lli_st_generation = body->generation; if (body->valid & OBD_MD_FLATIME && body->atime > LTIME_S(st->st_atime)) LTIME_S(st->st_atime) = body->atime; @@ -171,16 +173,8 @@ void llu_update_inode(struct inode *inode, struct mds_body *body, st->st_blocks = body->blocks; if (body->valid & OBD_MD_FLFLAGS) lli->lli_st_flags = body->flags; - if (body->valid & OBD_MD_FLGENER) - lli->lli_st_generation = body->generation; - /* fillin fid */ - if (body->valid & OBD_MD_FLID) - lli->lli_fid.id = body->ino; - if (body->valid & OBD_MD_FLGENER) - lli->lli_fid.generation = body->generation; - if (body->valid & OBD_MD_FLTYPE) - lli->lli_fid.f_type = body->mode & S_IFMT; + lli->lli_fid = body->fid1; } void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid) @@ -431,7 +425,7 @@ static int llu_inode_revalidate(struct inode *inode) ealen = obd_size_diskmd(sbi->ll_osc_exp, NULL); valid |= OBD_MD_FLEASIZE; } - ll_inode2fid(&fid, inode); + llu_inode2fid(&fid, inode); rc = mdc_getattr(sbi->ll_mdc_exp, &fid, valid, ealen, &req); if (rc) { CERROR("failure %d inode %llu\n", rc, @@ -532,7 +526,7 @@ void llu_clear_inode(struct inode *inode) (long long)llu_i2stat(inode)->st_ino, lli->lli_st_generation, inode); - ll_inode2fid(&fid, inode); + llu_inode2fid(&fid, inode); clear_bit(LLI_F_HAVE_MDS_SIZE_LOCK, &(lli->lli_flags)); mdc_change_cbdata(sbi->ll_mdc_exp, &fid, null_if_equal, inode); @@ -898,7 +892,7 @@ static int llu_readlink_internal(struct inode *inode, RETURN(0); } - ll_inode2fid(&fid, inode); + llu_inode2fid(&fid, inode); rc = mdc_getattr(sbi->ll_mdc_exp, &fid, OBD_MD_LINKNAME, symlen, request); if (rc) { @@ -1814,9 +1808,7 @@ struct inode *llu_iget(struct filesys *fs, struct lustre_md *md) } /* try to find existing inode */ - fid.id = md->body->ino; - fid.generation = md->body->generation; - fid.f_type = md->body->mode & S_IFMT; + fid = md->body->fid1; inode = _sysio_i_find(fs, &fileid); if (inode) { -- 1.8.3.1