diff options
Diffstat (limited to 'xlators/cluster/dht')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 13 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-common.h | 1 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-helper.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/nufa.c | 10 | ||||
-rw-r--r-- | xlators/cluster/dht/src/switch.c | 8 |
5 files changed, 26 insertions, 11 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index cef73a9d681..17ddb3247ab 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -3242,7 +3242,8 @@ dht_create_linkfile_create_cbk (call_frame_t *frame, void *cookie, STACK_WIND (frame, dht_create_cbk, cached_subvol, cached_subvol->fops->create, - &local->loc, local->flags, local->mode, local->fd); + &local->loc, local->flags, local->mode, + local->fd, local->params); return 0; err: @@ -3252,7 +3253,8 @@ dht_create_linkfile_create_cbk (call_frame_t *frame, void *cookie, int dht_create (call_frame_t *frame, xlator_t *this, - loc_t *loc, int32_t flags, mode_t mode, fd_t *fd) + loc_t *loc, int32_t flags, mode_t mode, + fd_t *fd, dict_t *params) { int op_errno = -1; int ret = -1; @@ -3284,7 +3286,7 @@ dht_create (call_frame_t *frame, xlator_t *this, local->loc.path, subvol->name, loc->path); STACK_WIND (frame, dht_create_cbk, subvol, subvol->fops->create, - &local->loc, flags, mode, fd); + &local->loc, flags, mode, fd, params); goto done; } @@ -3309,7 +3311,7 @@ dht_create (call_frame_t *frame, xlator_t *this, "creating %s on %s", loc->path, subvol->name); STACK_WIND (frame, dht_create_cbk, subvol, subvol->fops->create, - loc, flags, mode, fd); + loc, flags, mode, fd, params); goto done; } /* Choose the minimum filled volume, and create the @@ -3318,6 +3320,7 @@ dht_create (call_frame_t *frame, xlator_t *this, avail_subvol = dht_free_disk_available_subvol (this, subvol); if (avail_subvol != subvol) { local->fd = fd_ref (fd); + local->params = dict_ref (params); local->flags = flags; local->mode = mode; @@ -3335,7 +3338,7 @@ dht_create (call_frame_t *frame, xlator_t *this, "creating %s on %s", loc->path, subvol->name); STACK_WIND (frame, dht_create_cbk, subvol, subvol->fops->create, - loc, flags, mode, fd); + loc, flags, mode, fd, params); done: return 0; diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index 464832c4125..58edca9f66c 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -81,6 +81,7 @@ struct dht_local { struct statvfs statvfs; fd_t *fd; inode_t *inode; + dict_t *params; dict_t *xattr; dict_t *xattr_req; dht_layout_t *layout; diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c index 6580f788db9..09c326289b8 100644 --- a/xlators/cluster/dht/src/dht-helper.c +++ b/xlators/cluster/dht/src/dht-helper.c @@ -199,6 +199,11 @@ dht_local_wipe (xlator_t *this, dht_local_t *local) local->fd = NULL; } + if (local->params) { + dict_unref (local->params); + local->params = NULL; + } + if (local->xattr_req) dict_unref (local->xattr_req); diff --git a/xlators/cluster/dht/src/nufa.c b/xlators/cluster/dht/src/nufa.c index aaad5d5fa6e..e807ff304e0 100644 --- a/xlators/cluster/dht/src/nufa.c +++ b/xlators/cluster/dht/src/nufa.c @@ -302,7 +302,9 @@ nufa_create_linkfile_create_cbk (call_frame_t *frame, void *cookie, STACK_WIND (frame, dht_create_cbk, local->cached_subvol, local->cached_subvol->fops->create, - &local->loc, local->flags, local->mode, local->fd); + &local->loc, local->flags, local->mode, local->fd, + local->params); + return 0; err: @@ -313,7 +315,8 @@ nufa_create_linkfile_create_cbk (call_frame_t *frame, void *cookie, int nufa_create (call_frame_t *frame, xlator_t *this, - loc_t *loc, int32_t flags, mode_t mode, fd_t *fd) + loc_t *loc, int32_t flags, mode_t mode, + fd_t *fd, dict_t *params) { dht_local_t *local = NULL; dht_conf_t *conf = NULL; @@ -365,6 +368,7 @@ nufa_create (call_frame_t *frame, xlator_t *this, } local->fd = fd_ref (fd); + local->params = dict_ref (params); local->mode = mode; local->flags = flags; @@ -380,7 +384,7 @@ nufa_create (call_frame_t *frame, xlator_t *this, STACK_WIND (frame, dht_create_cbk, subvol, subvol->fops->create, - loc, flags, mode, fd); + loc, flags, mode, fd, params); return 0; diff --git a/xlators/cluster/dht/src/switch.c b/xlators/cluster/dht/src/switch.c index 5ec9e665731..f47ffb1fde4 100644 --- a/xlators/cluster/dht/src/switch.c +++ b/xlators/cluster/dht/src/switch.c @@ -405,7 +405,8 @@ switch_create_linkfile_create_cbk (call_frame_t *frame, void *cookie, STACK_WIND (frame, dht_create_cbk, local->cached_subvol, local->cached_subvol->fops->create, - &local->loc, local->flags, local->mode, local->fd); + &local->loc, local->flags, local->mode, local->fd, + local->params); return 0; @@ -417,7 +418,8 @@ switch_create_linkfile_create_cbk (call_frame_t *frame, void *cookie, int switch_create (call_frame_t *frame, xlator_t *this, - loc_t *loc, int32_t flags, mode_t mode, fd_t *fd) + loc_t *loc, int32_t flags, mode_t mode, + fd_t *fd, dict_t *params) { dht_local_t *local = NULL; dht_conf_t *conf = NULL; @@ -483,7 +485,7 @@ switch_create (call_frame_t *frame, xlator_t *this, STACK_WIND (frame, dht_create_cbk, subvol, subvol->fops->create, - loc, flags, mode, fd); + loc, flags, mode, fd, params); return 0; |