Whamcloud - gitweb
Branch: b1_5
authorwangdi <wangdi>
Tue, 30 May 2006 18:10:11 +0000 (18:10 +0000)
committerwangdi <wangdi>
Tue, 30 May 2006 18:10:11 +0000 (18:10 +0000)
work around ia_attr_flags for fc5 build

lustre/mds/mds_lib.c
lustre/mds/mds_reint.c

index 17cf471..5d6145b 100644 (file)
@@ -115,8 +115,11 @@ static int mds_setattr_unpack(struct ptlrpc_request *req, int offset,
         LTIME_S(attr->ia_atime) = rec->sa_atime;
         LTIME_S(attr->ia_mtime) = rec->sa_mtime;
         LTIME_S(attr->ia_ctime) = rec->sa_ctime;
+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,14))
         attr->ia_attr_flags = rec->sa_attr_flags;
-
+#else
+        #warning "fix it later for fc5"
+#endif
         LASSERT_REQSWAB (req, offset + 1);
         if (lustre_msg_bufcount(req->rq_reqmsg) > offset + 1) {
                 r->ur_eadata = lustre_msg_buf(req->rq_reqmsg, offset + 1, 0);
index 4bd1670..c35d15b 100644 (file)
@@ -572,8 +572,13 @@ static int mds_reint_setattr(struct mds_update_record *rec, int offset,
                 GOTO(cleanup, rc);
 
         if (rec->ur_iattr.ia_valid & ATTR_ATTR_FLAG) {  /* ioctl */
+
+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,14))
                 rc = fsfilt_iocontrol(obd, inode, NULL, EXT3_IOC_SETFLAGS,
                                       (long)&rec->ur_iattr.ia_attr_flags);
+#else
+        #warning "fix it later for fc5"
+#endif
         } else if (rec->ur_iattr.ia_valid) {            /* setattr */
                 rc = fsfilt_setattr(obd, de, handle, &rec->ur_iattr, 0);
                 /* journal chown/chgrp in llog, just like unlink */