diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2018-06-13 12:26:55 +0530 |
---|---|---|
committer | Krutika Dhananjay <kdhananj@redhat.com> | 2018-08-10 05:39:27 +0000 |
commit | 6087f73c04797867cf65092174542672b391b21a (patch) | |
tree | a1bc79df95b0f19c9b7f19f08097585b7f0a46a9 /xlators/storage/posix/src/posix-helpers.c | |
parent | 92ee3a04d559466a3c6ae23b6a29147538430758 (diff) |
storage/posix: Fix excessive logging in WRITE fop path
Backport of: https://review.gluster.org/#/c/glusterfs/+/20250
I was running some write-intensive tests on my volume, and in a matter
of 2 hrs, the 50GB space in my root partition was exhausted. On inspecting
further, figured that excessive logging in bricks was the cause -
specifically in posix write when posix_check_internal_writes() does
dict_get() without a NULL-check on xdata.
Change-Id: I89de57a3a90ca5c375e5b9477801a9e5ff018bbf
fixes: bz#1596686
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
(cherry picked from commit 81701e4d92ae7b1d97e5bc955703719f2e9e773a)
Diffstat (limited to 'xlators/storage/posix/src/posix-helpers.c')
-rw-r--r-- | xlators/storage/posix/src/posix-helpers.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index c87f4f59b82..f18f181c454 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -2863,6 +2863,9 @@ posix_check_internal_writes (xlator_t *this, fd_t *fd, int sysfd, size_t xattrsize = 0; data_t *val = NULL; + if (!xdata) + return 0; + LOCK (&fd->inode->lock); { val = dict_get (xdata, GF_PROTECT_FROM_EXTERNAL_WRITES); |