Commit 34e51a5e authored by Tejun Heo's avatar Tejun Heo Committed by Jens Axboe
Browse files

blkcg, writeback: Rename wbc_account_io() to wbc_account_cgroup_owner()



wbc_account_io() does a very specific job - try to see which cgroup is
actually dirtying an inode and transfer its ownership to the majority
dirtier if needed.  The name is too generic and confusing.  Let's
rename it to something more specific.

Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 9b0eb69b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2114,7 +2114,7 @@ following two functions.
	a queue (device) has been associated with the bio and
	before submission.

  wbc_account_io(@wbc, @page, @bytes)
  wbc_account_cgroup_owner(@wbc, @page, @bytes)
	Should be called for each data segment being written out.
	While this function doesn't care exactly when it's called
	during the writeback session, it's the easiest and most
+2 −2
Original line number Diff line number Diff line
@@ -2911,7 +2911,7 @@ static int submit_extent_page(unsigned int opf, struct extent_io_tree *tree,
			bio = NULL;
		} else {
			if (wbc)
				wbc_account_io(wbc, page, page_size);
				wbc_account_cgroup_owner(wbc, page, page_size);
			return 0;
		}
	}
@@ -2924,7 +2924,7 @@ static int submit_extent_page(unsigned int opf, struct extent_io_tree *tree,
	bio->bi_opf = opf;
	if (wbc) {
		wbc_init_bio(wbc, bio);
		wbc_account_io(wbc, page, page_size);
		wbc_account_cgroup_owner(wbc, page, page_size);
	}

	*bio_ret = bio;
+1 −1
Original line number Diff line number Diff line
@@ -3093,7 +3093,7 @@ static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh,

	if (wbc) {
		wbc_init_bio(wbc, bio);
		wbc_account_io(wbc, bh->b_page, bh->b_size);
		wbc_account_cgroup_owner(wbc, bh->b_page, bh->b_size);
	}

	submit_bio(bio);
+1 −1
Original line number Diff line number Diff line
@@ -404,7 +404,7 @@ submit_and_retry:
	ret = bio_add_page(io->io_bio, page, bh->b_size, bh_offset(bh));
	if (ret != bh->b_size)
		goto submit_and_retry;
	wbc_account_io(io->io_wbc, page, bh->b_size);
	wbc_account_cgroup_owner(io->io_wbc, page, bh->b_size);
	io->io_next_block++;
	return 0;
}
+2 −2
Original line number Diff line number Diff line
@@ -470,7 +470,7 @@ int f2fs_submit_page_bio(struct f2fs_io_info *fio)
	}

	if (fio->io_wbc && !is_read_io(fio->op))
		wbc_account_io(fio->io_wbc, page, PAGE_SIZE);
		wbc_account_cgroup_owner(fio->io_wbc, page, PAGE_SIZE);

	bio_set_op_attrs(bio, fio->op, fio->op_flags);

@@ -537,7 +537,7 @@ alloc_new:
	}

	if (fio->io_wbc)
		wbc_account_io(fio->io_wbc, bio_page, PAGE_SIZE);
		wbc_account_cgroup_owner(fio->io_wbc, bio_page, PAGE_SIZE);

	io->last_block_in_bio = fio->new_blkaddr;
	f2fs_trace_ios(fio, 0);
Loading