If IO submission fails, assert that the cause can be fixed by waiting

parent cb92c844
......@@ -1732,7 +1732,7 @@ fellow_logblk_commit(struct fellow_disk_log_block *logblk)
}
// XXX error handling
static int
static unsigned
fellow_io_log_submit(const struct fellow_fd *ffd, void *ioctx,
enum fellow_aio_info_type type, struct fellow_alloc_log_block *blk)
{
......@@ -2193,14 +2193,14 @@ logbuffer_ref(struct fellow_fd *ffd, const struct fellow_logbuffer *lbuf)
}
// avoid code duplication
static int
static unsigned
flush_active(struct fellow_fd *ffd, struct fellow_logbuffer *lbuf,
unsigned opts)
{
struct fellow_alloc_log_block blk;
struct fellow_disk_log_block *copy = NULL;
enum fellow_aio_info_type type;
int r;
unsigned r;
AN(lbuf->fdil.ioctx);
AN(lbuf->active.off);
......@@ -2296,9 +2296,8 @@ logbuffer_flush(struct fellow_fd *ffd,
struct fellow_alloc_log_block **arr;
const struct stvfe_tune *tune;
struct buddy_ptr_extent mem;
unsigned u, v, n;
unsigned r, u, v, n;
size_t sz;
int r;
CHECK_OBJ_NOTNULL(ffd, FELLOW_FD_MAGIC);
tune = ffd->tune;
......@@ -2593,9 +2592,11 @@ logbuffer_flush(struct fellow_fd *ffd,
lbuf->flush_seq = arr[u]->block->entry[0].seq;
u--;
v += fellow_io_log_wait_completions(
r = fellow_io_log_wait_completions(
lbuf->membuddy,
lbuf->fdil.ioctx, 1);
AN(r);
v += r;
FDBG(D_LOG_FLUSH, "submit full complete %u", v);
}
......
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