Re: [dm-devel] dm-mpath: always return reservation conflict

2016-09-29 Thread James Bottomley
On Thu, 2016-09-29 at 11:01 -0400, Mike Snitzer wrote: > On Tue, Sep 27 2016 at 2:50pm -0400, > James Bottomley wrote: > > > On Tue, 2016-09-27 at 08:34 +0200, Hannes Reinecke wrote: > > > On 09/26/2016 09:06 PM, James Bottomley wrote: > > > > On Mon,

[dm-devel] [PATCH 2/2] multipathd, libmultipathd: Make delays independent of clock jumps

2016-09-29 Thread Bart Van Assche
Time synchronization software like ntpd can adjust the clock forwards and backwards. Avoid that the duration of a delay is influenced by clock jumps initiated by time synchronization software. Signed-off-by: Bart Van Assche Cc: Mike Christie ---

[dm-devel] [PATCH 1/2] libmultipath/checkers/{rbd, tur}: Fix pthread_cond_signal() calls

2016-09-29 Thread Bart Van Assche
Calling pthread_cond_signal() without holding the associated mutex sporadically results in a lost wakeup. Hence call pthread_cond_signal() while holding the mutex used by pthread_cond_wait(). Signed-off-by: Bart Van Assche Cc: Mike Christie ---

Re: [dm-devel] [PATCH 01/10] dm snapshot: Use kmalloc_array() in init_origin_hash()

2016-09-29 Thread Joe Perches
On Thu, 2016-09-29 at 23:14 +0200, Paul Bolle wrote: > On Thu, 2016-09-29 at 13:56 -0700, Joe Perches wrote: > > It doesn't matter match either way to me. > Why does this stop you fixing an apparently wrong checkpatch rule, > crude as parts of it are (ie, uppercase identifier must be a constant)?

[dm-devel] [PATCH 1/3] block: invalidate the page cache when issuing BLKZEROOUT.

2016-09-29 Thread Darrick J. Wong
Invalidate the page cache (as a regular O_DIRECT write would do) to avoid returning stale cache contents at a later time. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by:

[dm-devel] [PATCH 2/3] block: require write_same and discard requests align to logical block size

2016-09-29 Thread Darrick J. Wong
Make sure that the offset and length arguments that we're using to construct WRITE SAME and DISCARD requests are actually aligned to the logical block size. Failure to do this causes other errors in other parts of the block layer or the SCSI layer because disks don't support partial logical block

[dm-devel] [PATCH 3/3] block: implement (some of) fallocate for block devices

2016-09-29 Thread Darrick J. Wong
After much discussion, it seems that the fallocate feature flag FALLOC_FL_ZERO_RANGE maps nicely to SCSI WRITE SAME; and the feature FALLOC_FL_PUNCH_HOLE maps nicely to the devices that have been whitelisted for zeroing SCSI UNMAP. Punch still requires that FALLOC_FL_KEEP_SIZE is set. A length

[dm-devel] [PATCH v11 0/3] fallocate for block devices

2016-09-29 Thread Darrick J. Wong
Hi Andrew & others, This is a resend of the patchset to fix page cache coherency with BLKZEROOUT and implement fallocate for block devices. This time I'm sending it direct to Andrew for inclusion because the block layer maintainer has not been responsive over the past year of submissions. Can

Re: [dm-devel] [PATCH 01/10] dm snapshot: Use kmalloc_array() in init_origin_hash()

2016-09-29 Thread Joe Perches
On Thu, 2016-09-29 at 22:39 +0200, Paul Bolle wrote: > On Thu, 2016-09-29 at 13:24 -0700, Joe Perches wrote: > > On Thu, 2016-09-29 at 21:43 +0200, Paul Bolle wrote: > > > Why doesn't that regex match on "ORIGIN_HASH_SIZE"? > > It does match. > If that regex does match, it being part of a negative

Re: [dm-devel] [PATCH v2 3/3] block: implement (some of) fallocate for block devices

2016-09-29 Thread Darrick J. Wong
On Thu, Sep 29, 2016 at 01:08:57PM -0700, Bart Van Assche wrote: > On 09/28/2016 07:19 PM, Darrick J. Wong wrote: > >After much discussion, it seems that the fallocate feature flag > >FALLOC_FL_ZERO_RANGE maps nicely to SCSI WRITE SAME; and the feature > >FALLOC_FL_PUNCH_HOLE maps nicely to the

Re: [dm-devel] [PATCH 01/10] dm snapshot: Use kmalloc_array() in init_origin_hash()

2016-09-29 Thread Joe Perches
On Thu, 2016-09-29 at 21:43 +0200, Paul Bolle wrote: > On Thu, 2016-09-29 at 08:01 -0700, Joe Perches wrote: > > $Constant there is any number and the match regex is > > any upper case variable. > Why doesn't that regex match on "ORIGIN_HASH_SIZE"? It does match. Did you see my earlier email? $

Re: [dm-devel] [PATCH v2 3/3] block: implement (some of) fallocate for block devices

2016-09-29 Thread Bart Van Assche
On 09/28/2016 07:19 PM, Darrick J. Wong wrote: After much discussion, it seems that the fallocate feature flag FALLOC_FL_ZERO_RANGE maps nicely to SCSI WRITE SAME; and the feature FALLOC_FL_PUNCH_HOLE maps nicely to the devices that have been whitelisted for zeroing SCSI UNMAP. Punch still

Re: [dm-devel] dm-mpath: always return reservation conflict

2016-09-29 Thread Christoph Hellwig
On Thu, Sep 29, 2016 at 11:01:33AM -0400, Mike Snitzer wrote: > I've elected to just take this change for 4.9. Please see: > https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-4.9=8ff232c1a819c2e98d85974a3bff0b7b8e2970ed Thanks Mike. If any problems show up I

Re: [dm-devel] [PATCH 01/10] dm snapshot: Use kmalloc_array() in init_origin_hash()

2016-09-29 Thread Joe Perches
On Thu, 2016-09-29 at 13:45 +0200, Paul Bolle wrote: > On Thu, 2016-09-29 at 13:12 +0200, Paul Bolle wrote: > > Or did I misread that test? > I finally did some digging: commit e367455a9f25 ("checkpatch: emit > fewer kmalloc_array/kcalloc conversion warnings") shows I didn't. You still misread it

Re: [dm-devel] dm-mpath: always return reservation conflict

2016-09-29 Thread Mike Snitzer
On Tue, Sep 27 2016 at 2:50pm -0400, James Bottomley wrote: > On Tue, 2016-09-27 at 08:34 +0200, Hannes Reinecke wrote: > > On 09/26/2016 09:06 PM, James Bottomley wrote: > > > On Mon, 2016-09-26 at 09:52 -0700, Christoph Hellwig wrote: > > > > Getting

Re: [dm-devel] dm snapshot: Use kmalloc_array() in init_origin_hash()

2016-09-29 Thread Theodore Ts'o
On Thu, Sep 29, 2016 at 01:45:41PM +0200, SF Markus Elfring wrote: > > We have no hope of fixing Markus' homegrown coccinelle script. > > I have got an other impression. I see further possibilities > to clarify involved communication and software development challenges > for a few source code

Re: [dm-devel] [PATCH 03/10] md/dm-crypt: Rename a jump label in crypt_message()

2016-09-29 Thread Theodore Ts'o
On Wed, Sep 28, 2016 at 05:40:14PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 28 Sep 2016 14:54:39 +0200 > > Adjust a jump label according to the current Linux coding style convention. In what bizzaro world is the "current Linux coding

Re: [dm-devel] [PATCH 05/10] md/dm-crypt: Rename a jump label in crypt_set_key()

2016-09-29 Thread Theodore Ts'o
On Wed, Sep 28, 2016 at 05:42:28PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 28 Sep 2016 15:21:18 +0200 > > Adjust jump labels according to the current Linux coding style convention. > > - > -out: > +set_memory: > /* Hex key string

Re: [dm-devel] [PATCH 01/10] dm snapshot: Use kmalloc_array() in init_origin_hash()

2016-09-29 Thread Joe Perches
On Thu, 2016-09-29 at 11:54 +0200, Paul Bolle wrote: > Andy, Joe, > > On Thu, 2016-09-29 at 11:07 +0200, SF Markus Elfring wrote: > > * Multiplications for the size determination of memory allocations > >   indicated that array data structures should be processed. > >   Thus use the corresponding

[dm-devel] [PATCH 08/10] md/dm-crypt: Return directly after a failed crypto_alloc_ahash() in crypt_iv_essiv_ctr()

2016-09-29 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 28 Sep 2016 15:55:47 +0200 Return directly after a call of the function "crypto_alloc_ahash" failed here. Signed-off-by: Markus Elfring --- drivers/md/dm-crypt.c | 3 +-- 1 file changed, 1

[dm-devel] [PATCH 00/10] md/dm-crypt: Fine-tuning for five function implementations

2016-09-29 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 28 Sep 2016 17:25:17 +0200 Some update suggestions were taken into account from static source code analysis. Markus Elfring (10): Use kcalloc() in crypt_alloc_tfms() Reduce the scope for a variable in crypt_alloc_tfms() Rename

[dm-devel] [PATCH 05/10] md/dm-crypt: Rename a jump label in crypt_set_key()

2016-09-29 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 28 Sep 2016 15:21:18 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/md/dm-crypt.c | 9 - 1 file changed, 4

[dm-devel] [PATCH 10/10] md/dm-crypt: Delete unnecessary variable initialisations in crypt_iv_essiv_ctr()

2016-09-29 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 28 Sep 2016 16:44:32 +0200 Three local variables will be set to an appropriate pointer a bit later. Thus omit the explicit initialisation which became unnecessary with a previous update step. Signed-off-by: Markus Elfring

[dm-devel] [PATCH 01/10] md/dm-crypt: Use kcalloc() in crypt_alloc_tfms()

2016-09-29 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 28 Sep 2016 13:26:22 +0200 * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus reuse the corresponding function "kcalloc". This issue was

[dm-devel] [PATCH 04/10] md/dm-crypt: Delete an unnecessary variable initialisation in crypt_message()

2016-09-29 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 28 Sep 2016 15:06:05 +0200 The local variable "ret" will be set to an appropriate value in if branches. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring ---

[dm-devel] [PATCH 06/10] md/dm-crypt: Delete an unnecessary variable initialisation in crypt_set_key()

2016-09-29 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 28 Sep 2016 15:24:13 +0200 The local variable "r" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring ---

Re: [dm-devel] [PATCH 2/3] block: require write_same and discard requests align to logical block size

2016-09-29 Thread Hannes Reinecke
On 09/29/2016 02:39 AM, Darrick J. Wong wrote: > Make sure that the offset and length arguments that we're using to > construct WRITE SAME and DISCARD requests are actually aligned to the > logical block size. Failure to do this causes other errors in other > parts of the block layer or the SCSI