ChaCha20 vs. AES performance

2016-09-20 Thread Kent Overstreet
Not on the list or I would've replied directly, but on Haswell, ChaCha20 (in software) is over 2x as fast as AES (in hardware), at realistic (for a filesystem) block sizes: testing speed of ctr(aes) (ctr(aes-aesni)) decryption test 0 (128 bit key, 16 byte blocks): 1 operation in 378 cycles (16 by

Re: ChaCha20 vs. AES performance

2016-09-20 Thread Kent Overstreet
On Tue, Sep 20, 2016 at 10:23:20AM -0400, Theodore Ts'o wrote: > On Tue, Sep 20, 2016 at 03:15:19AM -0800, Kent Overstreet wrote: > > Not on the list or I would've replied directly, but on Haswell, ChaCha20 (in > > software) is over 2x as fast as AES (in hardw

bcachefs snapshots design doc - RFC

2021-03-17 Thread Kent Overstreet
Snapshots for bcaches are well under way, and I've written a design doc for them. I'd love to get feedback on anything I might have missed, especially from the btrfs people. The current version of this document lives at https://bcachefs.org/Snapshots/ and the in-progress code lives at https:/

[PATCH 10/10] Dynamic fault injection

2018-05-18 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- include/asm-generic/vmlinux.lds.h | 4 + include/linux/dynamic_fault.h | 117 + lib/Kconfig.debug | 5 + lib/Makefile | 2 + lib/dynamic_fault.c | 760 ++ 5 files

[PATCH 09/10] closures: closure_wait_event()

2018-05-18 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- 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/include/linux/closure.h @@ -375,4

[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 --- drivers/md/bcache/Kconfig | 10 +- drivers/md/bcache/Makefile | 6 +++--- drivers/md/bcache/bcache.h | 2 +- drivers/md

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

2018-05-18 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- 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/bcache/closure.h +++ b/drivers/md/bcache

[PATCH 06/10] Generic radix trees

2018-05-18 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- include/linux/generic-radix-tree.h | 131 ++ lib/Makefile | 3 +- lib/generic-radix-tree.c | 167 + 3 files changed, 300 insertions(+), 1 deletion(-) create mode 100644 include

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

2018-05-18 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- 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_lock.c @@ -202,6 +202,7 @@ bool

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

2018-05-18 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- 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 @@ -2460,20 +2460,19 @@ int

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

2018-05-18 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- 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(struct address_space *mapping, pgoff_t

[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 --- include/linux/lglock.h | 97 + kernel/locking/Makefile | 1 + kernel/locking/lglock.c | 105 3 files changed, 203

[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 --- fs/inode.c| 1 + include/linux/fs.h| 23

[PATCH 00/10] RFC: assorted bcachefs patches

2018-05-18 Thread Kent Overstreet
an see in debugfs every place you're allocating memory and fail all of them or just 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

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

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 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 61782bf71eef83919af100a9747d8d86df

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 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: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 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 > > Completely lacks any explanation or argument why it would be useful. It's in the cover letter..

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 simple

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 wha

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 inclusi

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 wa

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 > wrote: > > > > Signed-off-by: Kent Overstreet > > I agree with Christoph that even if there was some explanation in the cover > letter, there should be

[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 Overstree

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

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- 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 @@ struct blkdev_dio { struct bio

[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 --- block/bio.c | 61 ++--- include/linux/bio.h | 6 ++--- 2 files changed, 15 insertions(+), 52 deletions(-) diff --git a/block/bio.c b/block/bio.c index 0a4df92cd6

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

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- 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 +++ b/fs/btrfs/extent_io.c @@ -26,7

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

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- 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 100644 --- a/fs/xfs/xfs_aops.c +++ b

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

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- 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/target/target_core_iblock.c index 44cacd001a

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

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- 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/md/md.h | 4 +-- drivers/md

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

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- 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-crypt.c | 60

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

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- 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/block/drbd/drbd_req.c | 4 +- drivers

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

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- 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 index d8aff7f325..69875f5580 100644 --- a

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

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- 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/bcache/request.c | 18

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

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- 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/lightnvm/pblk-write.c| 8 ++-- drivers

[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 --- 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/bio.h| 5 + include/linux

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 wha

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

2018-05-20 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- 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 | 61 +-- drivers/md/md.h

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 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(). >> >> Only lightl

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 9:04 AM, Mike Snitzer wrote: > > >>

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 bra

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

2018-05-21 Thread Kent Overstreet
r to it. This blocks 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 ---

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 no

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

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: [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 relocate

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,

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; > &g

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 f

[PATCH] btrfs: Kill some bi_idx references

2012-09-11 Thread Kent Overstreet
put(), 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 CC: Chris Mason CC: Stefan Behrens

[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 Cc: Jens Axboe Cc: Joern Engel Cc: Prasad Joshi --- block/blk-flush.c | 19 +-- fs/logfs/dev_bdev.c | 8 +--- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/block/blk-flush.c b

[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 Over

[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 --- 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 --- drivers/md/bcache/bcache.h| 18 drivers/md/bcache/io.c| 100 +- drivers/md/bcache/journal.c | 4 +- drivers/md/bcache/request.c | 16 +++ drivers

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

2013-11-04 Thread Kent Overstreet
eally shouldn't matter. Signed-off-by: Kent Overstreet Cc: Jens Axboe --- 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..368c36a 100644 --- a/block

[PATCH 5/9] block: Gut bio_add_page(), kill bio_add_pc_page()

2013-11-04 Thread Kent Overstreet
Since generic_make_request() can now handle arbitrary size bios, all we have to do is make sure the bvec array doesn't overflow. Signed-off-by: Kent Overstreet --- drivers/scsi/osd/osd_initiator.c | 5 +- drivers/target/target_core_pscsi.c | 5 +- fs/bio.c

[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

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

2013-11-04 Thread Kent Overstreet
take 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 Cc: Jens Axboe Cc: Jiri Kosina Cc: Asai Thambi S P --- block/blk-cor

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

2013-11-04 Thread Kent Overstreet
s 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

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); > > > > +

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 > > bi

[PATCH] block: submit_bio_wait() conversions

2013-11-23 Thread Kent Overstreet
It was being open coded in a few places. Signed-off-by: Kent Overstreet Cc: Jens Axboe Cc: Joern Engel Cc: Prasad Joshi Cc: Neil Brown Cc: Chris Mason --- block/blk-flush.c | 19 +-- drivers/md/md.c| 12 +--- fs/btrfs/check-integrity.c | 32

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

2014-01-06 Thread Kent Overstreet
remaining is accounted for correctly. > > Reported-by: fengguang...@intel.com > Cc: Kent Overstreet > CC: Jens Axboe > Signed-off-by: Muthukumar Ratty > > > fs/btrfs/volumes.c |6 +- > 1 files changed, 5 insertions(+), 1 deletions(-) > > diff --g

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: > > > > [

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

2014-01-06 Thread Kent Overstreet
g when we restore the orig bio as well. > > Reported-by: fengguang...@intel.com > CC: Kent Overstreet > CC: Jens Axboe > CC: Chris Mason Signed-off-by: Muthukumar Ratty > > fs/btrfs/volumes.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletion

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

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 wrote: > > > On Wed, 2014-01-08 at 12:40 -0800, Muthu Kumar wrote: > > >> On Wed, Jan 8, 2014 at 12:16 PM, Chris Mason wrote: > > >

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 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,

[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 Cc: Alexander Viro Cc: Jens Axboe Cc: Chris Mason Cc: linux-btrfs@vger.kernel.org Cc: Steve French Cc: linux-c...@vger.kernel.org Cc: Miklos Szeredi Cc: fuse-de...@lists.sourceforge.net Cc: Sage

[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 Cc: Chris Mason Cc: linux-btrfs@vger.kernel.org --- fs/btrfs/extent_io.c | 12 --- fs/btrfs/file-item.c | 59

[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 Cc: Chris Mason Cc: linux-btrfs@vger.kernel.org --- fs/btrfs/volumes.c | 73 -- 1 file changed, 73 deletions(-) diff --git a/fs/