From 0568c34e180ec7e7a9f123684d4e3757797711cb Mon Sep 17 00:00:00 2001 From: fanyong Date: Sun, 29 Oct 2006 14:19:19 +0000 Subject: [PATCH] (1) "lfs getfacl" should return base file mode anyway. (2) make "lfs setfacl" more like local client setfacl. --- lustre/llite/llite_lib.c | 5 ----- lustre/utils/liblustreapi.c | 5 ++++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index e34cbd4..99f9a34 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -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); diff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c index 1499ca0..3f4c8df 100644 --- a/lustre/utils/liblustreapi.c +++ b/lustre/utils/liblustreapi.c @@ -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); -- 1.8.3.1