Ok, i started debugging dm-mpath.c.
I found the error causing process disruption and lost pages is returned in
the function "do_end_io".
Here the original version:
**************
static int do_end_io(struct multipath *m, struct bio *bio,
int error, struct mpath_io *mpio)
{
struct hw_handler *hwh = &m->hw_handler;
unsigned err_flags = MP_FAIL_PATH; /* Default behavior */
if (!error)
return 0; /* I/O complete */
spin_lock(&m->lock);
if (!m->nr_valid_paths) {
spin_unlock(&m->lock);
return -EIO;
*** ----> ^^^^^^^
*** this is the interested point!
*** It seems that when ending io, in case of error if no path available
returns an EIO (no check of queue_if_no_path !?!??) !!!!
}
spin_unlock(&m->lock);
[cut]
**************
According to my assumption, i thinked requeuing the submitted io was right.
So I modified the source like at the bottom of the function and dm now runs
well!
I have no more lost page errors, no more process disruption, and no more
disk in read-only state.
I do not know deeply device mapper and multipath at kernel level, so i do
not know if my assumption is correct.
In that case ignore my message!
Best Regards
Nicola Ranaldo