From 4462b4a31e7ac3a4394f46d7d3067cc03fd24dee Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Thu, 28 Jan 2010 08:24:23 +0000 Subject: cluster/dht: Check for size 0 in check_is_linkfile() Signed-off-by: Vijay Bellur Signed-off-by: Anand V. Avati BUG: 574 (Sticky bit files are not listed in the output of ls on a dht volume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=574 --- xlators/cluster/dht/src/dht-common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/cluster') diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index 3997791d69a..f8a60b52038 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -161,7 +161,9 @@ typedef struct dht_disk_layout dht_disk_layout_t; #define is_last_call(cnt) (cnt == 0) #define DHT_LINKFILE_MODE (S_ISVTX) -#define check_is_linkfile(i,s,x) ((s->st_mode & ~S_IFMT) == DHT_LINKFILE_MODE) +#define check_is_linkfile(i,s,x) ( \ + ((s->st_mode & ~S_IFMT) == DHT_LINKFILE_MODE) && \ + (s->st_size == 0)) #define check_is_dir(i,s,x) (S_ISDIR(s->st_mode)) -- cgit