diff options
author | Martin Wilck <mwilck@suse.com> | 2019-03-27 14:51:03 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-04-12 21:35:25 +0200 |
commit | 3c12c8e94ca04d668ad0cded7857fea2637834b3 (patch) | |
tree | 1f405e5035126f4324a482b2ea0ec1c84f97dda8 /drivers/ide/ide-cd_ioctl.c | |
parent | block: disk_events: introduce event flags (diff) | |
download | linux-3c12c8e94ca04d668ad0cded7857fea2637834b3.tar.xz linux-3c12c8e94ca04d668ad0cded7857fea2637834b3.zip |
Revert "ide: unexport DISK_EVENT_MEDIA_CHANGE for ide-gd and ide-cd"
This reverts commit 7eec77a1816a7042591a6cbdb4820e9e7ebffe0e.
Instead of leaving disk->events completely empty, we now export the
supported events again, and tell the block layer not to forward events
to user space by not setting DISK_EVENT_FLAG_UEVENT. This allows the
block layer to distinguish between devices that for which events should
be handled in kernel only, and devices which don't support any meda
change events at all.
Cc: Borislav Petkov <bp@alien8.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/ide/ide-cd_ioctl.c')
-rw-r--r-- | drivers/ide/ide-cd_ioctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ide/ide-cd_ioctl.c b/drivers/ide/ide-cd_ioctl.c index 4a6e1a413ead..46f2df288c6a 100644 --- a/drivers/ide/ide-cd_ioctl.c +++ b/drivers/ide/ide-cd_ioctl.c @@ -82,8 +82,9 @@ int ide_cdrom_drive_status(struct cdrom_device_info *cdi, int slot_nr) /* * ide-cd always generates media changed event if media is missing, which - * makes it impossible to use for proper event reporting, so disk->events - * is cleared to 0 and the following function is used only to trigger + * makes it impossible to use for proper event reporting, so + * DISK_EVENT_FLAG_UEVENT is cleared in disk->event_flags + * and the following function is used only to trigger * revalidation and never propagated to userland. */ unsigned int ide_cdrom_check_events_real(struct cdrom_device_info *cdi, |