log message cleanup in distribute

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
This commit is contained in:
Anand V. Avati 2009-04-21 19:39:24 +05:30
parent 53f4af3aad
commit 29f111a22f
9 changed files with 242 additions and 291 deletions

File diff suppressed because it is too large Load Diff

View File

@ -83,14 +83,14 @@ dht_get_du_info_for_subvol (xlator_t *this, int subvol_idx)
statfs_frame = create_frame (this, pool);
if (!statfs_frame) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto err;
}
statfs_local = dht_local_init (statfs_frame);
if (!statfs_local) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto err;
}
@ -130,14 +130,14 @@ dht_get_du_info (call_frame_t *frame, xlator_t *this, loc_t *loc)
statfs_frame = copy_frame (frame);
if (!statfs_frame) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto err;
}
statfs_local = dht_local_init (statfs_frame);
if (!statfs_local) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto err;
}
@ -157,7 +157,7 @@ dht_get_du_info (call_frame_t *frame, xlator_t *this, loc_t *loc)
conf->last_stat_fetch.tv_sec = tv.tv_sec;
}
return 0;
err:
err:
if (statfs_frame)
DHT_STACK_DESTROY (statfs_frame);
@ -227,8 +227,8 @@ dht_free_disk_available_subvol (xlator_t *this, xlator_t *subvol)
avail_subvol = subvol;
if (avail_subvol == subvol) {
gf_log (this->name, GF_LOG_CRITICAL,
"no node has enough free space to schedule create");
gf_log (this->name, GF_LOG_WARNING,
"No subvolume has enough free space to create");
}
return avail_subvol;

View File

@ -214,7 +214,7 @@ dht_subvol_get_hashed (xlator_t *this, loc_t *loc)
layout = dht_layout_get (this, loc->parent);
if (!layout) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"layout missing path=%s parent=%"PRId64,
loc->path, loc->parent->ino);
goto out;
@ -223,7 +223,7 @@ dht_subvol_get_hashed (xlator_t *this, loc_t *loc)
subvol = dht_layout_search (this, layout, loc->name);
if (!subvol) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"could not find subvolume for path=%s",
loc->path);
goto out;

View File

@ -44,7 +44,7 @@ dht_layout_new (xlator_t *this, int cnt)
layout = CALLOC (1, layout_size (cnt));
if (!layout) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto out;
}
@ -78,7 +78,7 @@ dht_layout_search (xlator_t *this, dht_layout_t *layout, const char *name)
ret = dht_hash_compute (layout->type, name, &hash);
if (ret != 0) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"hash computation failed for type=%d name=%s",
layout->type, name);
goto out;
@ -135,7 +135,7 @@ dht_layouts_init (xlator_t *this, dht_conf_t *conf)
sizeof (dht_layout_t *));
if (!conf->file_layouts) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto out;
}
@ -169,7 +169,7 @@ dht_disk_layout_extract (xlator_t *this, dht_layout_t *layout,
disk_layout = CALLOC (5, sizeof (int));
if (!disk_layout) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto out;
}
@ -200,7 +200,7 @@ dht_disk_layout_merge (xlator_t *this, dht_layout_t *layout,
cnt = ntoh32 (disk_layout[0]);
if (cnt != 1) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"disk layout has invalid count %d", cnt);
return -1;
}
@ -213,7 +213,7 @@ dht_disk_layout_merge (xlator_t *this, dht_layout_t *layout,
layout->list[pos].start = start_off;
layout->list[pos].stop = stop_off;
gf_log (this->name, GF_LOG_DEBUG,
gf_log (this->name, GF_LOG_TRACE,
"merged to layout: %u - %u (type %d) from %s",
start_off, stop_off, type,
layout->list[pos].xlator->name);
@ -266,7 +266,7 @@ dht_layout_merge (xlator_t *this, dht_layout_t *layout, xlator_t *subvol,
ret = dht_disk_layout_merge (this, layout, i, disk_layout);
if (ret != 0) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"layout merge from subvolume %s failed",
subvol->name);
goto out;
@ -463,7 +463,7 @@ dht_layout_normalize (xlator_t *this, loc_t *loc, dht_layout_t *layout)
ret = dht_layout_sort (layout);
if (ret == -1) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"sort failed?! how the ....");
goto out;
}
@ -472,7 +472,7 @@ dht_layout_normalize (xlator_t *this, loc_t *loc, dht_layout_t *layout)
&holes, &overlaps,
&missing, &down, &misc);
if (ret == -1) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"error while finding anomalies in %s -- not good news",
loc->path);
goto out;
@ -480,11 +480,11 @@ dht_layout_normalize (xlator_t *this, loc_t *loc, dht_layout_t *layout)
if (holes || overlaps) {
if (missing == layout->cnt) {
gf_log (this->name, GF_LOG_WARNING,
gf_log (this->name, GF_LOG_DEBUG,
"directory %s looked up first time",
loc->path);
} else {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"found anomalies in %s. holes=%d overlaps=%d",
loc->path, holes, overlaps);
}
@ -496,7 +496,7 @@ dht_layout_normalize (xlator_t *this, loc_t *loc, dht_layout_t *layout)
* detect this - probably in dht_layout_anomalies()
*/
if (layout->list[i].err == ENOENT) {
gf_log (this->name, GF_LOG_WARNING,
gf_log (this->name, GF_LOG_DEBUG,
"path=%s ENOENT - directory entry"
" should be created in selfheal", loc->path);
ret = 1;
@ -543,7 +543,7 @@ dht_layout_dir_mismatch (xlator_t *this, dht_layout_t *layout, xlator_t *subvol,
if (!xattr) {
if (err == 0) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"%s - xattr dictionary is NULL",
loc->path);
ret = -1;
@ -556,7 +556,7 @@ dht_layout_dir_mismatch (xlator_t *this, dht_layout_t *layout, xlator_t *subvol,
if (dict_ret < 0) {
if (err == 0) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"%s - disk layout missing", loc->path);
ret = -1;
}
@ -565,7 +565,7 @@ dht_layout_dir_mismatch (xlator_t *this, dht_layout_t *layout, xlator_t *subvol,
count = ntoh32 (disk_layout[0]);
if (count != 1) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"%s - disk layout has invalid count %d",
loc->path, count);
ret = -1;
@ -577,7 +577,7 @@ dht_layout_dir_mismatch (xlator_t *this, dht_layout_t *layout, xlator_t *subvol,
if ((layout->list[pos].start != start_off)
|| (layout->list[pos].stop != stop_off)) {
gf_log (this->name, GF_LOG_WARNING,
gf_log (this->name, GF_LOG_DEBUG,
"subvol: %s; inode layout - %"PRId32" - %"PRId32"; "
"disk layout - %"PRId32" - %"PRId32,
layout->list[pos].xlator->name,
@ -600,7 +600,7 @@ dht_layout_inode_set (xlator_t *this, xlator_t *subvol, inode_t *inode)
layout = dht_layout_for_subvol (this, subvol);
if (!layout) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"no pre-set layout for subvolume %s",
subvol ? subvol->name : "<nil>");
ret = -1;

View File

@ -66,7 +66,7 @@ dht_linkfile_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
xattr = get_new_dict ();
if (!xattr) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
op_errno = ENOMEM;
goto err;
}
@ -77,14 +77,14 @@ dht_linkfile_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
str_data = str_to_data (local->linkfile.srcvol->name);
if (!str_data) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
op_errno = ENOMEM;
goto err;
}
ret = dict_set (xattr, "trusted.glusterfs.dht.linkto", str_data);
if (ret < 0) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"failed to initialize linkfile data");
op_errno = EINVAL;
}
@ -143,7 +143,7 @@ dht_linkfile_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
subvol = prev->this;
if (op_ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
gf_log (this->name, GF_LOG_DEBUG,
"unlinking linkfile %s on %s failed (%s)",
local->loc.path, subvol->name, strerror (op_errno));
}
@ -164,14 +164,14 @@ dht_linkfile_unlink (call_frame_t *frame, xlator_t *this,
unlink_frame = copy_frame (frame);
if (!unlink_frame) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto err;
}
unlink_local = dht_local_init (unlink_frame);
if (!unlink_local) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto err;
}

View File

@ -46,7 +46,7 @@ dht_rename_dir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1) {
/* TODO: undo the damage */
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"rename %s -> %s on %s failed (%s)",
local->loc.path, local->loc2.path,
prev->this->name, strerror (op_errno));
@ -112,7 +112,7 @@ dht_rename_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
prev = cookie;
if (op_ret > 2) {
gf_log (this->name, GF_LOG_DEBUG,
gf_log (this->name, GF_LOG_TRACE,
"readdir on %s for %s returned %d entries",
prev->this->name, local->loc.path, op_ret);
local->op_ret = -1;
@ -142,7 +142,7 @@ dht_rename_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
prev = cookie;
if (op_ret == -1) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"opendir on %s for %s failed (%s)",
prev->this->name, local->loc.path,
strerror (op_errno));
@ -183,7 +183,7 @@ dht_rename_dir (call_frame_t *frame, xlator_t *this)
local->fd = fd_create (local->loc.inode, frame->root->pid);
if (!local->fd) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
op_errno = ENOMEM;
goto err;
}
@ -225,7 +225,7 @@ dht_rename_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
this_call_cnt = dht_frame_return (frame);
if (op_ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
gf_log (this->name, GF_LOG_DEBUG,
"unlink on %s failed (%s)",
prev->this->name, strerror (op_errno));
}
@ -291,7 +291,7 @@ dht_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto unwind;
if (src_cached != dst_hashed && src_cached != dst_cached) {
gf_log (this->name, GF_LOG_DEBUG,
gf_log (this->name, GF_LOG_TRACE,
"deleting old src datafile %s @ %s",
local->loc.path, src_cached->name);
@ -301,7 +301,7 @@ dht_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
if (src_hashed != rename_subvol && src_hashed != src_cached) {
gf_log (this->name, GF_LOG_DEBUG,
gf_log (this->name, GF_LOG_TRACE,
"deleting old src linkfile %s @ %s",
local->loc.path, src_hashed->name);
@ -313,7 +313,7 @@ dht_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (dst_cached
&& (dst_cached != dst_hashed)
&& (dst_cached != src_cached)) {
gf_log (this->name, GF_LOG_DEBUG,
gf_log (this->name, GF_LOG_TRACE,
"deleting old dst datafile %s @ %s",
local->loc2.path, dst_cached->name);
@ -354,7 +354,7 @@ dht_do_rename (call_frame_t *frame)
else
rename_subvol = dst_hashed;
gf_log (this->name, GF_LOG_DEBUG,
gf_log (this->name, GF_LOG_TRACE,
"renaming %s => %s (%s)",
local->loc.path, local->loc2.path, rename_subvol->name);
@ -437,7 +437,7 @@ dht_rename_create_links (call_frame_t *frame)
local->call_cnt = call_cnt;
if (dst_hashed != src_hashed && dst_hashed != src_cached) {
gf_log (this->name, GF_LOG_DEBUG,
gf_log (this->name, GF_LOG_TRACE,
"linkfile %s @ %s => %s",
local->loc.path, dst_hashed->name, src_cached->name);
dht_linkfile_create (frame, dht_rename_links_cbk,
@ -445,7 +445,7 @@ dht_rename_create_links (call_frame_t *frame)
}
if (src_cached != dst_hashed) {
gf_log (this->name, GF_LOG_DEBUG,
gf_log (this->name, GF_LOG_TRACE,
"link %s => %s (%s)", local->loc.path,
local->loc2.path, src_cached->name);
STACK_WIND (frame, dht_rename_links_cbk,
@ -483,7 +483,7 @@ dht_rename (call_frame_t *frame, xlator_t *this,
src_hashed = dht_subvol_get_hashed (this, oldloc);
if (!src_hashed) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"no subvolume in layout for path=%s",
oldloc->path);
op_errno = EINVAL;
@ -492,7 +492,7 @@ dht_rename (call_frame_t *frame, xlator_t *this,
src_cached = dht_subvol_get_cached (this, oldloc->inode);
if (!src_cached) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"no cached subvolume for path=%s", oldloc->path);
op_errno = EINVAL;
goto err;
@ -500,7 +500,7 @@ dht_rename (call_frame_t *frame, xlator_t *this,
dst_hashed = dht_subvol_get_hashed (this, newloc);
if (!dst_hashed) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"no subvolume in layout for path=%s",
newloc->path);
op_errno = EINVAL;
@ -514,7 +514,7 @@ dht_rename (call_frame_t *frame, xlator_t *this,
if (!local) {
op_errno = ENOMEM;
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto err;
}
@ -522,7 +522,7 @@ dht_rename (call_frame_t *frame, xlator_t *this,
if (ret == -1) {
op_errno = ENOMEM;
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto err;
}
@ -530,7 +530,7 @@ dht_rename (call_frame_t *frame, xlator_t *this,
if (ret == -1) {
op_errno = ENOMEM;
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto err;
}
@ -539,7 +539,7 @@ dht_rename (call_frame_t *frame, xlator_t *this,
local->dst_hashed = dst_hashed;
local->dst_cached = dst_cached;
gf_log (this->name, GF_LOG_DEBUG,
gf_log (this->name, GF_LOG_TRACE,
"renaming %s (hash=%s/cache=%s) => %s (hash=%s/cache=%s)",
oldloc->path, src_hashed->name, src_cached->name,
newloc->path, dst_hashed->name,

View File

@ -98,13 +98,13 @@ dht_selfheal_dir_xattr_persubvol (call_frame_t *frame, loc_t *loc,
xattr = get_new_dict ();
if (!xattr) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto err;
}
ret = dht_disk_layout_extract (this, layout, i, &disk_layout);
if (ret == -1) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"failed to extract disk layout");
goto err;
}
@ -112,13 +112,13 @@ dht_selfheal_dir_xattr_persubvol (call_frame_t *frame, loc_t *loc,
ret = dict_set_bin (xattr, "trusted.glusterfs.dht",
disk_layout, 4 * 4);
if (ret == -1) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"failed to set xattr dictionary");
goto err;
}
disk_layout = NULL;
gf_log (this->name, GF_LOG_DEBUG,
gf_log (this->name, GF_LOG_TRACE,
"setting hash range %u - %u (type %d) on subvolume %s for %s",
layout->list[i].start, layout->list[i].stop,
layout->type, subvol->name, loc->path);
@ -256,7 +256,7 @@ dht_selfheal_dir_mkdir (call_frame_t *frame, loc_t *loc,
local->call_cnt = missing_dirs;
for (i = 0; i < layout->cnt; i++) {
if (layout->list[i].err == ENOENT || force) {
gf_log (this->name, GF_LOG_DEBUG,
gf_log (this->name, GF_LOG_TRACE,
"creating directory %s on subvol %s",
loc->path, layout->list[i].xlator->name);
@ -315,7 +315,7 @@ dht_selfheal_layout_new_directory (call_frame_t *frame, loc_t *loc,
start = start + chunk;
gf_log (this->name, GF_LOG_DEBUG,
gf_log (this->name, GF_LOG_TRACE,
"gave fix: %u - %u on %s for %s",
layout->list[i].start, layout->list[i].stop,
layout->list[i].xlator->name, loc->path);
@ -431,14 +431,14 @@ dht_selfheal_directory (call_frame_t *frame, dht_selfheal_dir_cbk_t dir_cbk,
local->selfheal.layout = layout;
if (down) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"%d subvolumes down -- not fixing", down);
ret = 0;
goto sorry_no_fix;
}
if (misc) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"%d subvolumes have unrecoverable errors", misc);
ret = 0;
goto sorry_no_fix;
@ -448,7 +448,7 @@ dht_selfheal_directory (call_frame_t *frame, dht_selfheal_dir_cbk_t dir_cbk,
ret = dht_selfheal_dir_getafix (frame, loc, layout);
if (ret == -1) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"not able to form layout for the directory");
goto sorry_no_fix;
}

View File

@ -86,20 +86,20 @@ init (xlator_t *this)
int i = 0;
if (!this->children) {
gf_log (this->name, GF_LOG_ERROR,
"DHT needs more than one child defined");
gf_log (this->name, GF_LOG_CRITICAL,
"Distribute needs more than one subvolume");
return -1;
}
if (!this->parents) {
gf_log (this->name, GF_LOG_WARNING,
"dangling volume. check volfile ");
"dangling volume. check volfile");
}
conf = CALLOC (1, sizeof (*conf));
if (!conf) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto err;
}
@ -141,7 +141,7 @@ init (xlator_t *this)
conf->du_stats = CALLOC (conf->subvolume_cnt, sizeof (dht_du_t));
if (!conf->du_stats) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto err;
}

View File

@ -72,7 +72,7 @@ nufa_local_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
layout = dht_layout_for_subvol (this, prev->this);
if (!layout) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"no pre-set layout for subvolume %s",
prev->this->name);
op_ret = -1;
@ -98,7 +98,7 @@ nufa_local_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (!local->layout) {
op_ret = -1;
op_errno = ENOMEM;
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"memory allocation failed :(");
goto err;
}
@ -115,7 +115,7 @@ nufa_local_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
subvol = dht_linkfile_subvol (this, inode, stbuf, xattr);
if (!subvol) {
gf_log (this->name, GF_LOG_WARNING,
gf_log (this->name, GF_LOG_DEBUG,
"linkfile not having link subvolume. path=%s",
loc->path);
dht_lookup_everywhere (frame, this, loc);
@ -131,7 +131,7 @@ nufa_local_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
out:
if (!local->hashed_subvol) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"no subvolume in layout for path=%s",
local->loc.path);
op_errno = EINVAL;
@ -177,14 +177,14 @@ nufa_lookup (call_frame_t *frame, xlator_t *this,
if (!local) {
op_errno = ENOMEM;
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto err;
}
ret = loc_dup (loc, &local->loc);
if (ret == -1) {
op_errno = errno;
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"copying location failed for path=%s",
loc->path);
goto err;
@ -206,7 +206,7 @@ nufa_lookup (call_frame_t *frame, xlator_t *this,
layout = dht_layout_get (this, loc->inode);
if (!layout) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"revalidate without cache. path=%s",
loc->path);
op_errno = EINVAL;
@ -315,13 +315,13 @@ nufa_create (call_frame_t *frame, xlator_t *this,
if (!local) {
op_errno = ENOMEM;
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto err;
}
subvol = dht_subvol_get_hashed (this, loc);
if (!subvol) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"no subvolume in layout for path=%s",
loc->path);
op_errno = ENOENT;
@ -340,7 +340,7 @@ nufa_create (call_frame_t *frame, xlator_t *this,
ret = loc_copy (&local->loc, loc);
if (ret == -1) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
op_errno = ENOMEM;
goto err;
}
@ -356,7 +356,7 @@ nufa_create (call_frame_t *frame, xlator_t *this,
return 0;
}
gf_log (this->name, GF_LOG_DEBUG,
gf_log (this->name, GF_LOG_TRACE,
"creating %s on %s", loc->path, subvol->name);
STACK_WIND (frame, dht_create_cbk,
@ -422,13 +422,13 @@ nufa_mknod (call_frame_t *frame, xlator_t *this,
if (!local) {
op_errno = ENOMEM;
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto err;
}
subvol = dht_subvol_get_hashed (this, loc);
if (!subvol) {
gf_log (this->name, GF_LOG_ERROR,
gf_log (this->name, GF_LOG_DEBUG,
"no subvolume in layout for path=%s",
loc->path);
op_errno = ENOENT;
@ -448,7 +448,7 @@ nufa_mknod (call_frame_t *frame, xlator_t *this,
ret = loc_copy (&local->loc, loc);
if (ret == -1) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
op_errno = ENOMEM;
goto err;
}
@ -462,7 +462,7 @@ nufa_mknod (call_frame_t *frame, xlator_t *this,
return 0;
}
gf_log (this->name, GF_LOG_DEBUG,
gf_log (this->name, GF_LOG_TRACE,
"creating %s on %s", loc->path, subvol->name);
STACK_WIND (frame, dht_newfile_cbk,
@ -533,20 +533,20 @@ init (xlator_t *this)
char my_hostname[256];
if (!this->children) {
gf_log (this->name, GF_LOG_ERROR,
"DHT needs more than one child defined");
gf_log (this->name, GF_LOG_CRITICAL,
"NUFA needs more than one subvolume");
return -1;
}
if (!this->parents) {
gf_log (this->name, GF_LOG_WARNING,
"dangling volume. check volfile ");
"dangling volume. check volfile");
}
conf = CALLOC (1, sizeof (*conf));
if (!conf) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto err;
}
@ -616,7 +616,7 @@ init (xlator_t *this)
conf->du_stats = CALLOC (conf->subvolume_cnt, sizeof (dht_du_t));
if (!conf->du_stats) {
gf_log (this->name, GF_LOG_ERROR,
"memory allocation failed :(");
"Out of memory");
goto err;
}