Re: [dm-devel] [PATCH] dm-region-hash: fix strange usage of mempool_alloc.

2017-04-23 Thread NeilBrown
On Fri, Apr 21 2017, Mikulas Patocka wrote: > On Mon, 10 Apr 2017, NeilBrown wrote: > >> mempool_alloc() should only be called with GFP_ATOMIC when >> it is not safe to wait. Passing __GFP_NOFAIL to kmalloc() >> says that it is safe to wait indefinitely. So this code is >> inconsistent. >> >>

Re: [dm-devel] [PATCH v2 for-4.12] block: fix blk_integrity_register to use template's interval_exp if not 0

2017-04-23 Thread Jens Axboe
On 04/22/2017 03:22 PM, Mike Snitzer wrote: > When registering an integrity profile: if the template's interval_exp is > not 0 use it, otherwise use the ilog2() of logical block size of the > provided gendisk. > > This fixes a long-standing DM linear target bug where it cannot pass > integrity

Re: [dm-devel] [PATCH v2 for-4.12] block: fix blk_integrity_register to use template's interval_exp if not 0

2017-04-23 Thread Martin K. Petersen
Mike, > When registering an integrity profile: if the template's interval_exp is > not 0 use it, otherwise use the ilog2() of logical block size of the > provided gendisk. > > This fixes a long-standing DM linear target bug where it cannot pass > integrity data to the underlying device if its

[dm-devel] [PATCH v2 for-4.12] block: fix blk_integrity_register to use template's interval_exp if not 0

2017-04-23 Thread Mike Snitzer
When registering an integrity profile: if the template's interval_exp is not 0 use it, otherwise use the ilog2() of logical block size of the provided gendisk. This fixes a long-standing DM linear target bug where it cannot pass integrity data to the underlying device if its logical block size

Re: [dm-devel] [resend PATCH v2 11/33] dm: add dax_device and dax_operations support

2017-04-23 Thread Mike Snitzer
On Thu, Apr 20 2017 at 12:30pm -0400, Dan Williams wrote: > On Mon, Apr 17, 2017 at 12:09 PM, Dan Williams > wrote: > > Allocate a dax_device to represent the capacity of a device-mapper > > instance. Provide a ->direct_access() method via

Re: [dm-devel] [PATCH for-4.12] block, dm: use __blk_integrity_register to properly setup integrity profile

2017-04-23 Thread Mike Snitzer
On Fri, Apr 21 2017 at 6:43pm -0400, Martin K. Petersen wrote: > > Mike/Mikulas, > > > Introduce __blk_integrity_register() to allow users more precise control > > over the logical block size used to register the integrity profile. > > blk_integrity_register() now

Re: [dm-devel] [PATCH] block: get rid of blk_integrity_revalidate()

2017-04-23 Thread Dan Williams
On Wed, Apr 19, 2017 at 7:04 PM, Martin K. Petersen wrote: > Ilya Dryomov writes: > > Ilya, > >> Commit 25520d55cdb6 ("block: Inline blk_integrity in struct gendisk") >> introduced blk_integrity_revalidate(), which seems to assume ownership >> of

Re: [dm-devel] [resend PATCH v2 00/33] dax: introduce dax_operations

2017-04-23 Thread Dan Williams
[ adding akpm, sfr, and jens ] I applied this series and pushed it out for the nvdimm.git branch that gets auto pulled into -next. The set is still awaiting acks from device-mapper, ext4, xfs, and vfs (for the copy_from_iter_ops, patch 29/33). If those come next week perhaps this can be merged

Re: [dm-devel] [PATCH for-4.12] block, dm: use __blk_integrity_register to properly setup integrity profile

2017-04-23 Thread Martin K. Petersen
Mike/Mikulas, > Introduce __blk_integrity_register() to allow users more precise control > over the logical block size used to register the integrity profile. > blk_integrity_register() now calls __blk_integrity_register(). This seems a bit kludgy. It would be cleaner having the integrity

Re: [dm-devel] [PATCH] dm-mpath: Requeue after a small delay if blk_get_request() fails

2017-04-23 Thread Bart Van Assche
On Fri, 2017-04-07 at 16:50 -0700, Bart Van Assche wrote: > If blk_get_request() returns ENODEV then multipath_clone_and_map() > causes a request to be requeued immediately. This can cause a > kworker thread to spend 100% of the CPU time of a single core in > __blk_mq_run_hw_queue() and also can

Re: [dm-devel] [PATCH] block: get rid of blk_integrity_revalidate()

2017-04-23 Thread Jens Axboe
On 04/18/2017 10:43 AM, Ilya Dryomov wrote: > Commit 25520d55cdb6 ("block: Inline blk_integrity in struct gendisk") > introduced blk_integrity_revalidate(), which seems to assume ownership > of the stable pages flag and unilaterally clears it if no blk_integrity > profile is registered: > >

[dm-devel] [PATCH for-4.12] block, dm: use __blk_integrity_register to properly setup integrity profile

2017-04-23 Thread Mike Snitzer
From: Mikulas Patocka When registering integrity profile on a DM device, the logical block size of the underlying device with integrity support must be used, not the logical block size of the stacked device we are creating. Introduce __blk_integrity_register() to allow