From fc0d1901839f9a34fb2bfb7be1e3953b29848460 Mon Sep 17 00:00:00 2001 From: Sergey Cheremencev Date: Fri, 24 Jul 2020 13:20:17 +0300 Subject: [PATCH] LU-13817 quota: print error when pool is absent Print error for "lfs quota --pool" and "lfs setquota -o" if pool is absent. HPE-bug-id: LUS-9112 Test-Parameters: trivial testlist=sanity-quota Change-Id: I4c2aa41d8c6f27742e68dfdc78c9d9365c760237 Signed-off-by: Sergey Cheremencev Reviewed-on: https://review.whamcloud.com/39505 Reviewed-by: Andreas Dilger Reviewed-by: Emoly Liu Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/utils/liblustreapi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c index 44ac26c..43fd548 100644 --- a/lustre/utils/liblustreapi.c +++ b/lustre/utils/liblustreapi.c @@ -5683,6 +5683,9 @@ int llapi_quotactl(char *mnt, struct if_quotactl *qctl) rc = ioctl(root, OBD_IOC_QUOTACTL, qctl); if (rc < 0) rc = -errno; + if (rc == -ENOENT && LUSTRE_Q_CMD_IS_POOL(qctl->qc_cmd)) + llapi_error(LLAPI_MSG_ERROR | LLAPI_MSG_NO_ERRNO, rc, + "Cannot find pool '%s'", qctl->qc_poolname); close(root); return rc; -- 1.8.3.1