cluster/dht: node-uuid for directories winds to all subvolumes
this works similar to pathinfo now except that the request is sent to all subvolumes of dht. Underlying replica selects it's subvolume in a round-robin fashion till one of them returns successfully. Change-Id: Ie46c5f7090d04d8c2e487b209916ae6791e94624 BUG: 847839 Original Author: Venky Shankar <vshankar@redhat.com> Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/5225 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
This commit is contained in:
parent
a2a01c5653
commit
51ed78005c
@ -1803,6 +1803,7 @@ dht_vgetxattr_alloc_and_fill (dht_local_t *local, dict_t *xattr, xlator_t *this,
|
||||
}
|
||||
|
||||
(void) strcat (local->xattr_val, value);
|
||||
(void) strcat (local->xattr_val, " ");
|
||||
local->op_ret = 0;
|
||||
}
|
||||
|
||||
@ -1827,6 +1828,8 @@ dht_vgetxattr_fill_and_set (dht_local_t *local, dict_t **dict, xlator_t *this,
|
||||
if (!*dict)
|
||||
goto out;
|
||||
|
||||
local->xattr_val[strlen (local->xattr_val) - 1] = '\0';
|
||||
|
||||
/* we would need max this many bytes to create xattr string
|
||||
* extra 40 bytes is just an estimated amount of additional
|
||||
* space required as we include translator name and some
|
||||
@ -2179,8 +2182,9 @@ dht_getxattr (call_frame_t *frame, xlator_t *this,
|
||||
* NOTE: Don't trust inode here, as that may not be valid
|
||||
* (until inode_link() happens)
|
||||
*/
|
||||
if (key && (strcmp (key, GF_XATTR_PATHINFO_KEY) == 0)
|
||||
&& DHT_IS_DIR(layout)) {
|
||||
if (key && DHT_IS_DIR(layout) &&
|
||||
((strcmp (key, GF_XATTR_PATHINFO_KEY) == 0)
|
||||
|| (strcmp (key, GF_XATTR_NODE_UUID_KEY) == 0))) {
|
||||
(void) strncpy (local->xsel, key, 256);
|
||||
cnt = local->call_cnt = layout->cnt;
|
||||
for (i = 0; i < cnt; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user