Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1524024 > unrolled thread

linux-next: manual merge of the block tree with the btrfs-kdave tree

Started byStephen Rothwell <sfr@canb.auug.org.au>
First post2016-11-17 03:10 +0100
Last post2016-11-18 18:50 +0100
Articles 4 — 4 participants

Back to article view | Back to linux.kernel


Contents

  linux-next: manual merge of the block tree with the btrfs-kdave  tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-11-17 03:10 +0100
    Re: linux-next: manual merge of the block tree with the btrfs-kdave  tree Jens Axboe <axboe@kernel.dk> - 2016-11-17 03:50 +0100
      Re: linux-next: manual merge of the block tree with the         btrfs-kdave tree Christoph Hellwig <hch@lst.de> - 2016-11-17 18:10 +0100
        Re: linux-next: manual merge of the block tree with the btrfs-kdave  tree David Sterba <dsterba@suse.cz> - 2016-11-18 18:50 +0100

#1524024 — linux-next: manual merge of the block tree with the btrfs-kdave tree

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2016-11-17 03:10 +0100
Subjectlinux-next: manual merge of the block tree with the btrfs-kdave tree
Message-ID<sEkjg-2JC-13@gated-at.bofh.it>
Hi Jens,

Today's linux-next merge of the block tree got conflicts in:

  fs/btrfs/extent_io.c
  fs/btrfs/inode.c

between commit:

  01a1400f8545 ("btrfs: only check bio size to see if a repair bio should have the failfast flag")

from the btrfs-kdave tree and commit:

  70fd76140a6c ("block,fs: use REQ_* flags directly")

from the block tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/btrfs/extent_io.c
index 5694d60adad9,1e67723c27a1..000000000000
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@@ -2403,10 -2403,8 +2403,8 @@@ static int bio_readpage_error(struct bi
  		return -EIO;
  	}
  
 -	if (failed_bio->bi_vcnt > 1)
 +	if (failed_bio->bi_iter.bi_size > BTRFS_I(inode)->root->sectorsize)
- 		read_mode = READ_SYNC | REQ_FAILFAST_DEV;
- 	else
- 		read_mode = READ_SYNC;
+ 		read_mode |= REQ_FAILFAST_DEV;
  
  	phy_offset >>= inode->i_sb->s_blocksize_bits;
  	bio = btrfs_create_repair_bio(inode, failed_bio, failrec, page,
diff --cc fs/btrfs/inode.c
index 7e8603c74f43,a4c879671b9d..000000000000
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@@ -7924,10 -7933,10 +7924,8 @@@ static int dio_read_error(struct inode 
  		return -EIO;
  	}
  
 -	if ((failed_bio->bi_vcnt > 1)
 -		|| (failed_bio->bi_io_vec->bv_len
 -			> BTRFS_I(inode)->root->sectorsize))
 +	if (failed_bio->bi_iter.bi_size > BTRFS_I(inode)->root->sectorsize)
- 		read_mode = READ_SYNC | REQ_FAILFAST_DEV;
- 	else
- 		read_mode = READ_SYNC;
+ 		read_mode |= REQ_FAILFAST_DEV;
  
  	isector = start - btrfs_io_bio(failed_bio)->logical;
  	isector >>= inode->i_sb->s_blocksize_bits;

[toc] | [next] | [standalone]


#1524039

FromJens Axboe <axboe@kernel.dk>
Date2016-11-17 03:50 +0100
Message-ID<sEkVX-30x-3@gated-at.bofh.it>
In reply to#1524024
On 11/16/2016 07:01 PM, Stephen Rothwell wrote:
> Hi Jens,
>
> Today's linux-next merge of the block tree got conflicts in:
>
>   fs/btrfs/extent_io.c
>   fs/btrfs/inode.c
>
> between commit:
>
>   01a1400f8545 ("btrfs: only check bio size to see if a repair bio should have the failfast flag")
>
> from the btrfs-kdave tree and commit:
>
>   70fd76140a6c ("block,fs: use REQ_* flags directly")
>
> from the block tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>

I don't have the full context here, but this:

diff --cc fs/btrfs/extent_io.c
index 5694d60adad9,1e67723c27a1..000000000000
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@@ -2403,10 -2403,8 +2403,8 @@@ static int bio_readpage_error(struct bi
   		return -EIO;
   	}

  -	if (failed_bio->bi_vcnt > 1)
  +	if (failed_bio->bi_iter.bi_size > BTRFS_I(inode)->root->sectorsize)
- 		read_mode = READ_SYNC | REQ_FAILFAST_DEV;
- 	else
- 		read_mode = READ_SYNC;
+ 		read_mode |= REQ_FAILFAST_DEV;

   	phy_offset >>= inode->i_sb->s_blocksize_bits;
   	bio = btrfs_create_repair_bio(inode, failed_bio, failrec, page,

doesn't look correct, if bio_readpage_error() is called from the 
->bi_end_io() handler. bi_size is generally zeroed at that time.

-- 
Jens Axboe

[toc] | [prev] | [next] | [standalone]


#1524482 — Re: linux-next: manual merge of the block tree with the btrfs-kdave tree

FromChristoph Hellwig <hch@lst.de>
Date2016-11-17 18:10 +0100
SubjectRe: linux-next: manual merge of the block tree with the btrfs-kdave tree
Message-ID<sEymd-3v8-29@gated-at.bofh.it>
In reply to#1524039
On Wed, Nov 16, 2016 at 07:49:29PM -0700, Jens Axboe wrote:
> doesn't look correct, if bio_readpage_error() is called from the 
> ->bi_end_io() handler. bi_size is generally zeroed at that time.

At least some of these bios are magic btrfs-internal ones that never
reach the block layer.  But I don't think all are, and both the new
code and one of the old cases are broken.  David, can you drop
this one patch for now, and I'll restart the discussion on the
failfast behavior on the btrfs list?

[toc] | [prev] | [next] | [standalone]


#1525586

FromDavid Sterba <dsterba@suse.cz>
Date2016-11-18 18:50 +0100
Message-ID<sEVst-1L1-3@gated-at.bofh.it>
In reply to#1524482
On Thu, Nov 17, 2016 at 02:23:01PM +0100, Christoph Hellwig wrote:
> On Wed, Nov 16, 2016 at 07:49:29PM -0700, Jens Axboe wrote:
> > doesn't look correct, if bio_readpage_error() is called from the 
> > ->bi_end_io() handler. bi_size is generally zeroed at that time.
> 
> At least some of these bios are magic btrfs-internal ones that never
> reach the block layer.  But I don't think all are, and both the new
> code and one of the old cases are broken.  David, can you drop
> this one patch for now, and I'll restart the discussion on the
> failfast behavior on the btrfs list?

Ok, updated in today's for-next snapshot.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web