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


Groups > linux.kernel > #1452748 > unrolled thread

Fixup direct bi_rw modifiers

Started byShaun Tancheff <shaun@tancheff.com>
First post2016-07-30 23:50 +0200
Last post2016-08-02 20:10 +0200
Articles 6 — 3 participants

Back to article view | Back to linux.kernel


Contents

  Fixup direct bi_rw modifiers Shaun Tancheff <shaun@tancheff.com> - 2016-07-30 23:50 +0200
    Re: Fixup direct bi_rw modifiers Christoph Hellwig <hch@infradead.org> - 2016-08-01 13:50 +0200
      Re: Fixup direct bi_rw modifiers Jens Axboe <axboe@kernel.dk> - 2016-08-01 17:30 +0200
        Re: Fixup direct bi_rw modifiers Jens Axboe <axboe@kernel.dk> - 2016-08-01 22:00 +0200
          Re: Fixup direct bi_rw modifiers Christoph Hellwig <hch@infradead.org> - 2016-08-02 14:40 +0200
            Re: Fixup direct bi_rw modifiers Jens Axboe <axboe@kernel.dk> - 2016-08-02 20:10 +0200

#1452748 — Fixup direct bi_rw modifiers

FromShaun Tancheff <shaun@tancheff.com>
Date2016-07-30 23:50 +0200
SubjectFixup direct bi_rw modifiers
Message-ID<s0KiR-7YU-1@gated-at.bofh.it>
bi_rw should be using bio_set_op_attrs to set bi_rw.

Signed-off-by: Shaun Tancheff <shaun@tancheff.com>

Cc: Chris Mason <clm@fb.com>
Cc: Josef Bacik <jbacik@fb.com>
Cc: David Sterba <dsterba@suse.com>
Cc: Mike Christie <mchristi@redhat.com>
---
Patch is against linux-next tag next-20160729

NOTE: In 4.7 this was not including the 'WRITE' macro so may have
      it may not have been operating as intended.
---
 fs/btrfs/extent_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index f67d6a1..720e6ef 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2050,7 +2050,7 @@ int repair_io_failure(struct inode *inode, u64 start, u64 length, u64 logical,
 		return -EIO;
 	}
 	bio->bi_bdev = dev->bdev;
-	bio->bi_rw = WRITE_SYNC;
+	bio_set_op_attrs(bio, REQ_OP_WRITE, WRITE_SYNC);
 	bio_add_page(bio, page, length, pg_offset);
 
 	if (btrfsic_submit_bio_wait(bio)) {
-- 
2.8.1

[toc] | [next] | [standalone]


#1453155

FromChristoph Hellwig <hch@infradead.org>
Date2016-08-01 13:50 +0200
Message-ID<s1jTk-5Ms-9@gated-at.bofh.it>
In reply to#1452748
On Sat, Jul 30, 2016 at 04:45:48PM -0500, Shaun Tancheff wrote:
> bi_rw should be using bio_set_op_attrs to set bi_rw.

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

Jens,

what do you think about renaming bi_rw?  There aren't too many users
left, and any old code that would keep using it is alsmost guranteed
to be broken, so sending a post-rc1 patch to rename it might make
everyone else life easier.  Especially as it's also grossly misnamed
now.

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


#1453274

FromJens Axboe <axboe@kernel.dk>
Date2016-08-01 17:30 +0200
Message-ID<s1nke-834-13@gated-at.bofh.it>
In reply to#1453155
On 08/01/2016 05:47 AM, Christoph Hellwig wrote:
> On Sat, Jul 30, 2016 at 04:45:48PM -0500, Shaun Tancheff wrote:
>> bi_rw should be using bio_set_op_attrs to set bi_rw.
>
> Looks fine,
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Added, thanks Shaun.

> Jens,
>
> what do you think about renaming bi_rw?  There aren't too many users
> left, and any old code that would keep using it is alsmost guranteed
> to be broken, so sending a post-rc1 patch to rename it might make
> everyone else life easier.  Especially as it's also grossly misnamed
> now.

I was planning on doing that, after -rc1. Much better to get build
breakage, than potentially much worse breakage.

-- 
Jens Axboe

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


#1453431

FromJens Axboe <axboe@kernel.dk>
Date2016-08-01 22:00 +0200
Message-ID<s1rxv-2ia-11@gated-at.bofh.it>
In reply to#1453274
On 08/01/2016 09:17 AM, Jens Axboe wrote:
> On 08/01/2016 05:47 AM, Christoph Hellwig wrote:
>> On Sat, Jul 30, 2016 at 04:45:48PM -0500, Shaun Tancheff wrote:
>>> bi_rw should be using bio_set_op_attrs to set bi_rw.
>>
>> Looks fine,
>>
>> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> Added, thanks Shaun.
>
>> Jens,
>>
>> what do you think about renaming bi_rw?  There aren't too many users
>> left, and any old code that would keep using it is alsmost guranteed
>> to be broken, so sending a post-rc1 patch to rename it might make
>> everyone else life easier.  Especially as it's also grossly misnamed
>> now.
>
> I was planning on doing that, after -rc1. Much better to get build
> breakage, than potentially much worse breakage.

Set of three patches, where the target one is an actual bug fix...
Temporary branch, I'll rebase it once -rc1 is out, if more
changes/fixups need to be made in the next week until that happens.

http://git.kernel.dk/cgit/linux-block/log/?h=for-4.8/bi_rwf

-- 
Jens Axboe

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


#1454129

FromChristoph Hellwig <hch@infradead.org>
Date2016-08-02 14:40 +0200
Message-ID<s1H9h-4r7-59@gated-at.bofh.it>
In reply to#1453431
On Mon, Aug 01, 2016 at 01:55:36PM -0600, Jens Axboe wrote:
> 
> Set of three patches, where the target one is an actual bug fix...
> Temporary branch, I'll rebase it once -rc1 is out, if more
> changes/fixups need to be made in the next week until that happens.
> 
> http://git.kernel.dk/cgit/linux-block/log/?h=for-4.8/bi_rwf

Thanks.  Any chance to have a slightly better name for the field?
E.g. bi_opf or bi_op_flags if we want to be a bit more verbose.

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


#1455270

FromJens Axboe <axboe@kernel.dk>
Date2016-08-02 20:10 +0200
Message-ID<s1MiF-84F-137@gated-at.bofh.it>
In reply to#1454129
On 08/02/2016 05:32 AM, Christoph Hellwig wrote:
> On Mon, Aug 01, 2016 at 01:55:36PM -0600, Jens Axboe wrote:
>>
>> Set of three patches, where the target one is an actual bug fix...
>> Temporary branch, I'll rebase it once -rc1 is out, if more
>> changes/fixups need to be made in the next week until that happens.
>>
>> http://git.kernel.dk/cgit/linux-block/log/?h=for-4.8/bi_rwf
>
> Thanks.  Any chance to have a slightly better name for the field?
> E.g. bi_opf or bi_op_flags if we want to be a bit more verbose.

bi_opf is fine with me as well, don't care too strongly about bi_rwf or 
bi_opf. I don't like the longer variants.


-- 
Jens Axboe

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web