[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] [PATCH 0/2] Add suspended state check for target messages



Alasdair G Kergon [agk redhat com] wrote:
> Would DMF_BLOCK_IO_FOR_SUSPEND work instead?

Should, provided that multipath_message() and multipath_postsuspend()
use some lock to synchronize. Without the lock, multipath_postsuspend()
could be executed between multipath_message's bit flag check and
its action().

multipath_message()
{
	lock();
	if (DMF_BLOCK_IO_FOR_SUSPEND is set) {
		unlock and fail;
	} else { /* postsuspend has not been executed yet and won't be
	completed until we are done here */
		action();
	}
	unlock();
}

multipath_postsuspend()
{
	lock();
	flush work();
	unlock();
}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]