mirror of
https://github.com/schoebel/mars
synced 2024-12-21 14:21:07 +00:00
aio: adapt to semi-new pre-patch generations
This commit is contained in:
parent
f11993a1ee
commit
b176b72843
@ -44,7 +44,7 @@
|
||||
|
||||
#include "mars_aio.h"
|
||||
|
||||
#if !defined(MARS_HAS_PREPATCH_V2) && !defined(MARS_HAS_PREPATCH)
|
||||
#if !defined(MARS_HAS_PREPATCH_V3) && !defined(MARS_HAS_PREPATCH_V2) && !defined(MARS_HAS_PREPATCH)
|
||||
#warning You are compiling without pre-patch, resulting in BAD IO PERFORMANCE
|
||||
#endif
|
||||
|
||||
@ -425,7 +425,7 @@ static int aio_submit(struct aio_output *output, struct aio_mref_aspect *mref_a,
|
||||
set_fs(KERNEL_DS);
|
||||
latency = TIME_STATS(
|
||||
this_timing,
|
||||
#ifdef MARS_HAS_PREPATCH_V2
|
||||
#if defined(MARS_HAS_PREPATCH_V2) || defined(MARS_HAS_PREPATCH_V3)
|
||||
res = ksys_io_submit(output->ctxp, 1, &iocbp)
|
||||
#else
|
||||
res = sys_io_submit(output->ctxp, 1, &iocbp)
|
||||
@ -466,7 +466,7 @@ static int aio_submit_dummy(struct aio_output *output)
|
||||
|
||||
oldfs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
#ifdef MARS_HAS_PREPATCH_V2
|
||||
#if defined(MARS_HAS_PREPATCH_V2) || defined(MARS_HAS_PREPATCH_V3)
|
||||
res = ksys_io_submit(output->ctxp, 1, &iocbp);
|
||||
#else
|
||||
res = sys_io_submit(output->ctxp, 1, &iocbp);
|
||||
@ -702,7 +702,7 @@ static int aio_event_thread(void *data)
|
||||
/* TODO: don't timeout upon termination.
|
||||
* Probably we should submit a dummy request.
|
||||
*/
|
||||
#ifdef MARS_HAS_PREPATCH_V2
|
||||
#if defined(MARS_HAS_PREPATCH_V2) || defined(MARS_HAS_PREPATCH_V3)
|
||||
count = ksys_io_getevents(output->ctxp, 1, MARS_MAX_AIO_READ, events, &timeout);
|
||||
#else
|
||||
count = sys_io_getevents(output->ctxp, 1, MARS_MAX_AIO_READ, events, &timeout);
|
||||
@ -818,7 +818,7 @@ void _destroy_ioctx(struct aio_output *output)
|
||||
MARS_DBG("ioctx count = %d destroying %p\n", atomic_read(&ioctx_count), (void*)output->ctxp);
|
||||
oldfs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
#ifdef MARS_HAS_PREPATCH_V2
|
||||
#if defined(MARS_HAS_PREPATCH_V2) || defined(MARS_HAS_PREPATCH_V3)
|
||||
err = ksys_io_destroy(output->ctxp);
|
||||
#else
|
||||
err = sys_io_destroy(output->ctxp);
|
||||
@ -960,7 +960,7 @@ int _create_ioctx(struct aio_output *output)
|
||||
|
||||
oldfs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
#ifdef MARS_HAS_PREPATCH_V2
|
||||
#if defined(MARS_HAS_PREPATCH_V2) || defined(MARS_HAS_PREPATCH_V3)
|
||||
err = ksys_io_setup(MARS_MAX_AIO, &output->ctxp);
|
||||
#else
|
||||
err = sys_io_setup(MARS_MAX_AIO, &output->ctxp);
|
||||
|
Loading…
Reference in New Issue
Block a user