[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130520140449.5da8b61ceaaf06618914e76f@canb.auug.org.au>
Date: Mon, 20 May 2013 14:04:49 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
Chris Mason <chris.mason@...ionio.com>,
Kent Overstreet <koverstreet@...gle.com>
Subject: linux-next: manual merge of the akpm tree with Linus' tree
Hi Andrew,
Today's linux-next merge of the akpm tree got conflicts in
fs/btrfs/inode.c and fs/btrfs/volumes.c between commit 9be3395bcd4a
("Btrfs: use a btrfs bioset instead of abusing bio internals") from
Linus' tree and commit "block: prep work for batch completion" from the
akpm tree.
I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).
I also noticed that a single conversion of bio_endio to bio_endio_batch
is done in the akpm patch but bio_endio_batch is not introduced until a
later patch ... :-(
--
Cheers,
Stephen Rothwell sfr@...b.auug.org.au
diff --cc fs/btrfs/inode.c
index af978f7,551c8bd..0000000
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@@ -6932,14 -6928,11 +6932,15 @@@ struct btrfs_dio_private
/* IO errors */
int errors;
+ /* orig_bio is our btrfs_io_bio */
struct bio *orig_bio;
+
+ /* dio_bio came from fs/direct-io.c */
+ struct bio *dio_bio;
};
- static void btrfs_endio_direct_read(struct bio *bio, int err)
+ static void btrfs_endio_direct_read(struct bio *bio, int err,
+ struct batch_complete *batch)
{
struct btrfs_dio_private *dip = bio->bi_private;
struct bio_vec *bvec_end = bio->bi_io_vec + bio->bi_vcnt - 1;
@@@ -6992,12 -6984,12 +6993,13 @@@ failed
/* If we had a csum failure make sure to clear the uptodate flag */
if (err)
- clear_bit(BIO_UPTODATE, &bio->bi_flags);
- dio_end_io(bio, err, batch);
+ clear_bit(BIO_UPTODATE, &dio_bio->bi_flags);
- dio_end_io(dio_bio, err);
++ dio_end_io(dio_bio, err, batch);
+ bio_put(bio);
}
- static void btrfs_endio_direct_write(struct bio *bio, int err)
+ static void btrfs_endio_direct_write(struct bio *bio, int err,
+ struct batch_complete *batch)
{
struct btrfs_dio_private *dip = bio->bi_private;
struct inode *inode = dip->inode;
@@@ -7039,9 -7030,8 +7041,9 @@@ out_done
/* If we had an error make sure to clear the uptodate flag */
if (err)
- clear_bit(BIO_UPTODATE, &bio->bi_flags);
- dio_end_io(bio, err, batch);
+ clear_bit(BIO_UPTODATE, &dio_bio->bi_flags);
- dio_end_io(dio_bio, err);
++ dio_end_io(dio_bio, err, batch);
+ bio_put(bio);
}
static int __btrfs_submit_bio_start_direct_io(struct inode *inode, int rw,
diff --cc fs/btrfs/volumes.c
index 8bffb91,7299b55..0000000
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@@ -5018,9 -5019,35 +5018,10 @@@ int btrfs_rmap_block(struct btrfs_mappi
return 0;
}
- static void btrfs_end_bio(struct bio *bio, int err)
-static void *merge_stripe_index_into_bio_private(void *bi_private,
- unsigned int stripe_index)
-{
- /*
- * with single, dup, RAID0, RAID1 and RAID10, stripe_index is
- * at most 1.
- * The alternative solution (instead of stealing bits from the
- * pointer) would be to allocate an intermediate structure
- * that contains the old private pointer plus the stripe_index.
- */
- BUG_ON((((uintptr_t)bi_private) & 3) != 0);
- BUG_ON(stripe_index > 3);
- return (void *)(((uintptr_t)bi_private) | stripe_index);
-}
-
-static struct btrfs_bio *extract_bbio_from_bio_private(void *bi_private)
-{
- return (struct btrfs_bio *)(((uintptr_t)bi_private) & ~((uintptr_t)3));
-}
-
-static unsigned int extract_stripe_index_from_bio_private(void *bi_private)
-{
- return (unsigned int)((uintptr_t)bi_private) & 3;
-}
-
+ static void btrfs_end_bio(struct bio *bio, int err,
+ struct batch_complete *batch)
{
- struct btrfs_bio *bbio = extract_bbio_from_bio_private(bio->bi_private);
+ struct btrfs_bio *bbio = bio->bi_private;
int is_orig_bio = 0;
if (err) {
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists