All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Btrfs: cleanup submit_one_bio
@ 2017-04-03 20:45 Liu Bo
  2017-04-04 12:27 ` kbuild test robot
  2017-04-04 17:43 ` Liu Bo
  0 siblings, 2 replies; 3+ messages in thread
From: Liu Bo @ 2017-04-03 20:45 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Sterba

@bio_offset is passed into submit_bio_hook and is used at
btrfs_wq_submit_bio(), but only dio code makes use of @bio_offset, so
remove other dead code.

Cc: David Sterba <dsterba@suse.cz>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
 fs/btrfs/extent_io.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 7b5139d..79f38e6a 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2746,19 +2746,14 @@ static int __must_check submit_one_bio(struct bio *bio, int mirror_num,
 				       unsigned long bio_flags)
 {
 	int ret = 0;
-	struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1;
-	struct page *page = bvec->bv_page;
 	struct extent_io_tree *tree = bio->bi_private;
-	u64 start;
-
-	start = page_offset(page) + bvec->bv_offset;
 
 	bio->bi_private = NULL;
 	bio_get(bio);
 
 	if (tree->ops)
 		ret = tree->ops->submit_bio_hook(page->mapping->host, bio,
-					   mirror_num, bio_flags, start);
+					   mirror_num, bio_flags, 0);
 	else
 		btrfsic_submit_bio(bio);
 
-- 
2.5.5


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

* Re: [PATCH] Btrfs: cleanup submit_one_bio
  2017-04-03 20:45 [PATCH] Btrfs: cleanup submit_one_bio Liu Bo
@ 2017-04-04 12:27 ` kbuild test robot
  2017-04-04 17:43 ` Liu Bo
  1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2017-04-04 12:27 UTC (permalink / raw)
  To: Liu Bo; +Cc: kbuild-all, linux-btrfs, David Sterba

[-- Attachment #1: Type: text/plain, Size: 2055 bytes --]

Hi Liu,

[auto build test ERROR on next-20170330]
[also build test ERROR on v4.11-rc5]
[cannot apply to btrfs/next v4.9-rc8 v4.9-rc7 v4.9-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Liu-Bo/Btrfs-cleanup-submit_one_bio/20170404-194545
config: x86_64-randconfig-x012-201714 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   fs/btrfs/extent_io.c: In function 'submit_one_bio':
>> fs/btrfs/extent_io.c:2739:36: error: 'page' undeclared (first use in this function)
      ret = tree->ops->submit_bio_hook(page->mapping->host, bio,
                                       ^~~~
   fs/btrfs/extent_io.c:2739:36: note: each undeclared identifier is reported only once for each function it appears in

vim +/page +2739 fs/btrfs/extent_io.c

70dec807 Chris Mason     2008-01-29  2733  	struct extent_io_tree *tree = bio->bi_private;
70dec807 Chris Mason     2008-01-29  2734  
902b22f3 David Woodhouse 2008-08-20  2735  	bio->bi_private = NULL;
d1310b2e Chris Mason     2008-01-24  2736  	bio_get(bio);
d1310b2e Chris Mason     2008-01-24  2737  
20c9801d David Sterba    2017-02-17  2738  	if (tree->ops)
81a75f67 Mike Christie   2016-06-05 @2739  		ret = tree->ops->submit_bio_hook(page->mapping->host, bio,
178218fd Liu Bo          2017-04-03  2740  					   mirror_num, bio_flags, 0);
0b86a832 Chris Mason     2008-03-24  2741  	else
4e49ea4a Mike Christie   2016-06-05  2742  		btrfsic_submit_bio(bio);

:::::: The code at line 2739 was first introduced by commit
:::::: 81a75f6781deb7a3b5274b4c683e327e5cb5b883 btrfs: use bio fields for op and flags

:::::: TO: Mike Christie <mchristi@redhat.com>
:::::: CC: Jens Axboe <axboe@fb.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26235 bytes --]

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

* Re: [PATCH] Btrfs: cleanup submit_one_bio
  2017-04-03 20:45 [PATCH] Btrfs: cleanup submit_one_bio Liu Bo
  2017-04-04 12:27 ` kbuild test robot
@ 2017-04-04 17:43 ` Liu Bo
  1 sibling, 0 replies; 3+ messages in thread
From: Liu Bo @ 2017-04-04 17:43 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Sterba

On Mon, Apr 03, 2017 at 01:45:47PM -0700, Liu Bo wrote:
> @bio_offset is passed into submit_bio_hook and is used at
> btrfs_wq_submit_bio(), but only dio code makes use of @bio_offset, so
> remove other dead code.
>

Please ignore this one.

Thanks,

-liubo
> Cc: David Sterba <dsterba@suse.cz>
> Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
> ---
>  fs/btrfs/extent_io.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
> index 7b5139d..79f38e6a 100644
> --- a/fs/btrfs/extent_io.c
> +++ b/fs/btrfs/extent_io.c
> @@ -2746,19 +2746,14 @@ static int __must_check submit_one_bio(struct bio *bio, int mirror_num,
>  				       unsigned long bio_flags)
>  {
>  	int ret = 0;
> -	struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1;
> -	struct page *page = bvec->bv_page;
>  	struct extent_io_tree *tree = bio->bi_private;
> -	u64 start;
> -
> -	start = page_offset(page) + bvec->bv_offset;
>  
>  	bio->bi_private = NULL;
>  	bio_get(bio);
>  
>  	if (tree->ops)
>  		ret = tree->ops->submit_bio_hook(page->mapping->host, bio,
> -					   mirror_num, bio_flags, start);
> +					   mirror_num, bio_flags, 0);
>  	else
>  		btrfsic_submit_bio(bio);
>  
> -- 
> 2.5.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2017-04-04 17:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-03 20:45 [PATCH] Btrfs: cleanup submit_one_bio Liu Bo
2017-04-04 12:27 ` kbuild test robot
2017-04-04 17:43 ` Liu Bo

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.