[Gluster-devel] 3.4.0beta2 crash in conservative merge?
Emmanuel Dreyfus
manu at netbsd.org
Mon Jun 3 04:25:54 UTC 2013
Emmanuel Dreyfus <manu at netbsd.org> wrote:
> The others function calls in dht_migration_complete_check_task() takes
> care of not using local->fd if local->loc.inode is not NULL. Only the
> offending code fails to do so:
>
> if (local->loc.inode) {
> ret = syncop_open (dst_node, &local->loc,
> local->fd->flags, local->fd);
> }
This leads me to trying the patch below. Comments are welcome.
--- xlators/cluster/dht/src/dht-helper.c.orig
+++ xlators/cluster/dht/src/dht-helper.c
@@ -813,20 +813,23 @@ dht_migration_complete_check_task (void
*/
SYNCTASK_SETID(0, 0);
/* if 'local->fd' (ie, fd based operation), send a 'open()' on
destination if not already done */
- if (local->loc.inode) {
- ret = syncop_open (dst_node, &local->loc,
- local->fd->flags, local->fd);
- } else {
+ if (!local->loc.inode) {
tmp_loc.inode = local->fd->inode;
inode_path (local->fd->inode, NULL, &path);
if (path)
tmp_loc.path = path;
ret = syncop_open (dst_node, &tmp_loc,
local->fd->flags, local->fd);
GF_FREE (path);
-
+ } else {
+ if (local->fd)
+ ret = syncop_open (dst_node, &local->loc,
+ local->fd->flags, local->fd);
+ else
+ ret = syncop_open (dst_node, &local->loc,
+ O_RDWR, NULL);
}
SYNCTASK_SETID (frame->root->uid, frame->root->gid);
if (ret == -1) {
gf_log (this->name, GF_LOG_ERROR,
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu at netbsd.org
More information about the Gluster-devel
mailing list