lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160624014930.GA10540@redhat.com>
Date:	Thu, 23 Jun 2016 21:49:30 -0400
From:	Mike Snitzer <snitzer@...hat.com>
To:	"Kani, Toshimitsu" <toshi.kani@....com>
Cc:	"dan.j.williams@...el.com" <dan.j.williams@...el.com>,
	"axboe@...nel.dk" <axboe@...nel.dk>,
	"dm-devel@...hat.com" <dm-devel@...hat.com>,
	"ross.zwisler@...ux.intel.com" <ross.zwisler@...ux.intel.com>,
	"viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-nvdimm@...1.01.org" <linux-nvdimm@...1.01.org>,
	"yigal@...xistor.com" <yigal@...xistor.com>
Subject: Re: [PATCH v3 3/4] dm: add infrastructure for DAX support

On Thu, Jun 23 2016 at  7:36pm -0400,
Kani, Toshimitsu <toshi.kani@....com> wrote:

> 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?

We've never had to concern the dm-stripe target with hardware
specific chunk_size validation.  The user is able to specify the
chunk_size via lvm2's lvcreate -I argument.  Yes this gives users enough
rope to hang themselves but it is very easy to configure a dm-stripe
device with the appropriate chunk size (PAGE_SIZE) from userspace.

But lvm2 could even be trained to make sure the chunk_size is a factor
of physical_block_size (PAGE_SIZE in the case of pmem) if the underlying
devices export queue/dax=1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ