diff options
author | Mohit Agrawal <moagrawa@redhat.com> | 2017-07-15 17:55:14 +0530 |
---|---|---|
committer | Jeff Darcy <jeff@pl.atyp.us> | 2017-10-30 15:53:46 +0000 |
commit | a320f2021ee4dcab85483dbe10d85e797bd6b3b4 (patch) | |
tree | 4b9c2993b72dd388c33e5e40578ea9000e7f8494 /xlators/storage/posix/src/posix.h | |
parent | ae9b006f23b1408ff548348440369d056becdc1d (diff) |
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 <moagrawa@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix.h')
-rw-r--r-- | xlators/storage/posix/src/posix.h | 8 |
1 files changed, 5 insertions, 3 deletions
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; |