diff options
| author | Mohit Agrawal <moagrawal@redhat.com> | 2019-04-11 20:38:53 +0530 | 
|---|---|---|
| committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2019-04-16 10:55:51 +0000 | 
| commit | 88ecd64604ce01c5bc2c2ca88e33b8dcf57d5ee8 (patch) | |
| tree | 74e628e4898bd8405c4139aaedd631e3d918d069 /xlators/features/changelog/src/changelog.c | |
| parent | 08278e88235c5de923c918612ee868657e97533a (diff) | |
core: Brick is not able to detach successfully in brick_mux environment
Problem: In brick_mux environment, while volumes are stopped in a
         loop bricks are not detached successfully. Brick's are not
         detached because xprtrefcnt has not become 0 for detached brick.
         At the time of initiating brick detach process server_notify
         saves xprtrefcnt on detach brick and once counter has become
         0 then server_rpc_notify spawn a server_graph_janitor_threads
         for cleanup brick resources.xprtrefcnt has not become 0 because
         socket framework is not working due to assigning 0 as a fd for socket.
         In commit dc25d2c1eeace91669052e3cecc083896e7329b2
         there was a change in changelog fini to close htime_fd if htime_fd is not
         negative, by default htime_fd is 0 so it close 0 also.
Solution: Initialize htime_fd to -1 after just allocate changelog_priv
          by GF_CALLOC
> Fixes: bz#1699025
> Change-Id: I5f7ca62a0eb1c0510c3e9b880d6ab8af8d736a25
> Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
> (cherry picked from commit b777d83001d8006420b6c7d2d88fe68950aa7e00)
Change-Id: I7a2b6fc2d36405d51990376333e093661be48475
Fixes: bz#1699714
Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
Diffstat (limited to 'xlators/features/changelog/src/changelog.c')
| -rw-r--r-- | xlators/features/changelog/src/changelog.c | 1 | 
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/features/changelog/src/changelog.c b/xlators/features/changelog/src/changelog.c index 1f22a97a6e9..d9025f344c7 100644 --- a/xlators/features/changelog/src/changelog.c +++ b/xlators/features/changelog/src/changelog.c @@ -2740,6 +2740,7 @@ init(xlator_t *this)      GF_ATOMIC_INIT(priv->clntcnt, 0);      GF_ATOMIC_INIT(priv->xprtcnt, 0);      INIT_LIST_HEAD(&priv->xprt_list); +    priv->htime_fd = -1;      ret = changelog_init_options(this, priv);      if (ret)  | 
