Re: [PATCH 2/2] virdevmapper: Deal with unloading dm module

2020-08-18 Thread Peter Krempa
On Mon, Aug 17, 2020 at 18:02:04 +0200, Andrea Bolognani wrote: > On Mon, 2020-08-17 at 17:28 +0200, Peter Krempa wrote: > > On Mon, Aug 17, 2020 at 16:26:55 +0200, Michal Privoznik wrote: > > > -if ((controlFD = virDMOpen()) < 0) > > > +if ((controlFD = virDMOpen()) < 0) { > > > +i

Re: [PATCH 2/2] virdevmapper: Deal with unloading dm module

2020-08-17 Thread Andrea Bolognani
On Mon, 2020-08-17 at 17:28 +0200, Peter Krempa wrote: > On Mon, Aug 17, 2020 at 16:26:55 +0200, Michal Privoznik wrote: > > -if ((controlFD = virDMOpen()) < 0) > > +if ((controlFD = virDMOpen()) < 0) { > > +if (controlFD == -2) { > > +/* Devmapper was available but now

Re: [PATCH 2/2] virdevmapper: Deal with unloading dm module

2020-08-17 Thread Michal Privoznik
On 8/17/20 5:28 PM, Peter Krempa wrote: On Mon, Aug 17, 2020 at 16:26:55 +0200, Michal Privoznik wrote: The following situation can happen: we've initialized DM major successfully. But later, the devmapper module(s) was removed and thus kernel lost its ability to handle multipath devices. More i

Re: [PATCH 2/2] virdevmapper: Deal with unloading dm module

2020-08-17 Thread Peter Krempa
On Mon, Aug 17, 2020 at 16:26:55 +0200, Michal Privoznik wrote: > The following situation can happen: we've initialized DM major > successfully. But later, the devmapper module(s) was removed and > thus kernel lost its ability to handle multipath devices. More > importantly, the /dev/mapper/control

[PATCH 2/2] virdevmapper: Deal with unloading dm module

2020-08-17 Thread Michal Privoznik
The following situation can happen: we've initialized DM major successfully. But later, the devmapper module(s) was removed and thus kernel lost its ability to handle multipath devices. More importantly, the /dev/mapper/control file is removed and thus our attempt to open it will fail. Note, we wil