* two small cleanups
@ 2017-06-19 7:24 Christoph Hellwig
2017-06-19 7:24 ` [PATCH 1/2] block: remove the unused bio_to_phys macro Christoph Hellwig
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Christoph Hellwig @ 2017-06-19 7:24 UTC (permalink / raw)
To: axboe; +Cc: martin.petersen, linux-block
Stop relying on bio_page and a page_address in the Write Same code
and remove an unused macro.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] block: remove the unused bio_to_phys macro
2017-06-19 7:24 two small cleanups Christoph Hellwig
@ 2017-06-19 7:24 ` Christoph Hellwig
2017-06-21 1:19 ` Martin K. Petersen
2017-06-19 7:24 ` [PATCH 2/2] block: stop using bio_data() in blk_write_same_mergeable Christoph Hellwig
2017-06-21 1:22 ` two small cleanups Jens Axboe
2 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2017-06-19 7:24 UTC (permalink / raw)
To: axboe; +Cc: martin.petersen, linux-block
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
include/linux/bio.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 40d054185277..83f9edb39d3f 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -118,7 +118,6 @@ static inline void *bio_data(struct bio *bio)
/*
* will die
*/
-#define bio_to_phys(bio) (page_to_phys(bio_page((bio))) + (unsigned long) bio_offset((bio)))
#define bvec_to_phys(bv) (page_to_phys((bv)->bv_page) + (unsigned long) (bv)->bv_offset)
/*
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] block: stop using bio_data() in blk_write_same_mergeable
2017-06-19 7:24 two small cleanups Christoph Hellwig
2017-06-19 7:24 ` [PATCH 1/2] block: remove the unused bio_to_phys macro Christoph Hellwig
@ 2017-06-19 7:24 ` Christoph Hellwig
2017-06-21 1:20 ` Martin K. Petersen
2017-06-21 1:22 ` two small cleanups Jens Axboe
2 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2017-06-19 7:24 UTC (permalink / raw)
To: axboe; +Cc: martin.petersen, linux-block
While the Write Same page currently always is in low-level it is just
as easy and safer to just compare the page and offset directly.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
include/linux/blkdev.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index db2b7a7450bd..a61907438139 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -815,7 +815,8 @@ static inline bool rq_mergeable(struct request *rq)
static inline bool blk_write_same_mergeable(struct bio *a, struct bio *b)
{
- if (bio_data(a) == bio_data(b))
+ if (bio_page(a) == bio_page(b) &&
+ bio_offset(a) == bio_offset(b))
return true;
return false;
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] block: remove the unused bio_to_phys macro
2017-06-19 7:24 ` [PATCH 1/2] block: remove the unused bio_to_phys macro Christoph Hellwig
@ 2017-06-21 1:19 ` Martin K. Petersen
0 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2017-06-21 1:19 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: axboe, martin.petersen, linux-block
Christoph,
> Signed-off-by: Christoph Hellwig <hch@lst.de>
That's fine.
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] block: stop using bio_data() in blk_write_same_mergeable
2017-06-19 7:24 ` [PATCH 2/2] block: stop using bio_data() in blk_write_same_mergeable Christoph Hellwig
@ 2017-06-21 1:20 ` Martin K. Petersen
0 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2017-06-21 1:20 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: axboe, martin.petersen, linux-block
Christoph,
> While the Write Same page currently always is in low-level it is just
> as easy and safer to just compare the page and offset directly.
Also fine.
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: two small cleanups
2017-06-19 7:24 two small cleanups Christoph Hellwig
2017-06-19 7:24 ` [PATCH 1/2] block: remove the unused bio_to_phys macro Christoph Hellwig
2017-06-19 7:24 ` [PATCH 2/2] block: stop using bio_data() in blk_write_same_mergeable Christoph Hellwig
@ 2017-06-21 1:22 ` Jens Axboe
2 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2017-06-21 1:22 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: martin.petersen, linux-block
On 06/19/2017 01:24 AM, Christoph Hellwig wrote:
> Stop relying on bio_page and a page_address in the Write Same code
> and remove an unused macro.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-06-21 1:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-19 7:24 two small cleanups Christoph Hellwig
2017-06-19 7:24 ` [PATCH 1/2] block: remove the unused bio_to_phys macro Christoph Hellwig
2017-06-21 1:19 ` Martin K. Petersen
2017-06-19 7:24 ` [PATCH 2/2] block: stop using bio_data() in blk_write_same_mergeable Christoph Hellwig
2017-06-21 1:20 ` Martin K. Petersen
2017-06-21 1:22 ` two small cleanups Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.