Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1619821
| From | Chao Yu <yuchao0@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [f2fs-dev] [PATCH 1/2] f2fs: count writeback pages correctly |
| Date | 2017-04-10 13:20 +0200 |
| Message-ID | <tuFwt-8nU-11@gated-at.bofh.it> (permalink) |
| References | <tsXxw-63J-19@gated-at.bofh.it> <ttcZA-7iO-17@gated-at.bofh.it> <ttGbg-21h-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2017/4/8 1:46, Jaegeuk Kim wrote:
> On 04/06, Chao Yu wrote:
>> Hi Jaegeuk,
>>
>> On 2017/4/6 2:02, Jaegeuk Kim wrote:
>>> This patch fixes # of outstanding writeback pages by checking its original page.
>>
>> Originally, we use bio_page to track encrypted page which is been writebacked,
>> there are two cases:
>> 1. background flush through .writepages: encrypted_page has no mapping info,
>> will not be tracked.
>> 2. synchronized GC through move_encrypted_block: encrypted_page is meta page,
>> will be tracked.
>>
>> So there is no problem with old code?
>
> Consistency was fine, but why not tracking # of writebacked pages for encryption
> case?
Hmm.. because checkpoint doesn't care about writebacked pages of normal file, no
matter the file is encrypted or not. Right?
Thanks,
>
> Thanks,
>
>>
>> Thanks,
>>
>>>
>>> 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,
>>>
>
> .
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/2] f2fs: count writeback pages correctly Jaegeuk Kim <jaegeuk@kernel.org> - 2017-04-05 20:10 +0200
Re: [f2fs-dev] [PATCH 1/2] f2fs: count writeback pages correctly Chao Yu <yuchao0@huawei.com> - 2017-04-06 12:40 +0200
Re: [f2fs-dev] [PATCH 1/2] f2fs: count writeback pages correctly Jaegeuk Kim <jaegeuk@kernel.org> - 2017-04-07 19:50 +0200
Re: [f2fs-dev] [PATCH 1/2] f2fs: count writeback pages correctly Chao Yu <yuchao0@huawei.com> - 2017-04-10 13:20 +0200
csiph-web