diff options
author | M. Mohan Kumar <mohan@in.ibm.com> | 2013-11-13 22:44:42 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-11-13 11:39:11 -0800 |
commit | b222ce817f5f324fe20d4d3614001ed2f177afb8 (patch) | |
tree | be39e00cea1871b6df3d440199eb9cffd1711823 /xlators/storage/bd/src/bd.h | |
parent | 6ec9c4599e96de9dcae9426eae6bb1dde4dc7549 (diff) |
bd: Add aio support to BD xlator
Volume option bd-aio controls AIO feature for BD xlator. Code taken from
posix-aio.c
Change-Id: Ib049bd59c9d3f9101d33939838322cfa808de053
BUG: 1028672
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-on: http://review.gluster.org/5748
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/storage/bd/src/bd.h')
-rw-r--r-- | xlators/storage/bd/src/bd.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/xlators/storage/bd/src/bd.h b/xlators/storage/bd/src/bd.h index 4d8b8954524..e3acdedc1d2 100644 --- a/xlators/storage/bd/src/bd.h +++ b/xlators/storage/bd/src/bd.h @@ -23,6 +23,10 @@ #include "config.h" #endif +#ifdef HAVE_LIBAIO +#include <libaio.h> +#endif + #include "xlator.h" #include "mem-types.h" @@ -83,6 +87,7 @@ enum gf_bd_mem_types_ { typedef struct bd_fd { int fd; int32_t flag; + int odirect; } bd_fd_t; typedef struct bd_priv { @@ -90,6 +95,13 @@ typedef struct bd_priv { char *vg; char *pool; int caps; + gf_boolean_t aio_init_done; + gf_boolean_t aio_capable; + gf_boolean_t aio_configured; +#ifdef HAVE_LIBAIO + io_context_t ctxp; + pthread_t aiothread; +#endif } bd_priv_t; @@ -112,11 +124,6 @@ typedef struct { data_t *data; /* for setxattr */ } bd_local_t; -typedef struct { - char *lv; - struct list_head list; -} bd_del_entry; - /* Prototypes */ int bd_inode_ctx_set (inode_t *inode, xlator_t *this, bd_attr_t *ctx); int bd_inode_ctx_get (inode_t *inode, xlator_t *this, bd_attr_t **ctx); @@ -137,4 +144,5 @@ int bd_clone (bd_local_t *local, bd_priv_t *priv); int bd_merge (bd_priv_t *priv, uuid_t gfid); int bd_get_origin (bd_priv_t *priv, loc_t *loc, fd_t *fd, dict_t *dict); +inline void bd_update_amtime(struct iatt *iatt, int flag); #endif |