From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Wed, 16 Sep 2009 16:03:38 +0100 Subject: [Cluster-devel] [PATCH 06/10] GFS2: Add proper error reporting to quota sync via sysfs In-Reply-To: <1253113422-3429-6-git-send-email-swhiteho@redhat.com> References: <1253113422-3429-1-git-send-email-swhiteho@redhat.com> <1253113422-3429-2-git-send-email-swhiteho@redhat.com> <1253113422-3429-3-git-send-email-swhiteho@redhat.com> <1253113422-3429-4-git-send-email-swhiteho@redhat.com> <1253113422-3429-5-git-send-email-swhiteho@redhat.com> <1253113422-3429-6-git-send-email-swhiteho@redhat.com> Message-ID: <1253113422-3429-7-git-send-email-swhiteho@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit For some reason, the errors were not making it to userspace. Signed-off-by: Steven Whitehouse --- fs/gfs2/sys.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index b9e68e6..35ef542 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c @@ -178,6 +178,7 @@ static ssize_t quota_sync_store(struct gfs2_sbd *sdp, const char *buf, static ssize_t quota_refresh_user_store(struct gfs2_sbd *sdp, const char *buf, size_t len) { + int error; u32 id; if (!capable(CAP_SYS_ADMIN)) @@ -185,13 +186,14 @@ static ssize_t quota_refresh_user_store(struct gfs2_sbd *sdp, const char *buf, id = simple_strtoul(buf, NULL, 0); - gfs2_quota_refresh(sdp, 1, id); - return len; + error = gfs2_quota_refresh(sdp, 1, id); + return error ? error : len; } static ssize_t quota_refresh_group_store(struct gfs2_sbd *sdp, const char *buf, size_t len) { + int error; u32 id; if (!capable(CAP_SYS_ADMIN)) @@ -199,8 +201,8 @@ static ssize_t quota_refresh_group_store(struct gfs2_sbd *sdp, const char *buf, id = simple_strtoul(buf, NULL, 0); - gfs2_quota_refresh(sdp, 0, id); - return len; + error = gfs2_quota_refresh(sdp, 0, id); + return error ? error : len; } static ssize_t demote_rq_store(struct gfs2_sbd *sdp, const char *buf, size_t len) -- 1.6.2.5