Never try to wait for free space inside blockstore
parent
472bce58ab
commit
cb437913d3
|
@ -306,17 +306,6 @@ void blockstore_impl_t::check_wait(blockstore_op_t *op)
|
||||||
// do not submit
|
// do not submit
|
||||||
#ifdef BLOCKSTORE_DEBUG
|
#ifdef BLOCKSTORE_DEBUG
|
||||||
printf("Still waiting for a journal buffer\n");
|
printf("Still waiting for a journal buffer\n");
|
||||||
#endif
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
PRIV(op)->wait_for = 0;
|
|
||||||
}
|
|
||||||
else if (PRIV(op)->wait_for == WAIT_FREE)
|
|
||||||
{
|
|
||||||
if (!data_alloc->get_free_count() && flusher->is_active())
|
|
||||||
{
|
|
||||||
#ifdef BLOCKSTORE_DEBUG
|
|
||||||
printf("Still waiting for free space on the data device\n");
|
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,8 +160,6 @@ struct __attribute__((__packed__)) dirty_entry
|
||||||
#define WAIT_JOURNAL 3
|
#define WAIT_JOURNAL 3
|
||||||
// Suspend operation until the next journal sector buffer is free
|
// Suspend operation until the next journal sector buffer is free
|
||||||
#define WAIT_JOURNAL_BUFFER 4
|
#define WAIT_JOURNAL_BUFFER 4
|
||||||
// Suspend operation until there is some free space on the data device
|
|
||||||
#define WAIT_FREE 5
|
|
||||||
|
|
||||||
struct fulfill_read_t
|
struct fulfill_read_t
|
||||||
{
|
{
|
||||||
|
|
|
@ -261,12 +261,6 @@ int blockstore_impl_t::dequeue_write(blockstore_op_t *op)
|
||||||
if (loc == UINT64_MAX)
|
if (loc == UINT64_MAX)
|
||||||
{
|
{
|
||||||
// no space
|
// no space
|
||||||
if (flusher->is_active())
|
|
||||||
{
|
|
||||||
// hope that some space will be available after flush
|
|
||||||
PRIV(op)->wait_for = WAIT_FREE;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
cancel_all_writes(op, dirty_it, -ENOSPC);
|
cancel_all_writes(op, dirty_it, -ENOSPC);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue