Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1430246
| From | "Kani, Toshimitsu" <toshi.kani@hpe.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 3/4] dm: add infrastructure for DAX support |
| Date | 2016-06-24 01:40 +0200 |
| Message-ID | <rNmo1-it-11@gated-at.bofh.it> (permalink) |
| References | <rNk2S-7gz-13@gated-at.bofh.it> <rNk2S-7gz-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 3/4] dm: add infrastructure for DAX support Mike Snitzer <snitzer@redhat.com> - 2016-06-23 23:10 +0200
Re: [PATCH v3 3/4] dm: add infrastructure for DAX support "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2016-06-24 01:40 +0200
Re: [PATCH v3 3/4] dm: add infrastructure for DAX support Mike Snitzer <snitzer@redhat.com> - 2016-06-24 03:50 +0200
Re: [PATCH v3 3/4] dm: add infrastructure for DAX support Mike Snitzer <snitzer@redhat.com> - 2016-06-24 18:00 +0200
Re: [PATCH v3 3/4] dm: add infrastructure for DAX support "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2016-06-24 18:00 +0200
Re: [PATCH v3 3/4] dm: add infrastructure for DAX support "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2016-06-24 18:00 +0200
csiph-web