From eb266ade1e2da5739ed66495755ec2784a5bf74b Mon Sep 17 00:00:00 2001 From: Mohit Agrawal Date: Sat, 15 Jul 2017 17:55:14 +0530 Subject: 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 Reviewed-on: https://review.gluster.org/17780 Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Jeff Darcy --- xlators/mgmt/glusterd/src/glusterd-volume-set.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xlators/mgmt') diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index 4c07d3118af..92ff4ba2e60 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -2795,6 +2795,10 @@ struct volopt_map_entry glusterd_volopt_map[] = { .voltype = "storage/posix", .op_version = GD_OP_VERSION_3_12_0, }, + { .key = "storage.reserve", + .voltype = "storage/posix", + .op_version = GD_OP_VERSION_3_12_0, + }, { .key = "storage.bd-aio", .voltype = "storage/bd", .op_version = 3 -- cgit