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


Groups > linux.kernel > #1253363 > unrolled thread

[PATCH block/for-linus] blkcg: fix incorrect read/write sync/async stat accounting

Started byTejun Heo <tj@kernel.org>
First post2015-10-22 02:30 +0200
Last post2015-10-22 16:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH block/for-linus] blkcg: fix incorrect read/write sync/async  stat accounting Tejun Heo <tj@kernel.org> - 2015-10-22 02:30 +0200
    Re: [PATCH block/for-linus] blkcg: fix incorrect read/write sync/async stat accounting Jeff Moyer <jmoyer@redhat.com> - 2015-10-22 16:30 +0200

#1253363 — [PATCH block/for-linus] blkcg: fix incorrect read/write sync/async stat accounting

FromTejun Heo <tj@kernel.org>
Date2015-10-22 02:30 +0200
Subject[PATCH block/for-linus] blkcg: fix incorrect read/write sync/async stat accounting
Message-ID<qmbVw-2oP-13@gated-at.bofh.it>
While unifying how blkcg stats are collected, 77ea733884eb ("blkcg:
move io_service_bytes and io_serviced stats into blkcg_gq")
incorrectly used bio->flags instead of bio->rw to tell the IO type.
This made IOs to be accounted as the wrong type.  Fix it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes: 77ea733884eb ("blkcg: move io_service_bytes and io_serviced stats into blkcg_gq")
---
 include/linux/blk-cgroup.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/include/linux/blk-cgroup.h
+++ b/include/linux/blk-cgroup.h
@@ -713,9 +713,9 @@ static inline bool blkcg_bio_issue_check
 
 	if (!throtl) {
 		blkg = blkg ?: q->root_blkg;
-		blkg_rwstat_add(&blkg->stat_bytes, bio->bi_flags,
+		blkg_rwstat_add(&blkg->stat_bytes, bio->bi_rw,
 				bio->bi_iter.bi_size);
-		blkg_rwstat_add(&blkg->stat_ios, bio->bi_flags, 1);
+		blkg_rwstat_add(&blkg->stat_ios, bio->bi_rw, 1);
 	}
 
 	rcu_read_unlock();
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1253864 — Re: [PATCH block/for-linus] blkcg: fix incorrect read/write sync/async stat accounting

FromJeff Moyer <jmoyer@redhat.com>
Date2015-10-22 16:30 +0200
SubjectRe: [PATCH block/for-linus] blkcg: fix incorrect read/write sync/async stat accounting
Message-ID<qmp2q-56v-17@gated-at.bofh.it>
In reply to#1253363
Tejun Heo <tj@kernel.org> writes:

> While unifying how blkcg stats are collected, 77ea733884eb ("blkcg:
> move io_service_bytes and io_serviced stats into blkcg_gq")
> incorrectly used bio->flags instead of bio->rw to tell the IO type.
> This made IOs to be accounted as the wrong type.  Fix it.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Fixes: 77ea733884eb ("blkcg: move io_service_bytes and io_serviced stats into blkcg_gq")

Reviewed-by: Jeff Moyer <jmoyer@redhat.com>

> ---
>  include/linux/blk-cgroup.h |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- a/include/linux/blk-cgroup.h
> +++ b/include/linux/blk-cgroup.h
> @@ -713,9 +713,9 @@ static inline bool blkcg_bio_issue_check
>  
>  	if (!throtl) {
>  		blkg = blkg ?: q->root_blkg;
> -		blkg_rwstat_add(&blkg->stat_bytes, bio->bi_flags,
> +		blkg_rwstat_add(&blkg->stat_bytes, bio->bi_rw,
>  				bio->bi_iter.bi_size);
> -		blkg_rwstat_add(&blkg->stat_ios, bio->bi_flags, 1);
> +		blkg_rwstat_add(&blkg->stat_ios, bio->bi_rw, 1);
>  	}
>  
>  	rcu_read_unlock();
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web