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: <20160624182859.GD13898@redhat.com>
Date:	Fri, 24 Jun 2016 14:29:00 -0400
From:	Mike Snitzer <snitzer@...hat.com>
To:	Toshi Kani <toshi.kani@....com>
Cc:	linux-nvdimm@...1.01.org, linux-kernel@...r.kernel.org,
	linux-raid@...r.kernel.org, dm-devel@...hat.com,
	Dan Williams <dan.j.williams@...el.com>,
	Ross Zwisler <ross.zwisler@...ux.intel.com>,
	Alasdair Kergon <agk@...hat.com>
Subject: Re: dm stripe: add DAX support

On Fri, Jun 24 2016 at  2:23pm -0400,
Toshi Kani <toshi.kani@....com> wrote:

> Change dm-stripe to implement direct_access function,
> stripe_direct_access(), which maps bdev and sector and
> calls direct_access function of its physical target device.
> 
> Signed-off-by: Toshi Kani <toshi.kani@....com>
> Cc: Alasdair Kergon <agk@...hat.com>
> Cc: Dan Williams <dan.j.williams@...el.com>
> Cc: Ross Zwisler <ross.zwisler@...ux.intel.com>
> ---
>  drivers/md/dm-stripe.c |   25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c
> index 48f1c01..8925f6a 100644
> --- a/drivers/md/dm-stripe.c
> +++ b/drivers/md/dm-stripe.c
> @@ -308,6 +308,30 @@ static int stripe_map(struct dm_target *ti, struct bio *bio)
>  	return DM_MAPIO_REMAPPED;
>  }
>  
> +static long stripe_direct_access(struct dm_target *ti, sector_t sector,
> +		void __pmem **kaddr, pfn_t *pfn, long size)
> +{
> +	struct stripe_c *sc;
> +	struct block_device *bdev;
> +	uint32_t stripe;
> +	struct blk_dax_ctl dax = {
> +		.size = size,
> +	};
> +	long ret;
> +
> +	sc = ti->private;
> +	stripe_map_sector(sc, sector, &stripe, &dax.sector);
> +
> +	dax.sector += sc->stripe[stripe].physical_start;
> +	bdev = sc->stripe[stripe].dev->bdev;
> +
> +	ret = bdev_direct_access(bdev, &dax);
> +	*kaddr = dax.addr;
> +	*pfn = dax.pfn;
> +
> +	return ret;
> +}
> +
>  /*
>   * Stripe status:
>   *
> @@ -425,6 +449,7 @@ static struct target_type stripe_target = {
>  	.status = stripe_status,
>  	.iterate_devices = stripe_iterate_devices,
>  	.io_hints = stripe_io_hints,
> +	.direct_access = stripe_direct_access,
>  };
>  
>  int __init dm_stripe_init(void)

Thanks, once jens queues the block changes I'll be able to pull this in
to linux-dm.git

BTW, if in your testing you could evaluate/quantify any extra overhead
from DM that'd be useful to share.  It could be there are bottlenecks
that need to be fixed, etc.

Mike

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ