It was seen that at the time when ioctl (transition to incremental) takes place, we still got some unprocessed bio in snap_cow_thread(). As the solution, it is proposed to add some wait in ioctl handlers to make sure all bio requests have been processed.
Here is the log explaining the behavior previously observed. Please take a look at the counters of the received (queued) and processed bio requests:
[ 461.946031] elastio-snap: ioctl command received: 1074020613
[ 461.946033] elastio-snap: received transition inc ioctl - 19
[ 461.946034] elastio-snap: >> WAITING STARTED (bio received=61, bio processed=48)...
[ 461.946759] elastio-snap: error handling write bio in kernel thread: -27
[ 461.946034] elastio-snap: >> WAITING FINISHED (bio received=61, bio processed=61)...
[ 462.460080] elastio-snap: device specified is in the fail state: -27
[ 462.461223] elastio-snap: error during transition to incremental ioctl handler: -27
[ 462.462313] elastio-snap: minor range = 19 - 19
It was seen that at the time when ioctl (transition to incremental) takes place, we still got some unprocessed bio in snap_cow_thread(). As the solution, it is proposed to add some wait in ioctl handlers to make sure all bio requests have been processed.
Here is the log explaining the behavior previously observed. Please take a look at the counters of the received (queued) and processed bio requests:
Closes #170