From a320f2021ee4dcab85483dbe10d85e797bd6b3b4 Mon Sep 17 00:00:00 2001 From: Mohit Agrawal Date: Sat, 15 Jul 2017 17:55:14 +0530 Subject: posix: Ignore disk space reserve check for internal FOPS Problem: Currently disk space reserve check is applicable for internal FOP also it needs to be ignore for internal FOP. Solution: Update the DISK_SPACE_CHECK_AND_GOTO macro at posix component. Macro will call only while key "GLUSTERFS_INTERNAL_FOP_KEY" exists in xdata. BUG: 1506083 Change-Id: I2b0840bbf4fa14bc247855b024ca136773d68d16 Signed-off-by: Mohit Agrawal --- xlators/storage/posix/src/posix.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'xlators/storage/posix/src/posix.h') diff --git a/xlators/storage/posix/src/posix.h b/xlators/storage/posix/src/posix.h index 4ba676fb7c0..b63643d970b 100644 --- a/xlators/storage/posix/src/posix.h +++ b/xlators/storage/posix/src/posix.h @@ -63,8 +63,9 @@ #define GF_UNLINK_TRUE 0x0000000000000001 #define GF_UNLINK_FALSE 0x0000000000000000 -#define DISK_SPACE_CHECK_AND_GOTO(frame, priv, op_ret, op_errno, out) do { \ - if (frame->root->pid >= 0 && priv->disk_space_full) { \ +#define DISK_SPACE_CHECK_AND_GOTO(frame, priv, xdata, op_ret, op_errno, out) do { \ + if (frame->root->pid >= 0 && priv->disk_space_full && \ + !dict_get (xdata, GLUSTERFS_INTERNAL_FOP_KEY)) { \ op_ret = -1; \ op_errno = ENOSPC; \ gf_msg_debug ("posix", ENOSPC, \ @@ -74,6 +75,7 @@ } \ } while (0) + #define GFID_NULL_CHECK_AND_GOTO(frame, this, loc, xattr_req, op_ret, \ op_errno, out) \ do { \ @@ -209,7 +211,7 @@ struct posix_private { pthread_t health_check; gf_boolean_t health_check_active; - uint32_t disk_threshhold; + uint32_t disk_reserve; uint32_t disk_space_full; pthread_t disk_space_check; gf_boolean_t disk_space_check_active; -- cgit