Whamcloud - gitweb
(1) "lfs getfacl" should return base file mode anyway.
authorfanyong <fanyong>
Sun, 29 Oct 2006 14:19:19 +0000 (14:19 +0000)
committerfanyong <fanyong>
Sun, 29 Oct 2006 14:19:19 +0000 (14:19 +0000)
(2) make "lfs setfacl" more like local client setfacl.

lustre/llite/llite_lib.c
lustre/utils/liblustreapi.c

index e34cbd4..99f9a34 100644 (file)
@@ -2279,7 +2279,6 @@ void ll_finish_md_op_data(struct md_op_data *op_data)
 
 int ll_ioctl_getfacl(struct inode *inode, struct rmtacl_ioctl_data *ioc)
 {
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
         struct ptlrpc_request *req = NULL;
         struct mdt_body *body;
         char *cmd, *buf;
@@ -2287,10 +2286,6 @@ int ll_ioctl_getfacl(struct inode *inode, struct rmtacl_ioctl_data *ioc)
         int rc, buflen;
         ENTRY;
 
-        if (!(sbi->ll_flags & LL_SBI_ACL) ||
-            !(sbi->ll_flags & LL_SBI_RMT_CLIENT))
-                RETURN(-EOPNOTSUPP);
-
         LASSERT(ioc->cmd && ioc->cmd_len && ioc->res && ioc->res_len);
 
         OBD_ALLOC(cmd, ioc->cmd_len);
index 1499ca0..3f4c8df 100644 (file)
@@ -1300,7 +1300,10 @@ int llapi_setfacl(char *fname, char *cmd)
 
         rc = ioctl(fd, LL_IOC_SETFACL, &data);
         close(fd);
-        if (rc) {
+        if (errno == EOPNOTSUPP) {
+                fprintf(stderr, "setfacl: %s: %s\n", fname, strerror(errno));
+                rc = 1;
+        } else if (rc) {
                 err_msg("setfacl %s failed", fname);
         } else {
                 printf("%s", out);