From febf5ed4848ad705a34413353559482417c61467 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Fri, 23 Jun 2017 13:10:56 +0530 Subject: posix: option to handle the shared bricks for statvfs() Currently 'storage/posix' xlator has an option called option `export-statfs-size no`, which exports zero as values for few fields in `struct statvfs`. In a case of backend brick shared between multiple brick processes, the values of these variables should be `field_value / number-of-bricks-at-node`. This way, even the issue of 'min-free-disk' etc at different layers would also be handled properly when the statfs() sys call is made. Fixes #241 Change-Id: I2e320e1fdcc819ab9173277ef3498201432c275f Signed-off-by: Amar Tumballi Reviewed-on: https://review.gluster.org/17618 CentOS-regression: Gluster Build System Smoke: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Atin Mukherjee --- xlators/storage/posix/src/posix.h | 3 +++ 1 file changed, 3 insertions(+) (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 480566a5340..81158266111 100644 --- a/xlators/storage/posix/src/posix.h +++ b/xlators/storage/posix/src/posix.h @@ -176,6 +176,9 @@ struct posix_private { } xattr_user_namespace; #endif + /* Option to handle the cases of multiple bricks exported from + same backend. Very much usable in brick-splitting feature. */ + int32_t shared_brick_count; }; typedef struct { -- cgit