public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: hch@infradead.org, axboe@kernel.dk, matthew@wil.cx,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/2] block: Expose discard granularity
Date: Fri, 30 Oct 2009 01:07:19 -0400	[thread overview]
Message-ID: <20091030050719.GD17714@infradead.org> (raw)
In-Reply-To: <1256873409-12668-2-git-send-email-martin.petersen@oracle.com>

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.


  reply	other threads:[~2009-10-30  5:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-30  3:30 [RFC] Thin provisioning bits Martin K. Petersen
2009-10-30  3:30 ` [PATCH 1/2] block: Expose discard granularity Martin K. Petersen
2009-10-30  5:07   ` Christoph Hellwig [this message]
2009-11-02 13:31     ` Martin K. Petersen
2009-11-03 15:12       ` Christoph Hellwig
2009-11-03 19:08         ` Jens Axboe
2009-10-30  3:30 ` [PATCH 2/2] sd: WRITE SAME(16) / UNMAP support Martin K. Petersen
2009-10-30  4:28   ` Douglas Gilbert
2009-10-30  4:53     ` Martin K. Petersen
2009-10-30 16:02       ` Ric Wheeler
2009-10-30  5:11   ` Christoph Hellwig
2009-11-02 13:32     ` Martin K. Petersen
2009-11-03 15:12       ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2009-11-04  4:25 Thin provisioning update Martin K. Petersen
2009-11-04  4:25 ` [PATCH 1/2] block: Expose discard granularity Martin K. Petersen

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=20091030050719.GD17714@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=matthew@wil.cx \
    /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