From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH 1/2] f2fs: count writeback pages correctly
Date: Wed, 5 Apr 2017 11:02:00 -0700 [thread overview]
Message-ID: <20170405180201.4021-1-jaegeuk@kernel.org> (raw)
This patch fixes # of outstanding writeback pages by checking its original page.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/data.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 3d74c0ffa4c7..af3e849e96d2 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -94,7 +94,6 @@ static void f2fs_write_end_io(struct bio *bio)
bio_for_each_segment_all(bvec, bio, i) {
struct page *page = bvec->bv_page;
- enum count_type type = WB_DATA_TYPE(page);
if (IS_DUMMY_WRITTEN_PAGE(page)) {
set_page_private(page, (unsigned long)NULL);
@@ -113,7 +112,7 @@ static void f2fs_write_end_io(struct bio *bio)
mapping_set_error(page->mapping, -EIO);
f2fs_stop_checkpoint(sbi, true);
}
- dec_page_count(sbi, type);
+ dec_page_count(sbi, WB_DATA_TYPE(page));
clear_cold_data(page);
end_page_writeback(page);
}
@@ -389,7 +388,7 @@ int f2fs_submit_page_mbio(struct f2fs_io_info *fio)
fio->submitted = 1;
if (!is_read)
- inc_page_count(sbi, WB_DATA_TYPE(bio_page));
+ inc_page_count(sbi, WB_DATA_TYPE(fio->page));
down_write(&io->io_rwsem);
@@ -403,7 +402,7 @@ int f2fs_submit_page_mbio(struct f2fs_io_info *fio)
fio->new_blkaddr & F2FS_IO_SIZE_MASK(sbi)) {
err = -EAGAIN;
if (!is_read)
- dec_page_count(sbi, WB_DATA_TYPE(bio_page));
+ dec_page_count(sbi, WB_DATA_TYPE(fio->page));
goto out_fail;
}
io->bio = __bio_alloc(sbi, fio->new_blkaddr,
--
2.11.0
next reply other threads:[~2017-04-05 18:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-05 18:02 Jaegeuk Kim [this message]
2017-04-05 18:02 ` [PATCH 2/2] Revert "f2fs: put allocate_segment after refresh_sit_entry" Jaegeuk Kim
2017-04-06 10:30 ` [f2fs-dev] [PATCH 1/2] f2fs: count writeback pages correctly Chao Yu
2017-04-07 17:46 ` Jaegeuk Kim
2017-04-10 11:14 ` Chao Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170405180201.4021-1-jaegeuk@kernel.org \
--to=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox