Don't print an error when running "lfs pcc status" against an older
server without the "lustre.pin" xattr returns EOPNOTSUPP.
Test-Parameters: trivial testlist=sanity-pcc serverversion=2.14.0-ddn23
Fixes:
f9970c0a70 ("EX-5249 utils: show pin information in 'lfs pcc state' command")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Iab235b8be497386752915baeb31347cf8137eed0
Reviewed-on: https://review.whamcloud.com/47723
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Feng, Lei <flei@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
rc2 = getxattr(path, XATTR_LUSTRE_PIN, buff, sizeof(buff));
if (rc2 < 0) {
- if (errno != ENODATA) {
+ /* since this is using "lustre.pin" to allow non-root
+ * users read access and not "trusted.pin", older
+ * servers will return EOPNOTSUPP since the "lustre"
+ * namespace is individually mapped to specific
+ * "trusted.foo" xattrs and is otherwise unimplemented.
+ */
+ if (errno != ENODATA && errno != EOPNOTSUPP) {
if (rc == 0)
rc = -errno;
fprintf(stderr,