linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fixup direct bi_rw modifiers
@ 2016-07-30 21:45 Shaun Tancheff
  2016-08-01 11:47 ` Christoph Hellwig
  0 siblings, 1 reply; 6+ messages in thread
From: Shaun Tancheff @ 2016-07-30 21:45 UTC (permalink / raw)
  To: linux-block, linux-btrfs, linux-kernel
  Cc: Shaun Tancheff, Jens Axboe, Jens Axboe, Chris Mason, Josef Bacik,
	David Sterba, Mike Christie

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

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

* Re: Fixup direct bi_rw modifiers
  2016-07-30 21:45 Fixup direct bi_rw modifiers Shaun Tancheff
@ 2016-08-01 11:47 ` Christoph Hellwig
  2016-08-01 15:17   ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2016-08-01 11:47 UTC (permalink / raw)
  To: Shaun Tancheff
  Cc: linux-block, linux-btrfs, linux-kernel, Jens Axboe, Jens Axboe,
	Chris Mason, Josef Bacik, David Sterba, Mike Christie

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.

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

* Re: Fixup direct bi_rw modifiers
  2016-08-01 11:47 ` Christoph Hellwig
@ 2016-08-01 15:17   ` Jens Axboe
  2016-08-01 19:55     ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2016-08-01 15:17 UTC (permalink / raw)
  To: Christoph Hellwig, Shaun Tancheff
  Cc: linux-block, linux-btrfs, linux-kernel, Jens Axboe, Chris Mason,
	Josef Bacik, David Sterba, Mike Christie

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

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

* Re: Fixup direct bi_rw modifiers
  2016-08-01 15:17   ` Jens Axboe
@ 2016-08-01 19:55     ` Jens Axboe
  2016-08-02 12:32       ` Christoph Hellwig
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2016-08-01 19:55 UTC (permalink / raw)
  To: Christoph Hellwig, Shaun Tancheff
  Cc: linux-block, linux-btrfs, linux-kernel, Jens Axboe, Chris Mason,
	Josef Bacik, David Sterba, Mike Christie

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

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

* Re: Fixup direct bi_rw modifiers
  2016-08-01 19:55     ` Jens Axboe
@ 2016-08-02 12:32       ` Christoph Hellwig
  2016-08-02 18:09         ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2016-08-02 12:32 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Christoph Hellwig, Shaun Tancheff, linux-block, linux-btrfs,
	linux-kernel, Jens Axboe, Chris Mason, Josef Bacik, David Sterba,
	Mike Christie

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.

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

* Re: Fixup direct bi_rw modifiers
  2016-08-02 12:32       ` Christoph Hellwig
@ 2016-08-02 18:09         ` Jens Axboe
  0 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2016-08-02 18:09 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Shaun Tancheff, linux-block, linux-btrfs, linux-kernel,
	Jens Axboe, Chris Mason, Josef Bacik, David Sterba,
	Mike Christie

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

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

end of thread, other threads:[~2016-08-02 18:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-30 21:45 Fixup direct bi_rw modifiers Shaun Tancheff
2016-08-01 11:47 ` Christoph Hellwig
2016-08-01 15:17   ` Jens Axboe
2016-08-01 19:55     ` Jens Axboe
2016-08-02 12:32       ` Christoph Hellwig
2016-08-02 18:09         ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).