summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix-helpers.c
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2018-06-13 12:26:55 +0530
committerjiffin tony Thottan <jthottan@redhat.com>2018-06-13 12:31:08 +0000
commit81701e4d92ae7b1d97e5bc955703719f2e9e773a (patch)
tree3584be687e2118189f73282cee559992e3f521c4 /xlators/storage/posix/src/posix-helpers.c
parentc30aca6a5b25223e36b4ea812af544e348952138 (diff)
storage/posix: Fix excessive logging in WRITE fop path
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#1590655 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix-helpers.c')
-rw-r--r--xlators/storage/posix/src/posix-helpers.c3
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 00118b2d123..236f2e61c33 100644
--- a/xlators/storage/posix/src/posix-helpers.c
+++ b/xlators/storage/posix/src/posix-helpers.c
@@ -2870,6 +2870,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);