Rename define for (struct fellow_busy).io size

Ref #16
parent e3a45409
...@@ -492,7 +492,8 @@ struct fellow_busy { ...@@ -492,7 +492,8 @@ struct fellow_busy {
/* protected by fco mtx */ /* protected by fco mtx */
uint8_t io_idx; uint8_t io_idx;
uint8_t io_outstanding; uint8_t io_outstanding;
struct fellow_busy_io io[FCO_MAX_REGIONS]; #define FBO_NIO FCO_MAX_REGIONS
struct fellow_busy_io io[FBO_NIO];
// for fellow_busy_setattr() // for fellow_busy_setattr()
uint32_t va_data_len; uint32_t va_data_len;
...@@ -596,10 +597,10 @@ fellow_busy_io_get(struct fellow_busy *fbo, struct fellow_busy_io *stk) ...@@ -596,10 +597,10 @@ fellow_busy_io_get(struct fellow_busy *fbo, struct fellow_busy_io *stk)
AN(stk); AN(stk);
for (u = 0; u < FCO_MAX_REGIONS; u++) { for (u = 0; u < FBO_NIO; u++) {
fbio = &fbo->io[fbo->io_idx]; fbio = &fbo->io[fbo->io_idx];
fbo->io_idx++; fbo->io_idx++;
fbo->io_idx %= FCO_MAX_REGIONS; fbo->io_idx %= FBO_NIO;
if (fbio->magic == 0 && fbio->type == FBIO_INVAL) { if (fbio->magic == 0 && fbio->type == FBIO_INVAL) {
INIT_OBJ(fbio, FELLOW_BUSY_IO_MAGIC); INIT_OBJ(fbio, FELLOW_BUSY_IO_MAGIC);
fbio->fbo = fbo; fbio->fbo = fbo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment