lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101229063744.GB8172@angua.secretlab.ca>
Date:	Tue, 28 Dec 2010 23:37:44 -0700
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Tejun Heo <tj@...nel.org>
Cc:	axboe@...nel.dk, linux-kernel@...r.kernel.org,
	kay.sievers@...y.org, hch@...radead.org
Subject: Re: [PATCH 11/16] xsysace: convert to bdops->check_events()

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@...nel.org>
> Cc: Jens Axboe <axboe@...nel.dk>
> Cc: Kay Sievers <kay.sievers@...y.org>
> Cc: Grant Likely <grant.likely@...retlab.ca>

Acked-by: Grant Likely <grant.likely@...retlab.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
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ