Revert "ide: unexport DISK_EVENT_MEDIA_CHANGE for ide-gd and ide-cd"
authorMartin Wilck <mwilck@suse.com>
Wed, 27 Mar 2019 13:51:03 +0000 (14:51 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 12 Apr 2019 19:35:25 +0000 (13:35 -0600)
commit3c12c8e94ca04d668ad0cded7857fea2637834b3
tree1f405e5035126f4324a482b2ea0ec1c84f97dda8
parentc92e2f04b35938da23eb9a7f7101cbdd5ac7cdc4
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>
drivers/ide/ide-cd.c
drivers/ide/ide-cd_ioctl.c
drivers/ide/ide-gd.c