diff options
author | Amar Tumballi <amar@gluster.com> | 2011-04-07 00:22:23 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-04-08 01:19:00 -0700 |
commit | 25837b52939398bf3964d20301f0e641033c5c68 (patch) | |
tree | cc03b51452d9281ac4585a8f8bccc90f23bcba88 /xlators | |
parent | 0d440ddb80c55320fe9deda15cecec8e31cab2c1 (diff) |
gluster rebalance: don't move a hardlinked file.
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@gluster.com>
BUG: 2258 (enhance gluster volume rebalance)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2258
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-rebalance.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c index 969dffbf1ff..fec0a1b2e19 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c +++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c @@ -77,8 +77,13 @@ gf_glusterd_rebalance_move_data (glusterd_volinfo_t *volinfo, const char *dir) if (ret == -1) continue; - if (S_ISREG (stbuf.st_mode)) - defrag->num_files_lookedup += 1; + if (!S_ISREG (stbuf.st_mode)) + continue; + + defrag->num_files_lookedup += 1; + + if (stbuf.st_nlink > 1) + continue; /* if distribute is present, it will honor this key. -1 is returned if distribute is not present or file doesn't |