diff --git a/iocore/aio/I_AIO.h b/iocore/aio/I_AIO.h index 8618e59da37..6144e188f6e 100644 --- a/iocore/aio/I_AIO.h +++ b/iocore/aio/I_AIO.h @@ -67,7 +67,7 @@ typedef struct io_event ink_io_event_t; #else struct ink_aiocb { - int aio_fildes = 0; + int aio_fildes = -1; /* file descriptor or status: AIO_NOT_IN_PROGRESS */ void *aio_buf = nullptr; /* buffer location */ size_t aio_nbytes = 0; /* length of transfer */ off_t aio_offset = 0; /* file offset */ diff --git a/iocore/aio/P_AIO.h b/iocore/aio/P_AIO.h index 95534c9821b..b0c6b21c495 100644 --- a/iocore/aio/P_AIO.h +++ b/iocore/aio/P_AIO.h @@ -95,10 +95,10 @@ struct AIO_Reqs { ASLL(AIOCallbackInternal, alink) aio_temp_list; ink_mutex aio_mutex; ink_cond aio_cond; - int index = 0; /* position of this struct in the aio_reqs array */ - int pending = 0; /* number of outstanding requests on the disk */ - int queued = 0; /* total number of aio_todo requests */ - int filedes = 0; /* the file descriptor for the requests */ + int index = 0; /* position of this struct in the aio_reqs array */ + int pending = 0; /* number of outstanding requests on the disk */ + int queued = 0; /* total number of aio_todo requests */ + int filedes = -1; /* the file descriptor for the requests or status IO_NOT_IN_PROGRESS */ int requests_queued = 0; }; diff --git a/iocore/cache/P_CacheVol.h b/iocore/cache/P_CacheVol.h index a51d245e585..b9009d8a9b7 100644 --- a/iocore/cache/P_CacheVol.h +++ b/iocore/cache/P_CacheVol.h @@ -51,8 +51,8 @@ #define LOOKASIDE_SIZE 256 #define EVACUATION_BUCKET_SIZE (2 * EVACUATION_SIZE) // 16MB #define RECOVERY_SIZE EVACUATION_SIZE // 8MB -#define AIO_NOT_IN_PROGRESS 0 -#define AIO_AGG_WRITE_IN_PROGRESS -1 +#define AIO_NOT_IN_PROGRESS -1 +#define AIO_AGG_WRITE_IN_PROGRESS -2 #define AUTO_SIZE_RAM_CACHE -1 // 1-1 with directory size #define DEFAULT_TARGET_FRAGMENT_SIZE (1048576 - sizeof(Doc)) // 1MB