summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix-aio.c
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawa@redhat.com>2017-07-15 17:55:14 +0530
committerJeff Darcy <jeff@pl.atyp.us>2017-07-25 15:36:55 +0000
commiteb266ade1e2da5739ed66495755ec2784a5bf74b (patch)
tree7344acb564f15da30f8279670bfdc56b96b21a7c /xlators/storage/posix/src/posix-aio.c
parent7140858c3816c89d22d81ddfaa1d270db5dfd622 (diff)
posix: Needs to reserve disk space to prevent the brick from getting full
Problem: Currently there is no option available at posix xlator to save the disk from getting full Solution: Introduce a new option storage.reserve at posix xlator to configure disk threshold.posix xlator spawn a thread to update the disk space status in posix private structure and same flag is checked by every posix fop before start operation.If flag value is 1 then it sets op_errno to ENOSPC and goto out from the fop. BUG: 1471366 Change-Id: I98287cd409860f4c754fc69a332e0521bfb1b67e Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Reviewed-on: https://review.gluster.org/17780 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Diffstat (limited to 'xlators/storage/posix/src/posix-aio.c')
-rw-r--r--xlators/storage/posix/src/posix-aio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix-aio.c b/xlators/storage/posix/src/posix-aio.c
index b5ac1b9..2adafeb 100644
--- a/xlators/storage/posix/src/posix-aio.c
+++ b/xlators/storage/posix/src/posix-aio.c
@@ -330,6 +330,7 @@ posix_aio_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
VALIDATE_OR_GOTO (fd, err);
priv = this->private;
+ DISK_SPACE_CHECK_AND_GOTO (frame, priv, op_errno, op_errno, err);
ret = posix_fd_ctx_get (fd, this, &pfd, &op_errno);
if (ret < 0) {