mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Kani, Toshimitsu" <toshi.kani@hpe.com>
To: "dan.j.williams@intel.com" <dan.j.williams@intel.com>,
	"snitzer@redhat.com" <snitzer@redhat.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>
Cc: "dm-devel@redhat.com" <dm-devel@redhat.com>,
	"ross.zwisler@linux.intel.com" <ross.zwisler@linux.intel.com>,
	"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-nvdimm@ml01.01.org" <linux-nvdimm@ml01.01.org>,
	"yigal@plexistor.com" <yigal@plexistor.com>
Subject: Re: [PATCH v3 3/4] dm: add infrastructure for DAX support
Date: Thu, 23 Jun 2016 23:36:25 +0000	[thread overview]
Message-ID: <1466724984.3504.380.camel@hpe.com> (raw)
In-Reply-To: <1466715953-40692-4-git-send-email-snitzer@redhat.com>

On Thu, 2016-06-23 at 17:05 -0400, Mike Snitzer wrote:
 :
> +static int device_supports_dax(struct dm_target *ti, struct dm_dev *dev,
> +			       sector_t start, sector_t len, void *data)
> +{
> +	struct request_queue *q = bdev_get_queue(dev->bdev);
> +
> +	return q && blk_queue_dax(q);
> +}
> +
> +static bool dm_table_supports_dax(struct dm_table *t)
> +{
> +	struct dm_target *ti;
> +	unsigned i = 0;
> +
> +	/* Ensure that all targets support DAX. */
> +	while (i < dm_table_get_num_targets(t)) {
> +		ti = dm_table_get_target(t, i++);
> +
> +		if (!ti->type->direct_access)
> +			return false;
> +
> +		if (!ti->type->iterate_devices ||
> +		    !ti->type->iterate_devices(ti, device_supports_dax,
> NULL))
> +			return false;
> +	}
> +
> +	return true;
> +}
> +

Hi Mike,

Thanks for the update.  I have a question about the above change.  Targets may
have their own parameters.  For instance, dm-stripe has 'chunk_size', which is
checked in stripe_ctr().  DAX adds additional restriction that chunk_size
needs to be aligned by page size.  So, I think we need to keep target
responsible to verify if DAX can be supported.  What do you think?

Thanks,
-Toshi

  reply	other threads:[~2016-06-23 23:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23 21:05 [PATCH v3 0/4] Support DAX for device-mapper linear devices Mike Snitzer
2016-06-23 21:05 ` [PATCH v3 1/4] block: add QUEUE_FLAG_DAX for devices to advertise their DAX support Mike Snitzer
2016-06-23 21:05 ` [PATCH v3 2/4] block: expose QUEUE_FLAG_DAX in sysfs Mike Snitzer
2016-06-23 21:05 ` [PATCH v3 3/4] dm: add infrastructure for DAX support Mike Snitzer
2016-06-23 23:36   ` Kani, Toshimitsu [this message]
2016-06-24  1:49     ` Mike Snitzer
2016-06-24 15:40       ` Kani, Toshimitsu
2016-06-24 15:44         ` Mike Snitzer
2016-06-24 15:56           ` Kani, Toshimitsu
2016-06-23 21:05 ` [PATCH v3 4/4] dm linear: add " Mike Snitzer
2016-06-30 17:00 ` [PATCH v3 0/4] Support DAX for device-mapper linear devices Mike Snitzer
2016-07-08 19:30   ` Mike Snitzer

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=1466724984.3504.380.camel@hpe.com \
    --to=toshi.kani@hpe.com \
    --cc=axboe@kernel.dk \
    --cc=dan.j.williams@intel.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@ml01.01.org \
    --cc=ross.zwisler@linux.intel.com \
    --cc=snitzer@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yigal@plexistor.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome