Whamcloud - gitweb
LU-8376 ost: enhance end to end bulk cksum error report
[fs/lustre-release.git] / lustre / obdclass / obdo.c
index 478081f..dddb24b 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * GPL HEADER END
  */
@@ -59,6 +55,13 @@ void obdo_set_parent_fid(struct obdo *dst, const struct lu_fid *parent)
 }
 EXPORT_SYMBOL(obdo_set_parent_fid);
 
+void obdo_set_o_projid(struct obdo *dst, u32 projid)
+{
+       dst->o_projid = projid;
+       dst->o_valid |= OBD_MD_FLPROJID;
+}
+EXPORT_SYMBOL(obdo_set_o_projid);
+
 /* WARNING: the file systems must take care not to tinker with
    attributes they don't manage (such as blocks). */
 void obdo_from_inode(struct obdo *dst, struct inode *src, u64 valid)
@@ -179,7 +182,6 @@ void lustre_set_wire_obdo(const struct obd_connect_data *ocd,
                                 const struct obdo *lobdo)
 {
        *wobdo = *lobdo;
-       wobdo->o_flags &= ~OBD_FL_LOCAL_MASK;
        if (ocd == NULL)
                return;
 
@@ -200,17 +202,7 @@ void lustre_get_wire_obdo(const struct obd_connect_data *ocd,
                                 struct obdo *lobdo,
                                 const struct obdo *wobdo)
 {
-       __u32 local_flags = 0;
-
-       if (lobdo->o_valid & OBD_MD_FLFLAGS)
-               local_flags = lobdo->o_flags & OBD_FL_LOCAL_MASK;
-
        *lobdo = *wobdo;
-       if (local_flags != 0) {
-               lobdo->o_valid |= OBD_MD_FLFLAGS;
-               lobdo->o_flags &= ~OBD_FL_LOCAL_MASK;
-               lobdo->o_flags |= local_flags;
-       }
        if (ocd == NULL)
                return;