Notes on locking for pagacache consistency (was: [PATCH 01/10] mm: pagecache add lock)

2018-05-23 Thread Kent Overstreet
On Fri, May 18, 2018 at 01:45:49PM -0400, Kent Overstreet wrote: > On Fri, May 18, 2018 at 08:53:30AM -0700, Christoph Hellwig wrote: > > On Fri, May 18, 2018 at 06:13:06AM -0700, Matthew Wilcox wrote: > > > > Historically, the only problematic case has been direct IO, and peo

Re: [PATCH 01/10] mm: pagecache add lock

2018-05-23 Thread Kent Overstreet
On Wed, May 23, 2018 at 08:22:39AM -0700, Christoph Hellwig wrote: > On Sun, May 20, 2018 at 06:45:24PM -0400, Kent Overstreet wrote: > > > > > > Honestly I think this probably should be in the core. But IFF we move > > > it to the core the existing users of

Re: [PATCH] [RFC] bcachefs: SIX locks (shared/intent/exclusive)

2018-05-21 Thread Kent Overstreet
On Mon, May 21, 2018 at 08:04:16PM -0700, Matthew Wilcox wrote: > On Mon, May 21, 2018 at 10:19:51PM -0400, Kent Overstreet wrote: > > New lock for bcachefs, like read/write locks but with a third state, > > intent. > > > > Intent locks conflict with each other, but

[PATCH] [RFC] bcachefs: SIX locks (shared/intent/exclusive)

2018-05-21 Thread Kent Overstreet
not only lookups, but updates that would only touch unrelated leaf nodes. With intent locks, we can hold an intent lock on the parent node for the duration of the operation, only taking a write lock on it for the update to that specific node. Signed-off-by: Kent Overstreet <kent.overstr...@gmail.

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Kent Overstreet
On Mon, May 21, 2018 at 02:24:32PM -0400, Mike Snitzer wrote: > Every single data structure change in this series should be reviewed for > unforeseen alignment consequences. Jens seemed to say that is > worthwhile. Not sure if he'll do it or we divide it up. If we divide > it up a temp topic

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Kent Overstreet
On Mon, May 21, 2018 at 12:09:14PM -0400, Mike Snitzer wrote: > On Mon, May 21 2018 at 11:36am -0400, > Jens Axboe wrote: > > > On 5/21/18 9:18 AM, Mike Snitzer wrote: > > > On Mon, May 21 2018 at 11:09am -0400, > > > Jens Axboe wrote: > > > > > >> On 5/21/18

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-20 Thread Kent Overstreet
Thanks - sending it to him On Sun, May 20, 2018 at 7:08 PM, NeilBrown <ne...@suse.com> wrote: > On Sun, May 20 2018, Kent Overstreet wrote: > >> Jens - this series does the rest of the conversions that Christoph wanted, >> and >> drops bioset_create(). >> >

[PATCH 06/12] md: convert to bioset_init()/mempool_init()

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- Resend, including Shaohua Li: drivers/md/md-faulty.c| 2 +- drivers/md/md-linear.c| 2 +- drivers/md/md-multipath.c | 17 - drivers/md/md-multipath.h | 2 +- drivers/md/md.c

Re: [PATCH 01/10] mm: pagecache add lock

2018-05-20 Thread Kent Overstreet
On Fri, May 18, 2018 at 08:53:30AM -0700, Christoph Hellwig wrote: > On Fri, May 18, 2018 at 06:13:06AM -0700, Matthew Wilcox wrote: > > > Historically, the only problematic case has been direct IO, and people > > > have been willing to say "well, if you mix buffered and direct IO you > > > get

[PATCH 01/12] block: convert bounce, q->bio_split to bioset_init()/mempool_init()

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- block/blk-core.c | 7 --- block/blk-merge.c | 8 +++ block/blk-sysfs.c | 3 +-- block/bounce.c | 47 ++ drivers/md/dm.c| 2 +- include/linux

[PATCH 04/12] lightnvm: convert to bioset_init()/mempool_init()

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- drivers/lightnvm/pblk-core.c | 30 ++--- drivers/lightnvm/pblk-init.c | 72 drivers/lightnvm/pblk-read.c | 4 +- drivers/lightnvm/pblk-recovery.c | 2 +- drivers/lightnv

[PATCH 05/12] bcache: convert to bioset_init()/mempool_init()

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- drivers/md/bcache/bcache.h | 10 +- drivers/md/bcache/bset.c| 13 - drivers/md/bcache/bset.h| 2 +- drivers/md/bcache/btree.c | 4 ++-- drivers/md/bcache/io.c | 4 ++-- drivers/md/

[PATCH 03/12] pktcdvd: convert to bioset_init()/mempool_init()

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- drivers/block/pktcdvd.c | 50 - include/linux/pktcdvd.h | 2 +- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c

[PATCH 02/12] drbd: convert to bioset_init()/mempool_init()

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- drivers/block/drbd/drbd_bitmap.c | 4 +- drivers/block/drbd/drbd_int.h | 10 ++--- drivers/block/drbd/drbd_main.c | 71 +++--- drivers/block/drbd/drbd_receiver.c | 6 +-- drivers/bloc

[PATCH 06/12] md: convert to bioset_init()/mempool_init()

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- drivers/md/md-faulty.c| 2 +- drivers/md/md-linear.c| 2 +- drivers/md/md-multipath.c | 17 - drivers/md/md-multipath.h | 2 +- drivers/md/md.c | 61 +-- drivers/m

[PATCH 08/12] target: convert to bioset_init()/mempool_init()

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- drivers/target/target_core_iblock.c | 14 ++ drivers/target/target_core_iblock.h | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/target/target_core_iblock.c b/drivers/

[PATCH 07/12] dm: convert to bioset_init()/mempool_init()

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- drivers/md/dm-bio-prison-v1.c | 13 --- drivers/md/dm-bio-prison-v2.c | 13 --- drivers/md/dm-cache-target.c | 25 ++--- drivers/md/dm-core.h | 4 +- drivers/md/dm-c

[PATCH 10/12] btrfs: convert to bioset_init()/mempool_init()

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- fs/btrfs/extent_io.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index e99b329002..56d32bb462 100644 --- a/fs/btrfs/extent_io.c ++

[PATCH 11/12] xfs: convert to bioset_init()/mempool_init()

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- fs/xfs/xfs_aops.c | 2 +- fs/xfs/xfs_aops.h | 2 +- fs/xfs/xfs_super.c | 11 +-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 0ab824f574..102463543d

[PATCH 12/12] block: Drop bioset_create()

2018-05-20 Thread Kent Overstreet
All users have been converted to bioset_init() Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- block/bio.c | 61 ++--- include/linux/bio.h | 6 ++--- 2 files changed, 15 insertions(+), 52 deletions(-) diff --git a/block/b

[PATCH 09/12] fs: convert block_dev.c to bioset_init()

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- fs/block_dev.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index 7ec920e270..b550ae280f 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -272,7 +272,7 @@

[PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-20 Thread Kent Overstreet
Jens - this series does the rest of the conversions that Christoph wanted, and drops bioset_create(). Only lightly tested, but the changes are pretty mechanical. Based on your for-next tree. It's also in the for-jens branch at https://evilpiepirate.org/git/bcachefs.git Kent Overstreet (12

Re: [PATCH 10/10] Dynamic fault injection

2018-05-18 Thread Kent Overstreet
On Fri, May 18, 2018 at 01:05:20PM -0600, Andreas Dilger wrote: > On May 18, 2018, at 1:49 AM, Kent Overstreet <kent.overstr...@gmail.com> > wrote: > > > > Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> > > I agree with Christoph that even if the

Re: [PATCH 00/10] RFC: assorted bcachefs patches

2018-05-18 Thread Kent Overstreet
On Fri, May 18, 2018 at 02:03:25PM -0400, Josef Bacik wrote: > There's nothing stopping us from doing that, it just uses a kprobe to override > the function with our helper, so we could conceivably put it anywhere in the > function. The reason I limited it to individual functions was because it

Re: [PATCH 00/10] RFC: assorted bcachefs patches

2018-05-18 Thread Kent Overstreet
On Fri, May 18, 2018 at 01:45:36PM -0400, Josef Bacik wrote: > On Fri, May 18, 2018 at 03:48:58AM -0400, Kent Overstreet wrote: > > These are all the remaining patches in my bcachefs tree that touch stuff > > outside > > fs/bcachefs. Not all of them are suitable for incl

Re: [PATCH 01/10] mm: pagecache add lock

2018-05-18 Thread Kent Overstreet
On Fri, May 18, 2018 at 08:53:30AM -0700, Christoph Hellwig wrote: > On Fri, May 18, 2018 at 06:13:06AM -0700, Matthew Wilcox wrote: > > > Historically, the only problematic case has been direct IO, and people > > > have been willing to say "well, if you mix buffered and direct IO you > > > get

Re: [PATCH 06/10] Generic radix trees

2018-05-18 Thread Kent Overstreet
On Fri, May 18, 2018 at 09:02:03AM -0700, Christoph Hellwig wrote: > Completely lacks any explanation, including why this should be > in lib/. Also should come in the same series with actual users > of the infrastructure. Also in the cover letter... * Generic radix trees This is a very

Re: [PATCH 10/10] Dynamic fault injection

2018-05-18 Thread Kent Overstreet
On Fri, May 18, 2018 at 09:02:45AM -0700, Christoph Hellwig wrote: > On Fri, May 18, 2018 at 03:49:18AM -0400, Kent Overstreet wrote: > > Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> > > Completely lacks any explanation or argument why it would be useful. It'

Re: [PATCH 04/10] locking: export osq_lock()/osq_unlock()

2018-05-18 Thread Kent Overstreet
On Fri, May 18, 2018 at 01:40:54PM +0200, Peter Zijlstra wrote: > On Fri, May 18, 2018 at 07:32:05AM -0400, Kent Overstreet wrote: > > It does strike me that the whole optimistic spin algorithm > > (mutex_optimistic_spin() and rwsem_optimistic_spin()) are ripe for factoring > &

Re: [PATCH 03/10] locking: bring back lglocks

2018-05-18 Thread Kent Overstreet
On Fri, May 18, 2018 at 01:03:39PM +0200, Peter Zijlstra wrote: > On Fri, May 18, 2018 at 06:13:53AM -0400, Kent Overstreet wrote: > > On Fri, May 18, 2018 at 11:51:02AM +0200, Peter Zijlstra wrote: > > > On Fri, May 18, 2018 at 03:49:04AM -0400, Kent Overstreet wrote: > >

Re: [PATCH 04/10] locking: export osq_lock()/osq_unlock()

2018-05-18 Thread Kent Overstreet
On Fri, May 18, 2018 at 01:08:08PM +0200, Peter Zijlstra wrote: > On Fri, May 18, 2018 at 06:18:04AM -0400, Kent Overstreet wrote: > > On Fri, May 18, 2018 at 11:52:04AM +0200, Peter Zijlstra wrote: > > > On Fri, May 18, 2018 at 03:49:06AM -0400, Kent Overstreet wrote: > >

Re: [PATCH 04/10] locking: export osq_lock()/osq_unlock()

2018-05-18 Thread Kent Overstreet
On Fri, May 18, 2018 at 11:52:04AM +0200, Peter Zijlstra wrote: > On Fri, May 18, 2018 at 03:49:06AM -0400, Kent Overstreet wrote: > > No.. and most certainly not without a _very_ good reason. Ok, can I ask why? Here's what it's for: commit 61782bf71eef83919af100a9747d8d86dfdf3605 Aut

Re: [PATCH 03/10] locking: bring back lglocks

2018-05-18 Thread Kent Overstreet
On Fri, May 18, 2018 at 11:51:02AM +0200, Peter Zijlstra wrote: > On Fri, May 18, 2018 at 03:49:04AM -0400, Kent Overstreet wrote: > > bcachefs makes use of them - also, add a proper lg_lock_init() > > Why?! lglocks are horrid things, we got rid of them for a reason. They > hav

Re: [PATCH 00/10] RFC: assorted bcachefs patches

2018-05-18 Thread Kent Overstreet
shit, git send-email pebkac error - disregard all the block patches in the thread -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 00/10] RFC: assorted bcachefs patches

2018-05-18 Thread Kent Overstreet
ust individually (I have tests that iterate over all the faults and flip them on one by one). I also use it in bcachefs to add fault injection points for uncommon error paths in the filesystem startup/recovery path, and for various hard to test slowpaths that only happen if we race in weird ways (race_fault()

[PATCH 01/10] mm: pagecache add lock

2018-05-18 Thread Kent Overstreet
Add a per address space lock around adding pages to the pagecache - making it possible for fallocate INSERT_RANGE/COLLAPSE_RANGE to work correctly, and also hopefully making truncate and dio a bit saner. Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- fs/inode.c

[PATCH 02/10] mm: export find_get_pages()

2018-05-18 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- mm/filemap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/filemap.c b/mm/filemap.c index 31dd888785..78b99019bf 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1845,6 +1845,7 @@ unsigned find_get_pages_range(

[PATCH 03/10] locking: bring back lglocks

2018-05-18 Thread Kent Overstreet
bcachefs makes use of them - also, add a proper lg_lock_init() Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- include/linux/lglock.h | 97 + kernel/locking/Makefile | 1 + kernel/locking/lglock.c

[PATCH 04/10] locking: export osq_lock()/osq_unlock()

2018-05-18 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- kernel/locking/osq_lock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/locking/osq_lock.c b/kernel/locking/osq_lock.c index 6ef600aa0f..dfa71347b0 100644 --- a/kernel/locking/osq_lock.c +++ b/kernel/locking/osq_

[PATCH 05/10] don't use spin_lock_irqsave() unnecessarily

2018-05-18 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- mm/page-writeback.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 586f31261c..17ccc294c9 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -2

[PATCH 06/10] Generic radix trees

2018-05-18 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- include/linux/generic-radix-tree.h | 131 ++ lib/Makefile | 3 +- lib/generic-radix-tree.c | 167 + 3 files changed, 300 insertions(+), 1 de

[PATCH 07/10] bcache: optimize continue_at_nobarrier()

2018-05-18 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- drivers/md/bcache/closure.h | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/md/bcache/closure.h b/drivers/md/bcache/closure.h index 3b9dfc9962..2392a46bcd 100644 --- a/drivers/md/

[PATCH 08/10] bcache: move closures to lib/

2018-05-18 Thread Kent Overstreet
Prep work for bcachefs - being a fork of bcache it also uses closures Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- drivers/md/bcache/Kconfig | 10 +- drivers/md/bcache/Makefile | 6 +++--- drivers/md/bcache/bc

[PATCH 09/10] closures: closure_wait_event()

2018-05-18 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- include/linux/closure.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/include/linux/closure.h b/include/linux/closure.h index 1072bf2c13..ef22d18f7c 100644 --- a/include/linux/closure.h +++ b/i

[PATCH 10/10] Dynamic fault injection

2018-05-18 Thread Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstr...@gmail.com> --- include/asm-generic/vmlinux.lds.h | 4 + include/linux/dynamic_fault.h | 117 + lib/Kconfig.debug | 5 + lib/Makefile | 2 + lib/dynamic_fault.c

Re: [dm-devel] Proposal for annotating _unstable_ pages

2015-05-22 Thread Kent Overstreet
On Fri, May 22, 2015 at 11:17:59AM -0700, Darrick J. Wong wrote: Back when I was writing the stable pages patches, I observed that some of the filesystems didn't hold the pages containing their own metadata stable during writeback on a stable-writes device. The journalling filesystems were

Re: Proposal for annotating _unstable_ pages

2015-05-21 Thread Kent Overstreet
On Thu, May 21, 2015 at 06:54:53PM +0200, Jan Kara wrote: On Wed 20-05-15 18:04:40, Kent Overstreet wrote: Yeah. I never figured out a sane way to migrate pages and keep everything else happy. Daniel Phillips is having a go at page forking for tux3; let's see if the questions about

Proposal for annotating _unstable_ pages

2015-05-20 Thread Kent Overstreet
On Tue, May 19, 2015 at 01:10:55PM -0700, Darrick J. Wong wrote: On Tue, May 19, 2015 at 08:42:00AM -0700, Kent Overstreet wrote: Also, stable pages - what's been going on there? Last I heard you were talking about using the page migration code to do COW, did anything come of that? I

[PATCH 9/9] iov_iter: Kill written arg to iov_iter_init()

2014-02-26 Thread Kent Overstreet
This gets rid of a usually needless call to iov_iter_advance(). Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Alexander Viro v...@zeniv.linux.org.uk Cc: Jens Axboe ax...@kernel.dk Cc: Chris Mason c...@fb.com Cc: linux-btrfs@vger.kernel.org Cc: Steve French sfre...@samba.org Cc: linux-c

[PATCH 6/9] btrfs: Convert to bio_for_each_segment()

2014-02-26 Thread Kent Overstreet
This is going to be important for future (hopeful) block layer refactoring, and using the standard primitives makes the code easier to audit. Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Chris Mason c...@fb.com Cc: linux-btrfs@vger.kernel.org --- fs/btrfs/extent_io.c | 12

[PATCH 5/9] btrfs: generic_make_request() handles arbitrary size bios now

2014-02-26 Thread Kent Overstreet
So there's no need for btrfs to break up bios for device limits anymore Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Chris Mason c...@fb.com Cc: linux-btrfs@vger.kernel.org --- fs/btrfs/volumes.c | 73 -- 1 file changed, 73 deletions

Re: btrfs on bcache

2014-01-08 Thread Kent Overstreet
On Wed, Jan 08, 2014 at 07:35:32PM +, Chris Mason wrote: On Mon, 2014-01-06 at 15:37 -0800, Kent Overstreet wrote: Ok, I looked again at the relevant btrfs code, I guess I can see how this printk isn't normally triggered. But Chris, _what on earth_ is btrfs trying to check

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Kent Overstreet
On Wed, Jan 08, 2014 at 09:11:49PM +, Chris Mason wrote: On Wed, 2014-01-08 at 13:01 -0800, Muthu Kumar wrote: On Wed, Jan 8, 2014 at 12:51 PM, Chris Mason c...@fb.com wrote: On Wed, 2014-01-08 at 12:40 -0800, Muthu Kumar wrote: On Wed, Jan 8, 2014 at 12:16 PM, Chris Mason c...@fb.com

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Kent Overstreet
On Wed, Jan 08, 2014 at 01:18:46PM -0800, Muthu Kumar wrote: On Wed, Jan 8, 2014 at 1:14 PM, Kent Overstreet k...@daterainc.com wrote: On Wed, Jan 08, 2014 at 09:11:49PM +, Chris Mason wrote: On Wed, 2014-01-08 at 13:01 -0800, Muthu Kumar wrote: On Wed, Jan 8, 2014 at 12:51 PM, Chris

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-06 Thread Kent Overstreet
. Reported-by: fengguang...@intel.com Cc: Kent Overstreet k...@daterainc.com CC: Jens Axboe ax...@kernel.dk Signed-off-by: Muthukumar Ratty mut...@gmail.com fs/btrfs/volumes.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs

Re: btrfs on bcache

2014-01-06 Thread Kent Overstreet
On Fri, Dec 20, 2013 at 03:46:30PM +, Chris Mason wrote: On Fri, 2013-12-20 at 10:42 -0200, Fábio Pfeifer wrote: Hello, I put the WARN_ON(1); after the printk lines (incomplete page read and incomplete page write) in extent_io.c. here some call traces: [ 19.509497]

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-06 Thread Kent Overstreet
-by: fengguang...@intel.com CC: Kent Overstreet k...@daterainc.com CC: Jens Axboe ax...@kernel.dk CC: Chris Mason clm@fv Signed-off-by: Muthukumar Ratty mut...@gmail.com fs/btrfs/volumes.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs

Re: [PATCH 1/9] block: Convert various code to bio_for_each_segment()

2013-11-07 Thread Kent Overstreet
On Thu, Nov 07, 2013 at 12:26:30PM +0100, Jan Kara wrote: On Mon 04-11-13 15:36:19, Kent Overstreet wrote: With immutable biovecs we don't want code accessing bi_io_vec directly - the uses this patch changes weren't incorrect since they all own the bio, but it makes the code harder to audit

[PATCH] Block layer stuff/DIO rewrite prep for 3.14

2013-11-04 Thread Kent Overstreet
Now that immutable biovecs is in, these are the remaining patches required for my DIO rewrite, along with some related cleanup/refactoring. The key enabler is patch 4 - making generic_make_request() handle arbitary sized bios. This takes what was once bio_add_page()'s responsibility and pushes it

[PATCH 2/9] block: submit_bio_wait() conversions

2013-11-04 Thread Kent Overstreet
It was being open coded in a few places. Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Jens Axboe ax...@kernel.dk Cc: Joern Engel jo...@logfs.org Cc: Prasad Joshi prasadjoshi.li...@gmail.com --- block/blk-flush.c | 19 +-- fs/logfs/dev_bdev.c | 8 +--- 2 files

[PATCH 9/9] block: Add bio_get_user_pages()

2013-11-04 Thread Kent Overstreet
This replaces some of the code that was in __bio_map_user_iov(), and soon we're going to use this helper in the dio code. Note that this relies on the recent change to make generic_make_request() take arbitrary sized bios - we're not using bio_add_page() here. Signed-off-by: Kent Overstreet k

[PATCH 6/9] mtip32xx: handle arbitrary size bios

2013-11-04 Thread Kent Overstreet
We get a measurable performance increase by handling this in the driver when we're already looping over the biovec, instead of handling it separately in generic_make_request() (or bio_add_page() originally) Signed-off-by: Kent Overstreet k...@daterainc.com --- drivers/block/mtip32xx/mtip32xx.c

[PATCH 8/9] bcache: generic_make_request() handles large bios now

2013-11-04 Thread Kent Overstreet
So we get to delete our hacky workaround. Signed-off-by: Kent Overstreet k...@daterainc.com --- drivers/md/bcache/bcache.h| 18 drivers/md/bcache/io.c| 100 +- drivers/md/bcache/journal.c | 4 +- drivers/md/bcache/request.c

[PATCH 7/9] blk-lib.c: generic_make_request() handles large bios now

2013-11-04 Thread Kent Overstreet
shouldn't matter. Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Jens Axboe ax...@kernel.dk --- block/blk-lib.c | 175 ++-- 1 file changed, 30 insertions(+), 145 deletions(-) diff --git a/block/blk-lib.c b/block/blk-lib.c index 2da76c9

[PATCH 1/9] block: Convert various code to bio_for_each_segment()

2013-11-04 Thread Kent Overstreet
With immutable biovecs we don't want code accessing bi_io_vec directly - the uses this patch changes weren't incorrect since they all own the bio, but it makes the code harder to audit for no good reason - also, this will help with multipage bvecs later. Signed-off-by: Kent Overstreet k

[PATCH 3/9] block: Move bouncing to generic_make_request()

2013-11-04 Thread Kent Overstreet
into account bouncing (as it'll already have been done). Also, __blk_recalc_rq_segments() now doesn't have to take into account potential bouncing - it's already been done. Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Jens Axboe ax...@kernel.dk Cc: Jiri Kosina jkos...@suse.cz Cc: Asai Thambi S

[PATCH 4/9] block: Make generic_make_request handle arbitrary sized bios

2013-11-04 Thread Kent Overstreet
are convenient, and more importantly stacked drivers don't have to deal with both their own bio size limitations and the limitations of the (potentially multiple) devices underneath them. In the future this will let us delete merge_bvec_fn and a bunch of other code. Signed-off-by: Kent Overstreet k

Re: [dm-devel] [PATCH 4/9] block: Make generic_make_request handle arbitrary sized bios

2013-11-04 Thread Kent Overstreet
On Mon, Nov 04, 2013 at 03:56:52PM -0800, Mike Christie wrote: On 11/04/2013 03:36 PM, Kent Overstreet wrote: @@ -1822,6 +1820,14 @@ void generic_make_request(struct bio *bio) */ blk_queue_bounce(q, bio); + if (!blk_queue_largebios(q

Re: [RFC PATCH v1 0/5] BTRFS hot relocation support

2013-05-28 Thread Kent Overstreet
On Tue, May 21, 2013 at 02:22:34AM +, Duncan wrote: zwu.kernel posted on Mon, 20 May 2013 23:11:22 +0800 as excerpted: The patchset is trying to introduce hot relocation support for BTRFS. In hybrid storage environment, when the data in rotating disk get hot, it can be relocated to

[PATCH] btrfs: Kill some bi_idx references

2012-09-11 Thread Kent Overstreet
(), and perusing the code it doesn't appear anything else was holding a reference to the bio. The other use end_bio_extent_readpage() was just for a pr_debug() - changed it to something that might be a bit more useful. Signed-off-by: Kent Overstreet koverstr...@google.com CC: Chris Mason chris.ma