Re: dm: ioctl: use kvfree

2016-04-11 Thread Mike Snitzer
On Mon, Apr 11 2016 at 11:14am -0400, Sudip Mukherjee wrote: > We can use kvfree() instead of calling kfree() and vfree() based on > if-else and param_flags. kvfree() will check the type of address and > will call the respective function to free it. > Additionally we can also remove the use of DM

Re: [PATCH 20/27] dm: dm-bufio.c: use bio_set_vec_table()

2016-04-05 Thread Mike Snitzer
On Tue, Apr 05 2016 at 9:04am -0400, Christoph Hellwig wrote: > On Tue, Apr 05, 2016 at 08:07:35PM +0800, Ming Lei wrote: > > Signed-off-by: Ming Lei > > --- > > drivers/md/dm-bufio.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/drivers/md/dm-bufio.c b/driv

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

2016-03-21 Thread Mike Snitzer
On Tue, Mar 15, 2016 at 3:42 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. P

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

2016-03-21 Thread Mike Snitzer
On Mon, Mar 21 2016 at 3:11pm -0400, Darrick J. Wong wrote: > On Mon, Mar 21, 2016 at 02:52:00PM -0400, Mike Snitzer wrote: > > On Tue, Mar 15, 2016 at 3:42 PM, Darrick J. Wong > > wrote: > > > After much discussion, it seems that the fallocate feature flag > &g

Re: linux-next: build failure after merge of the device-mapper tree

2016-03-03 Thread Mike Snitzer
On Thu, Mar 03 2016 at 9:59pm -0500, Stephen Rothwell wrote: > Hi all, > > After merging the device-mapper tree, today's linux-next build (powerpc > ppc64_defconfig) failed like this: > > drivers/md/dm.c: In function '__split_and_process_non_flush': > drivers/md/dm.c:1761:6: error: 'ret' undec

Re: [PATCH resend] [dm]fix NULL pointer when create dm device

2016-02-29 Thread Mike Snitzer
On Mon, Feb 01 2016 at 11:29pm -0500, DingXiang wrote: > In some conditions(such as umount fs failed),origin path or origin bdev or > both of the two is same > as cow's.If this happens, origin dev will be freed when get cow dev in > function "dm_get_device" , > then "s->origin->dev" which used

Re: [PATCH v5 0/3] init: add support to directly boot to a mapped device

2016-02-26 Thread Mike Snitzer
On Fri, Feb 26 2016 at 2:59pm -0500, Kees Cook wrote: > On Fri, Feb 26, 2016 at 11:21 AM, Mike Snitzer wrote: > > On Fri, Feb 26 2016 at 1:52pm -0500, > > Kees Cook wrote: > > > >> On Fri, Feb 26, 2016 at 8:53 AM, Mike Snitzer wrote: > >> > On Mon,

Re: [PATCH v5 0/3] init: add support to directly boot to a mapped device

2016-02-26 Thread Mike Snitzer
On Fri, Feb 26 2016 at 1:52pm -0500, Kees Cook wrote: > On Fri, Feb 26, 2016 at 8:53 AM, Mike Snitzer wrote: > > On Mon, Feb 22 2016 at 1:55pm -0500, > > Kees Cook wrote: > > > >> On Sun, Feb 21, 2016 at 2:08 PM, Alasdair G Kergon wrote: > >> > On S

Re: [PATCH v5 0/3] init: add support to directly boot to a mapped device

2016-02-26 Thread Mike Snitzer
On Mon, Feb 22 2016 at 1:55pm -0500, Kees Cook wrote: > On Sun, Feb 21, 2016 at 2:08 PM, Alasdair G Kergon wrote: > > On Sat, Feb 20, 2016 at 10:13:49AM -0800, Kees Cook wrote: > >> This is a resurrection of a patch series from a few years back, first > >> brought to the dm maintainers in 2010.

Re: dm: drop unnecessary assignment of md->queue

2016-02-24 Thread Mike Snitzer
On Wed, Feb 24 2016 at 3:15am -0500, Bob Liu wrote: > md->queue and q are the same thing in dm_init_request_based_queue() and > dm_init_request_based_blk_mq_queue(). > > Also drop the temporary struct request_queue *q. Yeah, I carried the extra assignment just as a form of documentation but yo

Re: 4.4-final: 28 bioset threads on small notebook

2016-02-23 Thread Mike Snitzer
On Mon, Feb 22 2016 at 9:55pm -0500, Ming Lei wrote: > On Tue, Feb 23, 2016 at 6:58 AM, Kent Overstreet > wrote: > > On Sun, Feb 21, 2016 at 05:40:59PM +0800, Ming Lei wrote: > >> On Sun, Feb 21, 2016 at 2:43 PM, Ming Lin-SSI > >> wrote: > >> >>-Original Message- > >> > > >> > So it's

Re: 4.4-final: 28 bioset threads on small notebook

2016-02-20 Thread Mike Snitzer
On Sat, Feb 20 2016 at 3:04pm -0500, Pavel Machek wrote: > Hi! > > > > > > > I know it is normal to spawn 8 threads for every single function, > > > > > ... > > > > > > but 28 threads? > > > > > > > > > > > > root 974 0.0 0.0 0 0 ?S< Dec08 0:00 > > > > > > [bioset

Re: 4.4-final: 28 bioset threads on small notebook

2016-02-20 Thread Mike Snitzer
On Sat, Feb 20 2016 at 1:42pm -0500, Pavel Machek wrote: > On Sat 2016-02-20 18:40:35, Pavel Machek wrote: > > > > On Fri 2015-12-11 09:08:41, Mike Snitzer wrote: > > > On Fri, Dec 11 2015 at 5:49am -0500, > > > Pavel Machek wrote: > > > > >

Re: dm: check for kmalloc failure in dm_init_request_based_blk_mq_queue()

2016-02-09 Thread Mike Snitzer
On Tue, Feb 09 2016 at 6:14am -0500, Dan Carpenter wrote: > We can just return -ENOMEM if the kzalloc() fails. > > Fixes: 41b2facaf4ba ('dm: allocate blk_mq_tag_set rather than embed in > mapped_device') > Signed-off-by: Dan Carpenter Thanks, folded in.

Re: [PATCH v2] dm pref-path: provides preferred path load balance policy

2016-01-22 Thread Mike Snitzer
[Hannes please fix your mail client, seems you dropped all the original CCs] On Fri, Jan 22 2016 at 8:42am -0500, Hannes Reinecke wrote: > On 01/22/2016 02:31 PM, Ravikanth Nalla wrote: > > v2: > > - changes merged with latest mainline and functionality re-verified. > > - performed addition

Re: dm ioctl: Access user-land memory through safe functions.

2016-01-06 Thread Mike Snitzer
On Wed, Jan 06 2016 at 8:22pm -0500, Scotty Bauer wrote: > > > On 01/05/2016 02:13 PM, Mike Snitzer wrote: > > On Tue, Jan 05 2016 at 3:16pm -0500, > > Mike Snitzer wrote: > > > >> On Tue, Dec 08 2015 at 1:26pm -0500, > >> Scotty Baue

Re: dm ioctl: Access user-land memory through safe functions.

2016-01-05 Thread Mike Snitzer
On Tue, Jan 05 2016 at 3:16pm -0500, Mike Snitzer wrote: > On Tue, Dec 08 2015 at 1:26pm -0500, > Scotty Bauer wrote: > > > Friendly ping, is anyone interested in this? > > The passed @user argument is flagged via __user so it can be > deferenced directly. It

Re: dm ioctl: Access user-land memory through safe functions.

2016-01-05 Thread Mike Snitzer
On Tue, Dec 08 2015 at 1:26pm -0500, Scotty Bauer wrote: > > On 12/01/2015 11:11 AM, Scotty wrote: > > > > 0001-dm-ioctl-Access-user-land-memory-through-safe-functi.patch > > > > > > From b26adf880eba03ac6f2b1dd87426bb96fd2a0282 Mon Sep 17 00:00:00 2001 > > From: Scotty Bauer > > Date: Tue,

Re: corruption causing crash in __queue_work

2015-12-17 Thread Mike Snitzer
On Thu, Dec 17 2015 at 10:50am -0500, Tejun Heo wrote: > Hello, Nikolay. > > On Thu, Dec 17, 2015 at 05:43:12PM +0200, Nikolay Borisov wrote: > > Right, but my initial understanding was that when canceling the delayed > > work and then issuing flush_workqueue would act the same way as if > > can

Re: corruption causing crash in __queue_work

2015-12-14 Thread Mike Snitzer
On Mon, Dec 14 2015 at 3:11pm -0500, Nikolay Borisov wrote: > On Mon, Dec 14, 2015 at 5:31 PM, Mike Snitzer wrote: > > On Mon, Dec 14 2015 at 3:41P -0500, > > Nikolay Borisov wrote: > > > >> Had another poke at the backtrace that is produced and here what th

Re: corruption causing crash in __queue_work

2015-12-14 Thread Mike Snitzer
On Mon, Dec 14 2015 at 3:41P -0500, Nikolay Borisov wrote: > Had another poke at the backtrace that is produced and here what the > delayed_work looks like: > > crash> struct delayed_work 88036772c8c0 > struct delayed_work { > work = { > data = { > counter = 1537 > }, >

Re: corruption causing crash in __queue_work

2015-12-11 Thread Mike Snitzer
On Fri, Dec 11 2015 at 1:00pm -0500, Nikolay Borisov wrote: > On Fri, Dec 11, 2015 at 7:08 PM, Tejun Heo wrote: > > > > Hmmm... No idea why it didn't show up in the debug log but the only > > way a workqueue could be in the above state is either it got > > explicitly destroyed or somehow pwq re

Re: 4.4-rc: 28 bioset threads on small notebook

2015-12-11 Thread Mike Snitzer
On Fri, Dec 11 2015 at 5:49am -0500, Pavel Machek wrote: > Hi! > > I know it is normal to spawn 8 threads for every single function, ... > but 28 threads? > > root 974 0.0 0.0 0 0 ?S< Dec08 0:00 [bioset] ... How many physical block devices do you have? DM is doin

Re: dm verity: use sector_div for division

2015-12-08 Thread Mike Snitzer
On Tue, Dec 08 2015 at 10:42am -0500, Arnd Bergmann wrote: > The dm verity sec implementation uses do_div for dividing a sector_t, > which is slower than necessary when sector_t is a 32-bit type, and > we now get a warning for this case: > > include/asm-generic/div64.h:224:22: warning: passing a

Re: [PATCH v2 0/2] dm verity: add support for error correction

2015-12-07 Thread Mike Snitzer
On Mon, Dec 07 2015 at 1:07pm -0500, Milan Broz wrote: > On 12/07/2015 05:31 PM, Sami Tolvanen wrote: > > On Mon, Dec 07, 2015 at 09:58:14AM -0500, Mike Snitzer wrote: > >> Great. Moving forward it'd be awesome if you could work to get your > >> verity F

Re: [PATCH v2 0/2] dm verity: add support for error correction

2015-12-07 Thread Mike Snitzer
On Mon, Dec 07 2015 at 8:21am -0500, Sami Tolvanen wrote: > On Fri, Dec 04, 2015 at 04:09:35PM -0500, Mike Snitzer wrote: > > I'd really appreciate it if you could do some regression testing, > > etc on your end to verify I didn't break anything while tweaking > >

Re: [PATCH v2 0/2] dm verity: add support for error correction

2015-12-04 Thread Mike Snitzer
On Fri, Dec 04 2015 at 5:03P -0500, Sami Tolvanen wrote: > On Thu, Dec 03, 2015 at 06:05:38PM -0500, Mike Snitzer wrote: > > If you're OK with those changes I'll fold that commit into your main FEC > > commit. > > Yes, these changes look fine. Thanks! OK, I

Re: [PATCH v2 0/2] dm verity: add support for error correction

2015-12-03 Thread Mike Snitzer
On Thu, Dec 03 2015 at 2:54pm -0500, Mike Snitzer wrote: > On Thu, Dec 03 2015 at 9:26am -0500, > Sami Tolvanen wrote: > > > Changes since v1: > > > > - Added CONFIG_DM_VERITY_FEC and split error correction into > > dm-verity-fec.[ch] to further se

Re: [PATCH v2 0/2] dm verity: add support for error correction

2015-12-03 Thread Mike Snitzer
On Thu, Dec 03 2015 at 9:26am -0500, Sami Tolvanen wrote: > Changes since v1: > > - Added CONFIG_DM_VERITY_FEC and split error correction into > dm-verity-fec.[ch] to further separate the functionality from the > rest of dm-verity. Follows the same pattern as dm-uevent. > > - Added

Re: [PATCH 0/4] dm verity: add support for error correction

2015-12-02 Thread Mike Snitzer
On Mon, Nov 09 2015 at 2:19P -0500, Sami Tolvanen wrote: > On Mon, Nov 09, 2015 at 11:37:35AM -0500, Mike Snitzer wrote: > > I'm left wondering: can the new error correction code be made an > > optional feature that is off by default? -- so as to preserve some > >

Re: [PATCH 2/4] dm verity: separate function for parsing opt args

2015-12-02 Thread Mike Snitzer
On Wed, Nov 04 2015 at 9:02P -0500, Sami Tolvanen wrote: > Move optional argument parsing into a separate function to make it > easier to add more of them without making verity_ctr even longer. > > Signed-off-by: Sami Tolvanen I've taken this patch, for Linux 4.5, but I've applied the followi

Re: block: Always check queue limits for cloned requests

2015-11-29 Thread Mike Snitzer
On Sun, Nov 29 2015 at 11:15am -0500, Markus Trippelsdorf wrote: > On 2015.11.29 at 16:43 +0100, Hannes Reinecke wrote: > > On 11/29/2015 12:49 PM, Markus Trippelsdorf wrote: > > > > > > I'm still seeing the issue (BUG at drivers/scsi/scsi_lib.c:1096!) even > > > with this patch applied. > > >

Re: block: Always check queue limits for cloned requests

2015-11-26 Thread Mike Snitzer
init_sgtable(). > > To clarify this the patch renames blk_rq_check_limits() > to blk_cloned_rq_check_limits() and removes the symbol > export, as the new function should only be used for > cloned requests and never exported. > > Cc: Mike Snitzer > Cc: Ewan Milne > Cc: Jeff

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-25 Thread Mike Snitzer
On Wed, Nov 25 2015 at 3:23pm -0500, Mike Snitzer wrote: > On Wed, Nov 25 2015 at 2:24pm -0500, > Jens Axboe wrote: > > > On 11/25/2015 12:10 PM, Hannes Reinecke wrote: > > >The problem is that NOMERGE does too much, as it inhibits _any_ merging. > > > >

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-25 Thread Mike Snitzer
On Wed, Nov 25 2015 at 2:24pm -0500, Jens Axboe wrote: > On 11/25/2015 12:10 PM, Hannes Reinecke wrote: > >On 11/25/2015 06:56 PM, Jens Axboe wrote: > >>On 11/25/2015 02:04 AM, Hannes Reinecke wrote: > >>>On 11/20/2015 04:28 PM, Ewan Milne wrote: > On Fri, 2015-11-20 at 15:55 +0100, Hannes R

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-25 Thread Mike Snitzer
On Wed, Nov 25 2015 at 4:04am -0500, Hannes Reinecke wrote: > On 11/20/2015 04:28 PM, Ewan Milne wrote: > > On Fri, 2015-11-20 at 15:55 +0100, Hannes Reinecke wrote: > >> Can't we have a joint effort here? > >> I've been spending a _LOT_ of time trying to debug things here, but > >> none of the

Re: [PATCH 0/2] Introduce the request handling for dm-crypt

2015-11-11 Thread Mike Snitzer
On Wed, Nov 11 2015 at 4:31am -0500, Baolin Wang wrote: > Now the dm-crypt code only implemented the 'based-bio' method to encrypt/ > decrypt block data, which can only hanle one bio at one time. As we know, > one bio must use the sequential physical address and it also has a limitation > of len

Re: [PATCH 1/2] block: Introduce BIO_ENDIO_FREE for bio flags

2015-11-11 Thread Mike Snitzer
On Wed, Nov 11 2015 at 4:31am -0500, Baolin Wang wrote: > When we use dm-crypt to decrypt block data, it will decrypt the block data > in endio() when one IO is completed. In this situation we don't want the > cloned bios is freed before calling the endio(). > > Thus introduce 'BIO_ENDIO_FREE'

Re: [RFC PATCH 00/32] separate operations from flags in the bio/request structs

2015-11-11 Thread Mike Snitzer
On Wed, Nov 11 2015 at 6:28am -0500, Christoph Hellwig wrote: > On Wed, Nov 11, 2015 at 01:53:24AM -0600, Mike Christie wrote: > > We no longer have the bvec merge functions so the original reason given > > in the thread/patch Bart referenced is no longer valid. > > > > Offlist it was suggested

Linux >= 4.2 dm_any_congested bug due to bad data from vfs/mm? [was: Bug in dm_any_congested?]

2015-11-10 Thread Mike Snitzer
[Cc'ing LKML and linux-fsdevel to cast a wider net and raise awareness] On Tue, Nov 10 2015 at 10:02am -0500, Boštjan Škufca @ Teon.si wrote: > On 10 November 2015 at 15:39, Zdenek Kabelac wrote: > > Dne 10.11.2015 v 14:14 Boštjan Škufca @ Teon.si napsal(a): > >> > >> Hi all, > >> > >> HW is a

Re: [PATCH 0/4] dm verity: add support for error correction

2015-11-09 Thread Mike Snitzer
On Mon, Nov 09 2015 at 2:19pm -0500, Sami Tolvanen wrote: > On Mon, Nov 09, 2015 at 11:37:35AM -0500, Mike Snitzer wrote: > > I'm left wondering: can the new error correction code be made an > > optional feature that is off by default? -- so as to preserve some > >

Re: [PATCH 0/4] dm verity: add support for error correction

2015-11-09 Thread Mike Snitzer
On Thu, Nov 05 2015 at 12:33pm -0500, Sami Tolvanen wrote: > On Thu, Nov 05, 2015 at 08:34:04AM +0100, Milan Broz wrote: > > could you please elaborate why is all this needed? To extend support > > of some faulty flash chips? > > This makes dm-verity more robust against corruption caused by eith

Re: linux-next: build failure after merge of the device-mapper tree

2015-11-01 Thread Mike Snitzer
On Sun, Nov 01 2015 at 5:43am -0500, Stephen Rothwell wrote: > Hi all, > > After merging the device-mapper tree, today's linux-next build (powerpc > ppc64_defconfig) failed like this: > > drivers/md/dm-mpath.c: In function 'multipath_prepare_ioctl': > drivers/md/dm-mpath.c:1570:41: error: 'cmd

Re: Persistent Reservation API V4

2015-10-28 Thread Mike Snitzer
On Wed, Oct 28 2015 at 2:43pm -0400, Mike Snitzer wrote: > On Thu, Oct 15 2015 at 8:10am -0400, > Christoph Hellwig wrote: > > > This series adds support for a simplified Persistent Reservation API > > to the block layer. The intent is that both in-kernel and userspace

Re: Persistent Reservation API V4

2015-10-28 Thread Mike Snitzer
On Thu, Oct 15 2015 at 8:10am -0400, Christoph Hellwig wrote: > This series adds support for a simplified Persistent Reservation API > to the block layer. The intent is that both in-kernel and userspace > consumers can use the API instead of having to hand craft SCSI or NVMe > command through t

Re: block: re-add discard_granularity and alignment checks

2015-10-22 Thread Mike Snitzer
the related changes in commit b49a087. The good thing is now we can > remove the 2G discard size cap and just use UINT_MAX to avoid bi_size > overflow. > > Reviewed-by: Christoph Hellwig > Tested-by: Christoph Hellwig > Signed-off-by: Ming Lin Reviewed-by: Mike Snitzer Thanks!

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Mike Snitzer
On Wed, Oct 21 2015 at 1:33pm -0400, Ming Lin wrote: > On Wed, 2015-10-21 at 12:19 -0400, Mike Snitzer wrote: > > On Wed, Oct 21 2015 at 12:02pm -0400, > > Mike Snitzer wrote: > > > > > On Wed, Oct 14 2015 at 9:27am -0400, > > > Christoph Hellwig wro

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Mike Snitzer
On Wed, Oct 21 2015 at 12:02pm -0400, Mike Snitzer wrote: > On Wed, Oct 14 2015 at 9:27am -0400, > Christoph Hellwig wrote: > > > On Tue, Oct 13, 2015 at 10:44:11AM -0700, Ming Lin wrote: > > > I just did a quick test with a Samsung 900G NVMe device. > &g

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Mike Snitzer
On Wed, Oct 14 2015 at 9:27am -0400, Christoph Hellwig wrote: > On Tue, Oct 13, 2015 at 10:44:11AM -0700, Ming Lin wrote: > > I just did a quick test with a Samsung 900G NVMe device. > > mkfs.xfs is OK on 4.3-rc5. > > > > What's your device model? I may find a similar one to try. > > This is a

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Mike Snitzer
On Wed, Oct 21 2015 at 11:01am -0400, Ming Lin wrote: > On Wed, 2015-10-21 at 09:39 -0400, Jeff Moyer wrote: > > Christoph Hellwig writes: > > > > > Jens, Ming: > > > > > > are you fine with the one liner change to get back to the old I/O > > > pattern? While it looks like the cards fault I'd

Re: [PATCH v3 for-4.4] block: flush queued bios when process blocks to avoid deadlock

2015-10-20 Thread Mike Snitzer
On Sat, Oct 17 2015 at 12:04pm -0400, Ming Lei wrote: > On Thu, Oct 15, 2015 at 4:47 AM, Mike Snitzer wrote: > > From: Mikulas Patocka > > > > The block layer uses per-process bio list to avoid recursion in > > generic_make_request. When generic_make_request is call

Re: [PATCH v2] block: flush queued bios when the process blocks

2015-10-16 Thread Mike Snitzer
On Thu, Oct 15 2015 at 11:08pm -0400, Ming Lei wrote: > On Thu, Oct 15, 2015 at 4:06 PM, Mike Snitzer wrote: > > On Wed, Oct 14 2015 at 11:27pm -0400, > > Ming Lei wrote: > > > >> On Sat, Oct 10, 2015 at 3:52 AM, Mike Snitzer wrote: > >> > >

Re: [PATCH v4 18/79] dm-log-userspace.h: use __u32, __s32 and __u64 from linux/types.h

2015-10-15 Thread Mike Snitzer
On Thu, Oct 15 2015 at 1:55am -0400, Mikko Rapeli wrote: > Fixes userspace compilation errors like: > > linux/dm-log-userspace.h:416:2: error: unknown type name ‘uint64_t’ > > Signed-off-by: Mikko Rapeli As was already explained before, there is no need to compile this for userspace consumpt

Re: [PATCH v2] block: flush queued bios when the process blocks

2015-10-15 Thread Mike Snitzer
On Wed, Oct 14 2015 at 11:27pm -0400, Ming Lei wrote: > On Sat, Oct 10, 2015 at 3:52 AM, Mike Snitzer wrote: > > > > Turns out that this change: > > http://git.kernel.org/cgit/linux/kernel/git/snitzer/linux.git/commit/?h=wip&id=2639638c77768a86216be456c2764e32a2bc

[PATCH v3 for-4.4] block: flush queued bios when process blocks to avoid deadlock

2015-10-14 Thread Mike Snitzer
hot_map is called for this new bio, it waits on down_write(&s->lock) that is held by Process B (in step 5). Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1267650 Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Depends-on: df2cb6daa4 ("block: Avoid deadlocks with bi

Re: Next-20151009 - crash during boot

2015-10-12 Thread Mike Snitzer
On Mon, Oct 12 2015 at 5:50pm -0400, Valdis Kletnieks wrote: > Next-20151009 crashes early in boot (right after I feed cryptsetup > the passphrase for my root filesystem). > > (Yes, the kernel is 10 commits past linux-next - they're all cleanup patches > for > drivers/staging that shouldn't en

Re: 30c2a1faaeb3db94fc92f79553cc72634aa3b218 broke cryptsetup on my machine

2015-10-10 Thread Mike Snitzer
On Sat, Oct 10 2015 at 8:44P -0400, Giedrius Statkevičius wrote: > On Thu, 8 Oct 2015, Geliang Tang wrote: > > > On Wed, Oct 07, 2015 at 10:27:27PM +0300, Giedrius Statkevičius wrote: > > > Hello, > > > I have a LUKS on LVM setup: /boot is unencrypted and everything is > > > "hidden" in > > >

Re: [PATCH v2] block: flush queued bios when the process blocks

2015-10-09 Thread Mike Snitzer
On Fri, Oct 09 2015 at 3:52pm -0400, Mike Snitzer wrote: > Turns out that this change: > http://git.kernel.org/cgit/linux/kernel/git/snitzer/linux.git/commit/?h=wip&id=2639638c77768a86216be456c2764e32a2bcd841 > > needed to be reverted with: > http://git.kernel.org/cg

Re: [PATCH v2] block: flush queued bios when the process blocks

2015-10-09 Thread Mike Snitzer
On Thu, Oct 08 2015 at 11:08am -0400, Mike Snitzer wrote: > On Thu, Oct 08 2015 at 11:04am -0400, > Mikulas Patocka wrote: > > > > > > > On Tue, 6 Oct 2015, Mike Snitzer wrote: > > > > > To give others context for why I'm caring about this i

Re: [PATCH v2] block: flush queued bios when the process blocks

2015-10-08 Thread Mike Snitzer
On Thu, Oct 08 2015 at 11:04am -0400, Mikulas Patocka wrote: > > > On Tue, 6 Oct 2015, Mike Snitzer wrote: > > > To give others context for why I'm caring about this issue again, this > > recent BZ against 4.3-rc served as a reminder that we _need_ a fix: &g

Re: [PATCH v2] block: flush queued bios when the process blocks

2015-10-06 Thread Mike Snitzer
On Tue, Oct 06 2015 at 4:16P -0400, Mike Snitzer wrote: > To give others context for why I'm caring about this issue again, this > recent BZ against 4.3-rc served as a reminder that we _need_ a fix: > https://bugzilla.redhat.com/show_bug.cgi?id=1267650 > > FYI, I clean

[PATCH v2] block: flush queued bios when the process blocks

2015-10-06 Thread Mike Snitzer
To give others context for why I'm caring about this issue again, this recent BZ against 4.3-rc served as a reminder that we _need_ a fix: https://bugzilla.redhat.com/show_bug.cgi?id=1267650 FYI, I cleaned up the plug-based approach a bit further, here is the incremental patch: http://git.kernel.o

Re: block: flush queued bios when the process blocks

2015-10-06 Thread Mike Snitzer
On Tue, Oct 06 2015 at 2:17pm -0400, Mikulas Patocka wrote: > > > On Mon, 5 Oct 2015, Mike Snitzer wrote: > > > FYI, I've put rebased versions of your 2 patches in my wip branch, see: > > http://git.kernel.org/cgit/linux/kernel/git/snitzer/linux.git/log/?h=wip &g

Re: block: flush queued bios when the process blocks

2015-10-06 Thread Mike Snitzer
On Tue, Oct 06 2015 at 9:28am -0400, Mikulas Patocka wrote: > > > On Mon, 5 Oct 2015, Mike Snitzer wrote: > > > Mikulas, > > > > Could it be that cond_resched() wasn't unplugging? As was > > recently raised in this thread: https://lkml.org/lkml/2

Re: block: flush queued bios when the process blocks

2015-10-05 Thread Mike Snitzer
On Thu, May 29 2014 at 7:52pm -0400, Mikulas Patocka wrote: > > > On Tue, 27 May 2014, Jens Axboe wrote: > > > On 2014-05-27 10:26, Mikulas Patocka wrote: > > > On Tue, 27 May 2014, Jens Axboe wrote: > > > > > > > On 2014-05-27 09:23, Mikulas Patocka wrote: > > > > > > > > > The patch adds

Re: block: flush queued bios when the process blocks

2015-10-05 Thread Mike Snitzer
On Tue, May 27 2014 at 3:56pm -0400, Kent Overstreet wrote: > On Tue, May 27, 2014 at 01:33:06PM -0400, Mike Snitzer wrote: > > On Tue, May 27 2014 at 12:26pm -0400, > > Mikulas Patocka wrote: > > > > > On Tue, 27 May 2014, Jens Axboe wrote: > > > >

Re: [PATCH 1/5] fs: Verify access of user towards block device file when mounting

2015-10-01 Thread Mike Snitzer
On Thu, Oct 01 2015 at 8:55am -0400, Seth Forshee wrote: > On Wed, Sep 30, 2015 at 07:42:15PM -0400, Mike Snitzer wrote: > > On Wed, Sep 30 2015 at 4:15pm -0400, > > Seth Forshee wrote: > > > > > When mounting a filesystem on a block device there is currently

Re: [PATCH 1/5] fs: Verify access of user towards block device file when mounting

2015-09-30 Thread Mike Snitzer
On Wed, Sep 30 2015 at 4:15pm -0400, Seth Forshee wrote: > When mounting a filesystem on a block device there is currently > no verification that the user has appropriate access to the > device file passed to mount. This has not been an issue so far > since the user in question has always been r

Re: dm: ioctl: prevent double freeing

2015-09-15 Thread Mike Snitzer
On Tue, Sep 15 2015 at 12:18pm -0400, Darrick J. Wong wrote: > On Fri, Sep 04, 2015 at 04:52:39PM +0530, Sudip Mukherjee wrote: > > DM_PARAMS_KMALLOC and DM_PARAMS_VMALLOC should never be set together in > > param_flags. We are setting these flags while allocating so we know that > > there is alm

Re: [PATCH 05/17] Update the md driver to use idr helper functions.

2015-09-15 Thread Mike Snitzer
Subject should really be: "dm: update to use idr helper functions" -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.t

Re: [PATCH 12/39] dm: drop null test before destroy functions

2015-09-14 Thread Mike Snitzer
On Mon, Sep 14 2015 at 9:46am -0400, Mikulas Patocka wrote: > > > On Sun, 13 Sep 2015, Julia Lawall wrote: > > > Remove unneeded NULL test. > > > > The semantic patch that makes this change is as follows: > > (http://coccinelle.lip6.fr/) > > > > // > > @@ expression x; @@ > > -if (x != NUL

32-bit bio regression with 4.3 [was: Re: cgroup/loop Bad page state oops in Linux v4.2-rc3-136-g45b4b782e848]

2015-09-11 Thread Mike Snitzer
Ming, Jens, others: Please see this BZ comment that speaks to a 4.3 regression due to the late bio splitting changes: https://bugzilla.redhat.com/show_bug.cgi?id=1247382#c41 But inlined here so we can continue on list: (In reply to Josh Boyer from comment #40) > The function that was fixed in 4.2

Re: randconfig build error with next-20150908, in drivers/md/dm-mpath.c

2015-09-11 Thread Mike Snitzer
: undefined reference to `scsi_dh_set_params' make: *** [vmlinux] Error 1 But with your patch the build completes successfully. James, please feel free to pull in Christoph's patch and add my: Tested-by: Mike Snitzer -- To unsubscribe from this list: send the line "unsu

Re: Regression: Disk corruption with dm-crypt and kernels >= 4.0

2015-09-11 Thread Mike Snitzer
Hi, Could you please try the following patch (against any of the kernels you saw the corruption with. be it 4.0, 4.1, 4.2) to see if the regression you reported goes away? Thanks, Mike From: Mike Snitzer Date: Wed, 9 Sep 2015 21:34:51 -0400 Subject: [PATCH] dm crypt: constrain crypt device&#

Re: randconfig build error with next-20150908, in drivers/md/dm-mpath.c

2015-09-08 Thread Mike Snitzer
On Tue, Sep 08 2015 at 1:34pm -0400, James Bottomley wrote: > On Tue, 2015-09-08 at 13:23 -0400, Mike Snitzer wrote: > > On Tue, Sep 08 2015 at 1:10pm -0400, > > Jim Davis wrote: > > > > > Building with the attached random configuration file, > > >

Re: randconfig build error with next-20150908, in drivers/md/dm-mpath.c

2015-09-08 Thread Mike Snitzer
On Tue, Sep 08 2015 at 1:10pm -0400, Jim Davis wrote: > Building with the attached random configuration file, > > drivers/built-in.o: In function `activate_path': > /home/jim/linux-next/drivers/md/dm-mpath.c:1225: undefined reference > to `scsi_dh_activate' > drivers/built-in.o: In function `pa

[PATCH 2/2] dm: disable slab merging for all DM slabs

2015-09-01 Thread Mike Snitzer
ter: $ cat /proc/slabinfo | grep dm_ | cut -d' ' -f1 dm_thin_new_mapping dm_mpath_io dm_mq_policy_cache_entry dm_cache_migration dm_bio_prison_cell dm_snap_pending_exception dm_exception dm_dirty_log_flush_entry dm_kcopyd_job dm_io dm_uevent dm_clone_request dm_rq_target_io dm_tar

[PATCH 1/2] mm/slab_common: add SLAB_NO_MERGE flag for use when creating slabs

2015-09-01 Thread Mike Snitzer
of a leak in dm-cache being attributed to 'kmalloc-96' rather than the expected 'dm_bio_prison_cell' named slab. Moving forward DM will disable slab merging for all of DM's slabs by using SLAB_NO_MERGE. Signed-off-by: Mike Snitzer --- include/linux/slab.h | 2

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Mike Snitzer
On Tue, Aug 11 2015 at 1:36pm -0400, Martin K. Petersen wrote: > >>>>> "Mike" == Mike Snitzer writes: > > Mike> DM-thinp processes discards internally before it passes them down > Mike> (if configured to do so). If a discard is smaller than the

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Mike Snitzer
On Mon, Aug 10 2015 at 11:38pm -0400, Kent Overstreet wrote: > On Mon, Aug 10, 2015 at 10:41:55PM -0400, Mike Snitzer wrote: > > On Mon, Aug 10 2015 at 10:00pm -0400, > > Martin K. Petersen wrote: > > > > > >>>>> "Ming" == Ming Lin writ

Re: [PATCH V1 Resend 04/11] drivers: md: Drop unlikely before IS_ERR(_OR_NULL)

2015-08-10 Thread Mike Snitzer
On Mon, Aug 10 2015 at 9:42pm -0400, Viresh Kumar wrote: > On 10-08-15, 16:05, Mike Snitzer wrote: > > On Mon, Aug 10 2015 at 2:12am -0400, > > Viresh Kumar wrote: > > > > > IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there &g

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Mike Snitzer
On Mon, Aug 10 2015 at 10:00pm -0400, Martin K. Petersen wrote: > > "Ming" == Ming Lin writes: > > Ming> Did you mean still use (UINT_MAX >> 9) in blkdev_issue_discard()? > > Ming> But that doesn't work for dm-thinp. See Kent's suggestion to use > Ming> 1<<31. > > I'm not sure why things

Re: [PATCH V1 Resend 04/11] drivers: md: Drop unlikely before IS_ERR(_OR_NULL)

2015-08-10 Thread Mike Snitzer
On Mon, Aug 10 2015 at 2:12am -0400, Viresh Kumar wrote: > IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there > is no need to do that again from its callers. Drop it. > > Signed-off-by: Viresh Kumar I picked this up for 4.3, staged in linux-dm.git's 'for-next', see: https:

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Mike Snitzer
On Mon, Aug 10 2015 at 12:14pm -0400, Ming Lin wrote: > On Mon, 2015-08-10 at 11:02 -0400, Mike Snitzer wrote: > > > > Aside from that, I'm in favor of seeing this late bio splitting patchset > > finally land upstream (hopefully in time for the 4.3 merge, Jens?): >

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Mike Snitzer
lock-late-bio-splitting It passes the device-mapper-test-suite's 'thin-provisioning' tests. > Hope I can have your ACK soon. Shouldn't we also be using MAX_BIO_SECTORS in blkdev_issue_write_same (instead of UINT_MAX >> 9)? Aside from that, I'm in favor of seein

Re: [PATCH 3/3] block: by default, limit maximum discard size to 64MB

2015-08-05 Thread Mike Snitzer
On Wed, Jul 15 2015 at 6:14pm -0400, Jens Axboe wrote: > On 07/15/2015 10:29 AM, Mike Snitzer wrote: > >On Wed, Jul 15 2015 at 11:30am -0400, > >Jens Axboe wrote: > > > >>On 07/15/2015 05:46 AM, Austin S Hemmelgarn wrote: > >>>On 2015-07-14 17:48, Jens

Re: [PATCH 5/6] dm: split out a helper to find the ioctl target

2015-08-04 Thread Mike Snitzer
On Tue, Aug 04 2015 at 3:11am -0400, Christoph Hellwig wrote: > We want to reuse this code for the persistent reservation handling, > so move it into a helper. > > Signed-off-by: Christoph Hellwig > --- > drivers/md/dm.c | 50 -- > 1 file change

Re: [PATCH 4/6] dm: refactor ioctl handling

2015-08-04 Thread Mike Snitzer
On Tue, Aug 04 2015 at 3:11am -0400, Christoph Hellwig wrote: > This moves the call to blkdev_ioctl and the argument checking to core code, > and only leaves a callout to find the block device to operate on it the > targets. This will simplifies the code and will allow us to pass through > ioct

Re: Persistent Reservation API

2015-08-04 Thread Mike Snitzer
On Tue, Aug 04 2015 at 3:11am -0400, Christoph Hellwig wrote: > This series adds support for a simplified persistent reservation API > to the block layer. The intent is that both in-kernel and userspace > consumers can use the API instead of having to hand craft SCSI or NVMe > command through t

Re: cgroup/loop Bad page state oops in Linux v4.2-rc3-136-g45b4b782e848

2015-08-03 Thread Mike Snitzer
On Sun, Aug 02 2015 at 10:01P -0400, Josh Boyer wrote: > On Fri, Jul 31, 2015 at 2:58 PM, Josh Boyer wrote: > > On Thu, Jul 30, 2015 at 8:19 PM, Mike Snitzer wrote: > >> > >> The only commit that looks even remotely related (given 32

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-01 Thread Mike Snitzer
On Sat, Aug 01 2015 at 2:58am -0400, Ming Lin wrote: > On Fri, 2015-07-31 at 17:38 -0400, Mike Snitzer wrote: > > > > OK, once setup, to run the 2 tests in question directly you'd do > > something like: > > > > dmtest run --suite thin-provi

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-31 Thread Mike Snitzer
On Fri, Jul 31 2015 at 5:19pm -0400, Ming Lin wrote: > On Fri, Jul 31, 2015 at 12:23 PM, Mike Snitzer wrote: > > On Mon, Jul 06 2015 at 3:44P -0400, > > Ming Lin wrote: > > > >> From: Kent Overstreet > >> > >> The way the block layer is cur

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-31 Thread Mike Snitzer
amdisk - drivers/block/brd.c) > * mtip_submit_request (drivers/block/mtip32xx/mtip32xx.c) > * loop_make_request > * null_queue_bio > * bcache's make_request fns > > Some others are almost certainly safe to remove now, but will be left > for future patches. > > Cc: Jens Axboe &g

Re: cgroup/loop Bad page state oops in Linux v4.2-rc3-136-g45b4b782e848

2015-07-30 Thread Mike Snitzer
On Thu, Jul 30 2015 at 7:14pm -0400, Josh Boyer wrote: > On Thu, Jul 30, 2015 at 7:27 AM, Josh Boyer wrote: > > On Wed, Jul 29, 2015 at 8:29 PM, Ming Lei wrote: > >> On Wed, Jul 29, 2015 at 12:36 PM, Josh Boyer > >> wrote: > >>> On Wed, Jul 29, 2015 at 11:32 AM, Ming Lei wrote: > On We

Re: char: make misc_deregister a void function

2015-07-30 Thread Mike Snitzer
Other than that, there's nothing that can go wrong. > > Cc: Alasdair Kergon > Cc: Mike Snitzer > Cc: Neil Brown > Cc: Alessandro Zummo > Cc: Alexandre Belloni > Cc: Oleg Drokin > Cc: Andreas Dilger > Cc: "Michael S. Tsirkin" > Cc: Wim Van Sebro

Re: [PATCH v5 00/11] simplify block layer based on immutable biovecs

2015-07-27 Thread Mike Snitzer
On Thu, Jul 23 2015 at 2:21pm -0400, Ming Lin wrote: > On Mon, 2015-07-13 at 11:35 -0400, Mike Snitzer wrote: > > On Mon, Jul 13 2015 at 1:12am -0400, > > Ming Lin wrote: > > > > > On Mon, 2015-07-06 at 00:11 -0700, m...@kernel.org wrote: > > > > Hi

Re: dm cache: fix alloc_bitset check that always evaluates as false

2015-07-27 Thread Mike Snitzer
On Thu, Jul 23 2015 at 11:47P -0400, Colin King wrote: > From: Colin Ian King > > static analysis by cppcheck has found a check on alloc_bitset that > always evaluates as false and hence never finds an allocation failure: > > [drivers/md/dm-cache-policy-smq.c:1689]: (warning) Logical conjuncti

[RFC PATCH] block: dm thin: export how block device handles -ENOSPC

2015-07-23 Thread Mike Snitzer
On Thu, Jul 23 2015 at 10:33P -0400, Mike Snitzer wrote: > If you just want to stub out the call to bdev_get_nospace_strategy() I > can crank through implementing it once I get a few minutes. I didn't use a 4th EOPNOTSUPP enum since if a device doesn't have any special -ENOS

Re: [RFC PATCH] block: xfs: dm thin: train XFS to give up on retrying IO if thinp is out of space

2015-07-23 Thread Mike Snitzer
On Thu, Jul 23 2015 at 1:10am -0400, Dave Chinner wrote: > On Wed, Jul 22, 2015 at 11:28:06AM -0500, Eric Sandeen wrote: > > On 7/22/15 8:34 AM, Mike Snitzer wrote: > > > On Tue, Jul 21 2015 at 10:37pm -0400, > > > Dave Chinner wrote: > > >> On Tue,

Re: [RFC PATCH] block: xfs: dm thin: train XFS to give up on retrying IO if thinp is out of space

2015-07-22 Thread Mike Snitzer
On Wed, Jul 22 2015 at 12:28pm -0400, Eric Sandeen wrote: > On 7/22/15 8:34 AM, Mike Snitzer wrote: > > On Tue, Jul 21 2015 at 10:37pm -0400, > > Dave Chinner wrote: > > > >> On Tue, Jul 21, 2015 at 09:40:29PM -0400, Mike Snitzer wrote: > >> > >>

<    1   2   3   4   5   6   7   8   >