All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: axboe@kernel.dk, dm-devel@redhat.com, martin.petersen@oracle.com
Subject: Re: [PATCH 1/2 v2] dm: discard support for the linear target
Date: Sun, 27 Jun 2010 09:41:47 -0400	[thread overview]
Message-ID: <20100627134145.GA3970@redhat.com> (raw)
In-Reply-To: <20100627094918.GF12016@lst.de>

On Sun, Jun 27 2010 at  5:49am -0400,
Christoph Hellwig <hch@lst.de> wrote:

> On Sat, Jun 26, 2010 at 04:31:24PM -0400, Mike Snitzer wrote:
> > Allow discards to be passed through to a single device linear mapping.
> > Introduce DM_TARGET_SUPPORTS_DISCARDS target features flag that each
> > target must set once discard support is added.
> > 
> > Verify table's underlying devices support discards prior to setting the
> > associated DM device as capable of discards (via QUEUE_FLAG_DISCARD).
> > 
> > Signed-off-by: Mike Snitzer <snitzer@redhat.com>
> > ---
> >  drivers/md/dm-linear.c        |    1 +
> >  drivers/md/dm-table.c         |   51 ++++++++++++++++++++++++++++++++++
> >  drivers/md/dm.c               |   60 ++++++++++++++++++++++++++++++++--------
> >  drivers/md/dm.h               |    1 +
> >  include/linux/device-mapper.h |    1 +
> >  5 files changed, 102 insertions(+), 12 deletions(-)
> 
> > +static int device_discard_incapable(struct dm_target *ti, struct dm_dev *dev,
> > +				    sector_t start, sector_t len, void *data)
> > +{
> > +	struct block_device *bdev = dev->bdev;
> > +	struct request_queue *q = bdev_get_queue(bdev);
> > +
> > +	WARN_ON(!q);
> > +	return (!q || !blk_queue_discard(q));
> > +}
> 
> How could a NULL queue happen here?

It really cannot, I was just being defensive.

  reply	other threads:[~2010-06-27 13:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-26 20:31 [PATCH 1/2 v2] dm: discard support for the linear target Mike Snitzer
2010-06-26 20:31 ` [RFC PATCH 2/2] dm: add support for splitting discard requests Mike Snitzer
2010-06-27  9:47   ` Christoph Hellwig
2010-06-27 13:59     ` Mike Snitzer
2010-06-27  9:49 ` [PATCH 1/2 v2] dm: discard support for the linear target Christoph Hellwig
2010-06-27 13:41   ` Mike Snitzer [this message]
2010-06-29  5:25 ` [PATCH 1/2 v3] " Mike Snitzer
2010-06-29  5:33   ` Mike Snitzer
     [not found] <1022306007.323911277741886883.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2010-06-28 16:18 ` [PATCH 1/2 v2] " Edward Thornber

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=20100627134145.GA3970@redhat.com \
    --to=snitzer@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=hch@lst.de \
    --cc=martin.petersen@oracle.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.