From bf2c58f8559f8bf0efb0135ac37856f4c6e2ae29 Mon Sep 17 00:00:00 2001 From: adilger Date: Tue, 27 Aug 2002 06:22:24 +0000 Subject: [PATCH] Don't copy the objid to/from the inode. There is nowhere that we use these functions that we want that to happen. --- lustre/include/linux/obd_class.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lustre/include/linux/obd_class.h b/lustre/include/linux/obd_class.h index 5ae5755..55a29fc 100644 --- a/lustre/include/linux/obd_class.h +++ b/lustre/include/linux/obd_class.h @@ -231,6 +231,10 @@ static inline int obd_create(struct lustre_handle *conn, struct obdo *obdo, stru OBD_CHECK_SETUP(conn, export); OBD_CHECK_OP(export->exp_obd,create); +#define OBD_MD_FLNEEDED (OBD_MD_FLID | OBD_MD_FLMODE) + //if (obdo->o_valid & OBD_MD_FLNEEDED != OBD_MD_FLNEEDED) + // RETURN(-EINVAL); +#undef OBD_MD_FLNEEDED rc = OBP(export->exp_obd, create)(conn, obdo, ea); RETURN(rc); } @@ -551,8 +555,8 @@ static inline void iattr_from_obdo(struct iattr *attr, struct obdo *oa, static inline void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid) { - if (valid & OBD_MD_FLID) - dst->o_id = src->i_ino; +// if (valid & OBD_MD_FLID) +// dst->o_id = src->i_ino; if (valid & OBD_MD_FLATIME) dst->o_atime = src->i_atime; if (valid & OBD_MD_FLMTIME) @@ -580,15 +584,14 @@ static inline void obdo_from_inode(struct obdo *dst, struct inode *src, if (valid & OBD_MD_FLRDEV) dst->o_rdev = src->i_rdev; - dst->o_valid |= valid; + dst->o_valid |= (valid & ~OBD_MD_FLID); } static inline void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid) { - - if (valid & OBD_MD_FLID) - dst->i_ino = src->o_id; +// if (valid & OBD_MD_FLID) +// dst->i_ino = src->o_id; if (valid & OBD_MD_FLATIME) dst->i_atime = src->o_atime; if (valid & OBD_MD_FLMTIME) -- 1.8.3.1