diff options
author | N Balachandran <nbalacha@redhat.com> | 2016-02-13 10:02:55 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2016-02-14 20:33:39 -0800 |
commit | bfd8f92490454f261330da34565334ed5decd0e1 (patch) | |
tree | a76853138348f732d7833615494fabf145d12bb1 /xlators/cluster | |
parent | c458433041aafb48ae6d6e5fcf3e1e737dc3fda3 (diff) |
cluster/dht: Skip subvols if no layout present
Running "rm -rf" on a tiered volume sometimes caused
the client to crash because dht_readdirp_cbk referenced
a NULL layout for the hot tier subvol.
Now, entries are skipped if the layout is NULL. This
can cause "rm -rf" to fail with ENOTEMPTY rmdir failures.
Change-Id: Idd71a9d0f7ee712899cc7113bbf2cd3dcb25808b
BUG: 1307208
Signed-off-by: N Balachandran <nbalacha@redhat.com>
Reviewed-on: http://review.gluster.org/13440
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 4c43c42750e..5886886e830 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -4619,6 +4619,14 @@ dht_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret, layout = local->layout; + /* We have seen crashes in while running "rm -rf" on tier volumes + when the layout was NULL on the hot tier. This will skip the + entries on the subvol without a layout, hence preventing the crash + but rmdir might fail with "directory not empty" errors*/ + + if (layout == NULL) + goto done; + if (conf->readdir_optimize == _gf_true) readdir_optimize = 1; |