lkml.org 
[lkml]   [2011]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] block: always allocate genhd->ev if check_events is implemented
On 2011-05-25 23:06, Tejun Heo wrote:
> 9fd097b149 (block: unexport DISK_EVENT_MEDIA_CHANGE for legacy/fringe
> drivers) removed DISK_EVENT_MEDIA_CHANGE from legacy/fringe block
> drivers which have inadequate ->check_events(). Combined with earlier
> change 7c88a168da (block: don't propagate unlisted DISK_EVENTs to
> userland), this enables using ->check_events() for internal processing
> while avoiding enabling in-kernel block event polling which can lead
> to infinite event loop.
>
> Unfortunately, this made many drivers including floppy without any bit
> set in disk->events and ->async_events in which case disk_add_events()
> simply skipped allocation of disk->ev, which disables whole event
> handling. As ->check_events() is still used during open processing
> for revalidation, this can lead to open failure.
>
> This patch always allocates disk->ev if ->check_events is implemented.
> In the long term, it would make sense to simply include the event
> structure inline into genhd as it's now used by virtually all block
> devices.

Thanks, applied.

--
Jens Axboe



\
 
 \ /
  Last update: 2011-05-26 21:11    [W:0.038 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site