If we are blackholing the disk, we need to make flush() wait forever, or
else the flush() logic will return (the IO wasn't queued!) and higher
layers will continue and (eventually) misbehave.
Signed-off-by: Sage Weil <sage@newdream.net>
void FileStore::flush()
{
dout(10) << "flush" << dendl;
+
+ if (g_conf->filestore_blackhole) {
+ // wait forever
+ Mutex lock("FileStore::flush::lock");
+ Cond cond;
+ lock.Lock();
+ while (true)
+ cond.Wait(lock);
+ assert(0);
+ }
if (m_filestore_journal_writeahead) {
if (journal)
void flush() {
Mutex::Locker l(qlock);
+ while (g_conf->filestore_blackhole)
+ cond.Wait(qlock); // wait forever
+
// get max for journal _or_ op queues
uint64_t seq = 0;
if (!q.empty())