summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.h
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2016-03-17 13:33:34 -0400
committerRaghavendra G <rgowdapp@redhat.com>2016-03-28 03:56:48 -0700
commitcd32751867252219bd66fa300418579080eef924 (patch)
treee2a94e25a4e0df251c414084bc8f883527de6a2a /xlators/cluster/dht/src/dht-common.h
parent76645128ed54d2cb43cc6a047c0bcc3ee43e9aa8 (diff)
dht: report constant directory size
Directory size is meaningless. Every filesystem has its own unpredictable way of increasing or decreasing it, based on internal data structures and even transient conditions. Some filesystems (e.g. ext4) never decrease it at all. Others (e.g. btrfs) don't even report it. Very few programs look at it, and those that do are broken. Unfortunately, one such program is GNU tar, which will complain when it sees different values because at different times we got the value from different DHT subvolumes. To avoid such problems, just report a constant value. Backport of http://review.gluster.org/#/c/13770/ > Change-Id: Id64ce917c75b5f7ff50cb55b6e997f3b3556e7e3 > BUG: 1302948 > Original-author: Shyam <srangana@redhat.com> > Signed-off-by: Jeff Darcy <jdarcy@redhat.com> > Signed-off-by: N Balachandran <nbalacha@redhat.com> > Reviewed-on: http://review.gluster.org/13770 > Smoke: Gluster Build System <jenkins@build.gluster.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> > Reviewed-by: Vijay Bellur <vbellur@redhat.com> Change-Id: Id64ce917c75b5f7ff50cb55b6e997f3b3556e7e3 BUG: 1312721 Original-author: Shyam <srangana@redhat.com> Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/13831 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r--xlators/cluster/dht/src/dht-common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index 31b8b6804b7..53d1489e41b 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -36,6 +36,9 @@
#define DHT_LAYOUT_HASH_INVALID 1
#define TIERING_MIGRATION_KEY "tiering.migration"
+#define DHT_DIR_STAT_BLOCKS 8
+#define DHT_DIR_STAT_SIZE 4096
+
#include <fnmatch.h>
typedef int (*dht_selfheal_dir_cbk_t) (call_frame_t *frame, void *cookie,
@@ -1172,4 +1175,8 @@ dht_fd_ctx_destroy (xlator_t *this, fd_t *fd);
int32_t
dht_release (xlator_t *this, fd_t *fd);
+
+
+int32_t
+dht_set_fixed_dir_stat (struct iatt *stat);
#endif/* _DHT_H */