diff options
author | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-02-08 21:18:20 +0530 |
---|---|---|
committer | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-02-08 21:31:43 +0530 |
commit | 9f570a3967c0a4ebbe35a04284181406faf8fe36 (patch) | |
tree | 1bc34cd56731fe639112a1c42d7075a27104ff8d /rpc/block_svc_routines.c | |
parent | 4d72dbc37c5f10dc33de0ac22d90bf1563fc5f0d (diff) |
gluster-block: create block files in '/block-store' dir
till now we have '/block-meta' dir for meta files and actual block files
used to reside in '/' dir. From now, lets place block files in '/block-store'
So, this is how it looks like:
$ tree /mnt/
/mnt/
├── block-meta
│ ├── meta.lock
│ └── TARGET
└── block-store
└── 103e4cf1-bf41-404a-9fe1-b7c70fc33b3e
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Diffstat (limited to 'rpc/block_svc_routines.c')
-rw-r--r-- | rpc/block_svc_routines.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rpc/block_svc_routines.c b/rpc/block_svc_routines.c index 7d7080c..ca2fef6 100644 --- a/rpc/block_svc_routines.c +++ b/rpc/block_svc_routines.c @@ -388,9 +388,9 @@ glusterBlockCleanUp(struct glfs *glfs, char *blockname, LOG("mgmt", GB_LOG_ERROR, "%s volume: %s host: %s", FAILED_DELETING_FILE, info->volume, "localhost"); } - ret = glfs_unlink(glfs, blockname); - if (ret && errno != ENOENT) { - LOG("mgmt", GB_LOG_ERROR, "%s", "glfs_unlink: failed"); + ret = glusterBlockDeleteMetaLockFile(glfs, info->volume, blockname); + if (ret) { + LOG("mgmt", GB_LOG_ERROR, "%s", "glusterBlockDeleteMetaLockFile: failed"); goto out; } } @@ -554,9 +554,9 @@ block_create_1_svc(blockCreate *blk, struct svc_req *rqstp) goto out; } - if (asprintf(&backstore, "%s %s %s %zu %s@%s/%s %s", TARGETCLI_GLFS, + if (asprintf(&backstore, "%s %s %s %zu %s@%s%s/%s %s", TARGETCLI_GLFS, CREATE, blk->block_name, blk->size, blk->volume, - blk->volfileserver, blk->gbid, blk->gbid) == -1) { + blk->volfileserver, GB_STOREDIR, blk->gbid, blk->gbid) == -1) { reply->exit = -1; goto out; } @@ -754,7 +754,7 @@ block_list_cli_1_svc(blockListCli *blk, struct svc_req *rqstp) GB_METALOCK_OR_GOTO(lkfd, blk->volume, ret, out); - tgmfd = glfs_opendir (glfs, "/block-meta"); + tgmfd = glfs_opendir (glfs, GB_METADIR); if (!tgmfd) { LOG("mgmt", GB_LOG_ERROR, "%s", "glusterBlockVolumeInit failed"); goto out; |