Whamcloud - gitweb
Branch HEAD
authorfanyong <fanyong>
Tue, 19 Feb 2008 09:48:05 +0000 (09:48 +0000)
committerfanyong <fanyong>
Tue, 19 Feb 2008 09:48:05 +0000 (09:48 +0000)
b=14906
i=eric.mei
i=h.huang

Fix swab issues for remote_perm introduced when land "mixed_layout_req".

lustre/mdc/mdc_locks.c
lustre/mdc/mdc_request.c
lustre/utils/liblustreapi.c

index 70aca4a..c546ef8 100644 (file)
@@ -644,11 +644,10 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
                         struct mdt_remote_perm *perm;
 
                         LASSERT(client_is_remote(exp));
-                        perm = req_capsule_server_get(pill, &RMF_ACL);
+                        perm = req_capsule_server_swab_get(pill, &RMF_ACL,
+                                                lustre_swab_mdt_remote_perm);
                         if (perm == NULL)
                                 RETURN(-EPROTO);
-
-                        lustre_swab_mdt_remote_perm(perm);
                 }
                 if (body->valid & OBD_MD_FLMDSCAPA) {
                         struct lustre_capa *capa, *p;
index 953e148..ee3481b 100644 (file)
@@ -182,7 +182,10 @@ static int mdc_getattr_common(struct obd_export *exp,
 
         if (body->valid & OBD_MD_FLRMTPERM) {
                 struct mdt_remote_perm *perm;
-                perm = req_capsule_server_get(pill, &RMF_ACL);
+
+                LASSERT(client_is_remote(exp));
+                perm = req_capsule_server_swab_get(pill, &RMF_ACL,
+                                                lustre_swab_mdt_remote_perm);
                 if (perm == NULL)
                         RETURN(-EPROTO);
         }
index d43a7a2..47d46e5 100644 (file)
@@ -1896,7 +1896,7 @@ static int do_rmtacl(int argc, char *argv[], int ops, int (output_func)(char *))
                 }
 
                 if ((pid = fork()) < 0) {
-                        perror("pipe");
+                        perror("fork");
                         close(fd[0]);
                         close(fd[1]);
                         return -1;