From b8f3aab95f01ac7d590a5ba490e890d9cf8c2e50 Mon Sep 17 00:00:00 2001 From: Susant Palai Date: Tue, 13 May 2014 12:56:17 -0400 Subject: DHT/readdirp: Directory not shown/healed on mount point if exists on single brick(non first up subvolume). Problem: If snapshot is taken, when mkdir has succeeded only on hashed_subvolume, then after restoring snapshot the directory is not shown on mount point. Why: dht_readdirp takes only those directory entries in to account, which are present on first_up_subvolume. Hence, if the "hashed subvolume" is not same as first_up_subvolume, it wont be listed on mount point and also not healed. Solution: Case 1: (Rebalance not running)If hashed subvolume is NULL or down then filter in first_up_subvolume. Other wise the corresponding hashed subvolume will take care of the directory entry. Case 2: If readdirp_optimize option is turned on then read from first_up_subvol Change-Id: Idaad28f1c9f688dbfb1a8a3ab8b244510c02365e BUG: 1092433 Signed-off-by: Susant Palai Reviewed-on: http://review.gluster.org/7599 Reviewed-by: Raghavendra G Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/cluster/dht/src/dht-common.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xlators/cluster/dht/src/dht-common.h') diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index 2ece28a616b..b61a1e9a319 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -784,4 +784,7 @@ dht_inodectx_dump (xlator_t *this, inode_t *inode); int dht_inode_ctx_get1 (xlator_t *this, inode_t *inode, xlator_t **subvol); +int +dht_subvol_status (dht_conf_t *conf, xlator_t *subvol); + #endif/* _DHT_H */ -- cgit