[dm-devel] [PATCH 0/2] Add suspended state check for target messages
malahal at us.ibm.com
malahal at us.ibm.com
Fri Nov 13 18:30:47 UTC 2009
Alasdair G Kergon [agk at 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();
}
More information about the dm-devel
mailing list