"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xlators/cluster/dht/src/dht-helper.c" between
glusterfs-8.4.tar.gz and glusterfs-8.5.tar.gz

About: GlusterFS is a network/cluster filesystem. The storage server (or each in a cluster) runs glusterfsd and the clients use mount command or glusterfs client to mount the exported filesystem. Release series 8.x.

dht-helper.c  (glusterfs-8.4):dht-helper.c  (glusterfs-8.5)
skipping to change at line 2268 skipping to change at line 2268
*/ */
void void
dht_dir_set_heal_xattr(xlator_t *this, dht_local_t *local, dict_t *dst, dht_dir_set_heal_xattr(xlator_t *this, dht_local_t *local, dict_t *dst,
dict_t *src, int *uret, int *uflag) dict_t *src, int *uret, int *uflag)
{ {
int ret = -1; int ret = -1;
data_t *keyval = NULL; data_t *keyval = NULL;
int luret = -1; int luret = -1;
int luflag = -1; int luflag = -1;
int i = 0; int i = 0;
char **xattrs_to_heal;
if (!src || !dst) { if (!src || !dst) {
gf_smsg(this->name, GF_LOG_WARNING, EINVAL, DHT_MSG_DST_NULL_SET_FAILED, gf_smsg(this->name, GF_LOG_WARNING, EINVAL, DHT_MSG_DST_NULL_SET_FAILED,
"path=%s", local->loc.path, NULL); "path=%s", local->loc.path, NULL);
return; return;
} }
/* Check if any user xattr present in src dict and set /* Check if any user xattr present in src dict and set
it to dst dict it to dst dict
*/ */
luret = dict_foreach_fnmatch(src, "user.*", dht_set_user_xattr, dst); luret = dict_foreach_fnmatch(src, "user.*", dht_set_user_xattr, dst);
/* Check if any other custom xattr present in src dict /* Check if any other custom xattr present in src dict
and set it to dst dict, here index start from 1 because and set it to dst dict, here index start from 1 because
user xattr already checked in previous statement user xattr already checked in previous statement
*/ */
xattrs_to_heal = get_xattrs_to_heal();
for (i = 1; xattrs_to_heal[i]; i++) { for (i = 1; xattrs_to_heal[i]; i++) {
keyval = dict_get(src, xattrs_to_heal[i]); keyval = dict_get(src, xattrs_to_heal[i]);
if (keyval) { if (keyval) {
luflag = 1; luflag = 1;
ret = dict_set(dst, xattrs_to_heal[i], keyval); ret = dict_set(dst, xattrs_to_heal[i], keyval);
if (ret) if (ret)
gf_smsg(this->name, GF_LOG_WARNING, ENOMEM, gf_smsg(this->name, GF_LOG_WARNING, ENOMEM,
DHT_MSG_DICT_SET_FAILED, "key=%s", xattrs_to_heal[i], DHT_MSG_DICT_SET_FAILED, "key=%s", xattrs_to_heal[i],
"path=%s", local->loc.path, NULL); "path=%s", local->loc.path, NULL);
keyval = NULL; keyval = NULL;
 End of changes. 2 change blocks. 
0 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)