diff options
Diffstat (limited to 'xlators/features/shard')
-rw-r--r-- | xlators/features/shard/src/shard.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c index 696032f4bac..29e131080f6 100644 --- a/xlators/features/shard/src/shard.c +++ b/xlators/features/shard/src/shard.c @@ -1238,6 +1238,14 @@ shard_lookup_dot_shard_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (op_ret) goto unwind; + if (!IA_ISDIR (buf->ia_type)) { + gf_log (this->name, GF_LOG_CRITICAL, "/.shard already exists " + "and is not a directory. Please remove /.shard from all" + " bricks and try again"); + op_errno = EIO; + goto unwind; + } + shard_link_dot_shard_inode (local, inode, buf); shard_writev_create_write_shards (frame, this); return 0; |