mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fixups for immutable biovecs
@ 2013-12-03 21:24 Kent Overstreet
  2013-12-03 21:24 ` [PATCH 1/2] block: Silence spurious compiler warnings Kent Overstreet
  2013-12-03 21:24 ` [PATCH 2/2] block: fixup for generic bio chaining Kent Overstreet
  0 siblings, 2 replies; 3+ messages in thread
From: Kent Overstreet @ 2013-12-03 21:24 UTC (permalink / raw)
  To: axboe; +Cc: linux-kernel

Jens - for the "silence spurious compiler warnings", if you want to drop the
previous version of that patch and replace with this one, it appears
uninitialized_var() doesn't work on structs. And I somehow lost the btrfs
fixes Chris Mason did for bio chaining and had to redo them so hopefully he
can glance at them, but it does pass xfstests.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] block: Silence spurious compiler warnings
  2013-12-03 21:24 [PATCH] fixups for immutable biovecs Kent Overstreet
@ 2013-12-03 21:24 ` Kent Overstreet
  2013-12-03 21:24 ` [PATCH 2/2] block: fixup for generic bio chaining Kent Overstreet
  1 sibling, 0 replies; 3+ messages in thread
From: Kent Overstreet @ 2013-12-03 21:24 UTC (permalink / raw)
  To: axboe; +Cc: linux-kernel, Kent Overstreet

The uninitialized_var() macro appears to not work on structs...

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
---
 block/blk-merge.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/blk-merge.c b/block/blk-merge.c
index 05c17be..8f8adaa 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -86,7 +86,7 @@ EXPORT_SYMBOL(blk_recount_segments);
 static int blk_phys_contig_segment(struct request_queue *q, struct bio *bio,
 				   struct bio *nxt)
 {
-	struct bio_vec end_bv, nxt_bv;
+	struct bio_vec end_bv = { NULL }, nxt_bv;
 	struct bvec_iter iter;
 
 	if (!blk_queue_cluster(q))
@@ -168,7 +168,7 @@ new_segment:
 int blk_rq_map_sg(struct request_queue *q, struct request *rq,
 		  struct scatterlist *sglist)
 {
-	struct bio_vec bvec, bvprv;
+	struct bio_vec bvec, bvprv = { NULL };
 	struct req_iterator iter;
 	struct scatterlist *sg;
 	int nsegs, cluster;
@@ -230,7 +230,7 @@ EXPORT_SYMBOL(blk_rq_map_sg);
 int blk_bio_map_sg(struct request_queue *q, struct bio *bio,
 		   struct scatterlist *sglist)
 {
-	struct bio_vec bvec, bvprv;
+	struct bio_vec bvec, bvprv = { NULL };
 	struct scatterlist *sg;
 	int nsegs, cluster;
 	struct bvec_iter iter;
-- 
1.8.4.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] block: fixup for generic bio chaining
  2013-12-03 21:24 [PATCH] fixups for immutable biovecs Kent Overstreet
  2013-12-03 21:24 ` [PATCH 1/2] block: Silence spurious compiler warnings Kent Overstreet
@ 2013-12-03 21:24 ` Kent Overstreet
  1 sibling, 0 replies; 3+ messages in thread
From: Kent Overstreet @ 2013-12-03 21:24 UTC (permalink / raw)
  To: axboe; +Cc: linux-kernel, Kent Overstreet, Chris Mason

btrfs bits got lost in the rebase

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Cc: Chris Mason <clm@fb.com>
---
 fs/btrfs/disk-io.c | 2 +-
 fs/btrfs/volumes.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 5a10c61..e71039e 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1692,7 +1692,7 @@ static void end_workqueue_fn(struct btrfs_work *work)
 	bio->bi_private = end_io_wq->private;
 	bio->bi_end_io = end_io_wq->end_io;
 	kfree(end_io_wq);
-	bio_endio(bio, error);
+	bio_endio_nodec(bio, error);
 }
 
 static int cleaner_kthread(void *arg)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index f2130de..37972d5 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -5297,6 +5297,8 @@ static void btrfs_end_bio(struct bio *bio, int err)
 		if (!is_orig_bio) {
 			bio_put(bio);
 			bio = bbio->orig_bio;
+		} else {
+			atomic_inc(&bio->bi_remaining);
 		}
 		bio->bi_private = bbio->private;
 		bio->bi_end_io = bbio->end_io;
-- 
1.8.4.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-03 21:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-03 21:24 [PATCH] fixups for immutable biovecs Kent Overstreet
2013-12-03 21:24 ` [PATCH 1/2] block: Silence spurious compiler warnings Kent Overstreet
2013-12-03 21:24 ` [PATCH 2/2] block: fixup for generic bio chaining Kent Overstreet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®