From 39aa9584b1ce52d3dd5fa890ca11c21eaa18daf9 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Mon, 3 May 2021 12:29:40 -0700 Subject: [PATCH] Log error message if setting project quota ID fails Otherwise, the only sign of what went wrong may be system_server logging a "ServiceSpecificException". Bug: 187079978 Change-Id: I59b2ba2b0e679dfd1ec1fd8fff6790256fbfdf29 --- Utils.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Utils.cpp b/Utils.cpp index 9ff7920..9b31f72 100644 --- a/Utils.cpp +++ b/Utils.cpp @@ -240,7 +240,12 @@ int SetQuotaProjectId(const std::string& path, long projectId) { } fsx.fsx_projid = projectId; - return ioctl(fd, FS_IOC_FSSETXATTR, &fsx); + ret = ioctl(fd, FS_IOC_FSSETXATTR, &fsx); + if (ret == -1) { + PLOG(ERROR) << "Failed to set project id on " << path; + return ret; + } + return 0; } int PrepareDirWithProjectId(const std::string& path, mode_t mode, uid_t uid, gid_t gid, -- 2.11.0