From: Grant Likely <grant.likely@secretlab.ca>
To: Tejun Heo <tj@kernel.org>
Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org,
kay.sievers@vrfy.org, hch@infradead.org
Subject: Re: [PATCH 11/16] xsysace: convert to bdops->check_events()
Date: Tue, 28 Dec 2010 23:37:44 -0700 [thread overview]
Message-ID: <20101229063744.GB8172@angua.secretlab.ca> (raw)
In-Reply-To: <1293557352-10592-12-git-send-email-tj@kernel.org>
On Tue, Dec 28, 2010 at 06:29:07PM +0100, Tejun Heo wrote:
> Convert from ->media_changed() to ->check_events().
>
> xsysace buffers media changed state and clears it on revalidation. It
> will behave correctly with kernel event polling.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: Kay Sievers <kay.sievers@vrfy.org>
> Cc: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
g.
> ---
> drivers/block/xsysace.c | 9 +++++----
> 1 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
> index 829161e..16a2fa9 100644
> --- a/drivers/block/xsysace.c
> +++ b/drivers/block/xsysace.c
> @@ -867,12 +867,12 @@ static void ace_request(struct request_queue * q)
> }
> }
>
> -static int ace_media_changed(struct gendisk *gd)
> +static unsigned int ace_check_events(struct gendisk *gd, unsigned int clearing)
> {
> struct ace_device *ace = gd->private_data;
> - dev_dbg(ace->dev, "ace_media_changed(): %i\n", ace->media_change);
> + dev_dbg(ace->dev, "ace_check_events(): %i\n", ace->media_change);
>
> - return ace->media_change;
> + return ace->media_change ? DISK_EVENT_MEDIA_CHANGE : 0;
> }
>
> static int ace_revalidate_disk(struct gendisk *gd)
> @@ -953,7 +953,7 @@ static const struct block_device_operations ace_fops = {
> .owner = THIS_MODULE,
> .open = ace_open,
> .release = ace_release,
> - .media_changed = ace_media_changed,
> + .check_events = ace_check_events,
> .revalidate_disk = ace_revalidate_disk,
> .getgeo = ace_getgeo,
> };
> @@ -1005,6 +1005,7 @@ static int __devinit ace_setup(struct ace_device *ace)
> ace->gd->major = ace_major;
> ace->gd->first_minor = ace->id * ACE_NUM_MINORS;
> ace->gd->fops = &ace_fops;
> + ace->gd->events = DISK_EVENT_MEDIA_CHANGE;
> ace->gd->queue = ace->queue;
> ace->gd->private_data = ace;
> snprintf(ace->gd->disk_name, 32, "xs%c", ace->id + 'a');
> --
> 1.7.1
>
next prev parent reply other threads:[~2010-12-29 6:37 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-28 17:28 [PATCHSET] block: convert block drivers to ->check_events() Tejun Heo
2010-12-28 17:28 ` [PATCH 01/16] block: don't implicitly trigger event check on disk_unblock_events() Tejun Heo
2010-12-28 17:28 ` [PATCH 02/16] block: don't check events on close unless it was blocked Tejun Heo
2010-12-28 17:28 ` [PATCH 03/16] block: don't check events while open is in progress Tejun Heo
2010-12-28 17:29 ` [PATCH 04/16] ide: convert to bdops->check_events() Tejun Heo
2010-12-28 19:01 ` David Miller
2010-12-28 17:29 ` [PATCH 05/16] floppy,{ami|ata}flop: " Tejun Heo
2011-01-25 13:07 ` [PATCH UPDATED " Tejun Heo
2010-12-28 17:29 ` [PATCH 06/16] gdrom,viocd: " Tejun Heo
2010-12-28 17:29 ` [PATCH 07/16] paride: " Tejun Heo
2010-12-28 17:29 ` [PATCH 08/16] dac960: " Tejun Heo
2010-12-28 17:29 ` [PATCH 09/16] swim[3]: " Tejun Heo
2010-12-28 17:29 ` [PATCH 10/16] ub: " Tejun Heo
2010-12-29 15:53 ` Pete Zaitcev
2010-12-29 16:02 ` Tejun Heo
2010-12-28 17:29 ` [PATCH 11/16] xsysace: " Tejun Heo
2010-12-29 6:37 ` Grant Likely [this message]
2010-12-28 17:29 ` [PATCH 12/16] i2o_block: " Tejun Heo
2010-12-28 17:29 ` [PATCH 13/16] s390/tape_block: " Tejun Heo
2010-12-28 17:29 ` [PATCH 14/16] umem: drop dummy ->media_changed() Tejun Heo
2010-12-28 17:29 ` [PATCH 15/16] pktcdvd: convert to bdops->check_events() Tejun Heo
2010-12-28 17:29 ` [PATCH 16/16] staging: " Tejun Heo
2010-12-28 18:39 ` Greg KH
2010-12-28 20:04 ` [PATCHSET] block: convert block drivers to ->check_events() Jeff Garzik
2011-01-25 13:06 ` Tejun Heo
2011-02-01 10:31 ` Tejun Heo
2011-03-05 10:40 ` Tejun Heo
2011-03-07 8:08 ` Jens Axboe
2011-03-09 9:13 [PATCHSET] block: Convert block drivers to ->check_events(), take#2 Tejun Heo
2011-03-09 9:13 ` [PATCH 11/16] xsysace: Convert to bdops->check_events() Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101229063744.GB8172@angua.secretlab.ca \
--to=grant.likely@secretlab.ca \
--cc=axboe@kernel.dk \
--cc=hch@infradead.org \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®