Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Martin Wilck
On Wed, 2019-01-16 at 08:35 +0100, Hannes Reinecke wrote: > If the device is _not_ removable we should not start the event > poller as the media will not go away. Having the event poller running > will block the open() call as it will try to flush outstanding > events, > which it can't if the devic

Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Martin Wilck
On Wed, 2019-01-16 at 11:32 -0500, Douglas Gilbert wrote: > On 2019-01-16 5:58 a.m., Martin Wilck wrote: > > On Wed, 2019-01-16 at 11:32 +0100, Hannes Reinecke wrote: > > > On 1/16/19 11:26 AM, Martin Wilck wrote: > > > > On Wed, 2019-01-16 at 08:35 +0100, Hannes Reinecke wrote: > > > > > If the de

Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Bart Van Assche
On Wed, 2019-01-16 at 08:35 +0100, Hannes Reinecke wrote: > If the device is _not_ removable we should not start the event > poller as the media will not go away. Having the event poller running > will block the open() call as it will try to flush outstanding events, > which it can't if the device

Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Douglas Gilbert
On 2019-01-16 5:58 a.m., Martin Wilck wrote: On Wed, 2019-01-16 at 11:32 +0100, Hannes Reinecke wrote: On 1/16/19 11:26 AM, Martin Wilck wrote: On Wed, 2019-01-16 at 08:35 +0100, Hannes Reinecke wrote: If the device is _not_ removable we should not start the event poller as the media will not

Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Martin Wilck
On Wed, 2019-01-16 at 11:32 +0100, Hannes Reinecke wrote: > On 1/16/19 11:26 AM, Martin Wilck wrote: > > On Wed, 2019-01-16 at 08:35 +0100, Hannes Reinecke wrote: > > > If the device is _not_ removable we should not start the event > > > poller as the media will not go away. Having the event poller

Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Hannes Reinecke
On 1/16/19 11:26 AM, Martin Wilck wrote: On Wed, 2019-01-16 at 08:35 +0100, Hannes Reinecke wrote: If the device is _not_ removable we should not start the event poller as the media will not go away. Having the event poller running will block the open() call as it will try to flush outstanding e

Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Martin Wilck
On Wed, 2019-01-16 at 08:35 +0100, Hannes Reinecke wrote: > If the device is _not_ removable we should not start the event > poller as the media will not go away. Having the event poller running > will block the open() call as it will try to flush outstanding > events, > which it can't if the devic

[PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-15 Thread Hannes Reinecke
If the device is _not_ removable we should not start the event poller as the media will not go away. Having the event poller running will block the open() call as it will try to flush outstanding events, which it can't if the device is in state 'BLOCKED'. So the open() call will be stalled until th