Re: [PATCH 1/2] block: Expose discard granularity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 29, 2009 at 11:30:08PM -0400, Martin K. Petersen wrote:
> + * blk_queue_discard_granularity - set minimum size for discard requests
> + * @q:	the request queue for the device
> + * @gran:  the smallest unit the device can discard (in bytes)
> + *
> + * Description:
> + */
> +void blk_queue_discard_granularity(struct request_queue *q, unsigned int gran)
> +{
> +	q->limits.discard_granularity = gran;
> +}
> +EXPORT_SYMBOL(blk_queue_discard_granularity);
> +

> +static inline unsigned int queue_discard_granularity(struct request_queue *q)
> +{
> +	return q->limits.discard_granularity;
> +}
> +
> +static inline unsigned int queue_max_discard_sectors(struct request_queue *q)
> +{
> +	return q->limits.max_discard_sectors;
> +}
> +


Btw, I really hate these wrapper, they make followign the code much
harder.  Already annoyed me for the I/O topology bits.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux