From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] f2fs: Make f2fs_readpages readable again
Date: Wed, 12 Feb 2020 11:13:48 +0800 [thread overview]
Message-ID: <202002121140.eIxGH5kv%lkp@intel.com> (raw)
In-Reply-To: <20200201150807.17820-1-willy@infradead.org>
[-- Attachment #1: Type: text/plain, Size: 12481 bytes --]
Hi Matthew,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on f2fs/dev-test]
[also build test ERROR on v5.6-rc1 next-20200211]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Matthew-Wilcox/f2fs-Make-f2fs_readpages-readable-again/20200203-113612
base: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test
config: x86_64-rhel-7.6 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-4) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
fs/f2fs/data.c: In function 'f2fs_mpage_readpages':
>> fs/f2fs/data.c:2208:9: error: implicit declaration of function 'f2fs_cluster_can_merge_page'; did you mean 'f2fs_register_inmem_page'? [-Werror=implicit-function-declaration]
if (!f2fs_cluster_can_merge_page(&cc, page->index)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~
f2fs_register_inmem_page
>> fs/f2fs/data.c:2208:38: error: 'cc' undeclared (first use in this function)
if (!f2fs_cluster_can_merge_page(&cc, page->index)) {
^~
fs/f2fs/data.c:2208:38: note: each undeclared identifier is reported only once for each function it appears in
>> fs/f2fs/data.c:2209:11: error: implicit declaration of function 'f2fs_read_multi_pages'; did you mean 'f2fs_ra_meta_pages'? [-Werror=implicit-function-declaration]
ret = f2fs_read_multi_pages(&cc, &bio,
^~~~~~~~~~~~~~~~~~~~~
f2fs_ra_meta_pages
>> fs/f2fs/data.c:2213:5: error: implicit declaration of function 'f2fs_destroy_compress_ctx'; did you mean 'f2fs_decompress_bio'? [-Werror=implicit-function-declaration]
f2fs_destroy_compress_ctx(&cc);
^~~~~~~~~~~~~~~~~~~~~~~~~
f2fs_decompress_bio
>> fs/f2fs/data.c:2217:10: error: implicit declaration of function 'f2fs_is_compressed_cluster'; did you mean 'f2fs_is_compressed_page'? [-Werror=implicit-function-declaration]
ret = f2fs_is_compressed_cluster(inode, page->index);
^~~~~~~~~~~~~~~~~~~~~~~~~~
f2fs_is_compressed_page
>> fs/f2fs/data.c:2223:10: error: implicit declaration of function 'f2fs_init_compress_ctx'; did you mean 'f2fs_decompress_bio'? [-Werror=implicit-function-declaration]
ret = f2fs_init_compress_ctx(&cc);
^~~~~~~~~~~~~~~~~~~~~~
f2fs_decompress_bio
>> fs/f2fs/data.c:2227:4: error: implicit declaration of function 'f2fs_compress_ctx_add_page'; did you mean 'f2fs_compress_control_page'? [-Werror=implicit-function-declaration]
f2fs_compress_ctx_add_page(&cc, page);
^~~~~~~~~~~~~~~~~~~~~~~~~~
f2fs_compress_control_page
>> fs/f2fs/data.c:2247:26: error: implicit declaration of function 'f2fs_cluster_is_empty'; did you mean 'f2fs_register_inmem_page'? [-Werror=implicit-function-declaration]
if (nr_pages == 1 && !f2fs_cluster_is_empty(&cc)) {
^~~~~~~~~~~~~~~~~~~~~
f2fs_register_inmem_page
cc1: some warnings being treated as errors
vim +2208 fs/f2fs/data.c
4c8ff7095bef64 Chao Yu 2019-11-01 2152
2df0ab045784a1 Chao Yu 2019-03-25 2153 /*
2df0ab045784a1 Chao Yu 2019-03-25 2154 * This function was originally taken from fs/mpage.c, and customized for f2fs.
2df0ab045784a1 Chao Yu 2019-03-25 2155 * Major change was from block_size == page_size in f2fs by default.
2df0ab045784a1 Chao Yu 2019-03-25 2156 *
2df0ab045784a1 Chao Yu 2019-03-25 2157 * Note that the aops->readpages() function is ONLY used for read-ahead. If
2df0ab045784a1 Chao Yu 2019-03-25 2158 * this function ever deviates from doing just read-ahead, it should either
2df0ab045784a1 Chao Yu 2019-03-25 2159 * use ->readpage() or do the necessary surgery to decouple ->readpages()
2df0ab045784a1 Chao Yu 2019-03-25 2160 * from read-ahead.
2df0ab045784a1 Chao Yu 2019-03-25 2161 */
4c8ff7095bef64 Chao Yu 2019-11-01 2162 int f2fs_mpage_readpages(struct address_space *mapping,
2df0ab045784a1 Chao Yu 2019-03-25 2163 struct list_head *pages, struct page *page,
2df0ab045784a1 Chao Yu 2019-03-25 2164 unsigned nr_pages, bool is_readahead)
2df0ab045784a1 Chao Yu 2019-03-25 2165 {
2df0ab045784a1 Chao Yu 2019-03-25 2166 struct bio *bio = NULL;
2df0ab045784a1 Chao Yu 2019-03-25 2167 sector_t last_block_in_bio = 0;
2df0ab045784a1 Chao Yu 2019-03-25 2168 struct inode *inode = mapping->host;
2df0ab045784a1 Chao Yu 2019-03-25 2169 struct f2fs_map_blocks map;
4c8ff7095bef64 Chao Yu 2019-11-01 2170 #ifdef CONFIG_F2FS_FS_COMPRESSION
4c8ff7095bef64 Chao Yu 2019-11-01 2171 struct compress_ctx cc = {
4c8ff7095bef64 Chao Yu 2019-11-01 2172 .inode = inode,
4c8ff7095bef64 Chao Yu 2019-11-01 2173 .log_cluster_size = F2FS_I(inode)->i_log_cluster_size,
4c8ff7095bef64 Chao Yu 2019-11-01 2174 .cluster_size = F2FS_I(inode)->i_cluster_size,
4c8ff7095bef64 Chao Yu 2019-11-01 2175 .cluster_idx = NULL_CLUSTER,
4c8ff7095bef64 Chao Yu 2019-11-01 2176 .rpages = NULL,
4c8ff7095bef64 Chao Yu 2019-11-01 2177 .cpages = NULL,
4c8ff7095bef64 Chao Yu 2019-11-01 2178 .nr_rpages = 0,
4c8ff7095bef64 Chao Yu 2019-11-01 2179 .nr_cpages = 0,
4c8ff7095bef64 Chao Yu 2019-11-01 2180 };
4c8ff7095bef64 Chao Yu 2019-11-01 2181 #endif
4c8ff7095bef64 Chao Yu 2019-11-01 2182 unsigned max_nr_pages = nr_pages;
2df0ab045784a1 Chao Yu 2019-03-25 2183 int ret = 0;
2df0ab045784a1 Chao Yu 2019-03-25 2184
2df0ab045784a1 Chao Yu 2019-03-25 2185 map.m_pblk = 0;
2df0ab045784a1 Chao Yu 2019-03-25 2186 map.m_lblk = 0;
2df0ab045784a1 Chao Yu 2019-03-25 2187 map.m_len = 0;
2df0ab045784a1 Chao Yu 2019-03-25 2188 map.m_flags = 0;
2df0ab045784a1 Chao Yu 2019-03-25 2189 map.m_next_pgofs = NULL;
2df0ab045784a1 Chao Yu 2019-03-25 2190 map.m_next_extent = NULL;
2df0ab045784a1 Chao Yu 2019-03-25 2191 map.m_seg_type = NO_CHECK_TYPE;
2df0ab045784a1 Chao Yu 2019-03-25 2192 map.m_may_create = false;
2df0ab045784a1 Chao Yu 2019-03-25 2193
2df0ab045784a1 Chao Yu 2019-03-25 2194 for (; nr_pages; nr_pages--) {
2df0ab045784a1 Chao Yu 2019-03-25 2195 if (pages) {
2df0ab045784a1 Chao Yu 2019-03-25 2196 page = list_last_entry(pages, struct page, lru);
2df0ab045784a1 Chao Yu 2019-03-25 2197
2df0ab045784a1 Chao Yu 2019-03-25 2198 prefetchw(&page->flags);
2df0ab045784a1 Chao Yu 2019-03-25 2199 list_del(&page->lru);
2df0ab045784a1 Chao Yu 2019-03-25 2200 if (add_to_page_cache_lru(page, mapping,
4969c06a0d83c9 Jaegeuk Kim 2019-07-01 2201 page_index(page),
2df0ab045784a1 Chao Yu 2019-03-25 2202 readahead_gfp_mask(mapping)))
2df0ab045784a1 Chao Yu 2019-03-25 2203 goto next_page;
2df0ab045784a1 Chao Yu 2019-03-25 2204 }
2df0ab045784a1 Chao Yu 2019-03-25 2205
4c8ff7095bef64 Chao Yu 2019-11-01 2206 if (f2fs_compressed_file(inode)) {
4c8ff7095bef64 Chao Yu 2019-11-01 2207 /* there are remained comressed pages, submit them */
4c8ff7095bef64 Chao Yu 2019-11-01 @2208 if (!f2fs_cluster_can_merge_page(&cc, page->index)) {
4c8ff7095bef64 Chao Yu 2019-11-01 @2209 ret = f2fs_read_multi_pages(&cc, &bio,
4c8ff7095bef64 Chao Yu 2019-11-01 2210 max_nr_pages,
4c8ff7095bef64 Chao Yu 2019-11-01 2211 &last_block_in_bio,
4c8ff7095bef64 Chao Yu 2019-11-01 2212 is_readahead);
4c8ff7095bef64 Chao Yu 2019-11-01 @2213 f2fs_destroy_compress_ctx(&cc);
4c8ff7095bef64 Chao Yu 2019-11-01 2214 if (ret)
4c8ff7095bef64 Chao Yu 2019-11-01 2215 goto set_error_page;
4c8ff7095bef64 Chao Yu 2019-11-01 2216 }
4c8ff7095bef64 Chao Yu 2019-11-01 @2217 ret = f2fs_is_compressed_cluster(inode, page->index);
4c8ff7095bef64 Chao Yu 2019-11-01 2218 if (ret < 0)
4c8ff7095bef64 Chao Yu 2019-11-01 2219 goto set_error_page;
4c8ff7095bef64 Chao Yu 2019-11-01 2220 else if (!ret)
4c8ff7095bef64 Chao Yu 2019-11-01 2221 goto read_single_page;
4c8ff7095bef64 Chao Yu 2019-11-01 2222
4c8ff7095bef64 Chao Yu 2019-11-01 @2223 ret = f2fs_init_compress_ctx(&cc);
4c8ff7095bef64 Chao Yu 2019-11-01 2224 if (ret)
4c8ff7095bef64 Chao Yu 2019-11-01 2225 goto set_error_page;
4c8ff7095bef64 Chao Yu 2019-11-01 2226
4c8ff7095bef64 Chao Yu 2019-11-01 @2227 f2fs_compress_ctx_add_page(&cc, page);
4c8ff7095bef64 Chao Yu 2019-11-01 2228
4c8ff7095bef64 Chao Yu 2019-11-01 2229 goto next_page;
4c8ff7095bef64 Chao Yu 2019-11-01 2230 }
4c8ff7095bef64 Chao Yu 2019-11-01 2231 read_single_page:
4c8ff7095bef64 Chao Yu 2019-11-01 2232
4c8ff7095bef64 Chao Yu 2019-11-01 2233 ret = f2fs_read_single_page(inode, page, max_nr_pages, &map,
4c8ff7095bef64 Chao Yu 2019-11-01 2234 &bio, &last_block_in_bio, is_readahead);
2df0ab045784a1 Chao Yu 2019-03-25 2235 if (ret) {
4c8ff7095bef64 Chao Yu 2019-11-01 2236 set_error_page:
2df0ab045784a1 Chao Yu 2019-03-25 2237 SetPageError(page);
2df0ab045784a1 Chao Yu 2019-03-25 2238 zero_user_segment(page, 0, PAGE_SIZE);
2df0ab045784a1 Chao Yu 2019-03-25 2239 unlock_page(page);
2df0ab045784a1 Chao Yu 2019-03-25 2240 }
f1e8866016b53b Jaegeuk Kim 2015-04-09 2241 next_page:
f1e8866016b53b Jaegeuk Kim 2015-04-09 2242 if (pages)
09cbfeaf1a5a67 Kirill A. Shutemov 2016-04-01 2243 put_page(page);
4c8ff7095bef64 Chao Yu 2019-11-01 2244
4c8ff7095bef64 Chao Yu 2019-11-01 2245 if (f2fs_compressed_file(inode)) {
4c8ff7095bef64 Chao Yu 2019-11-01 2246 /* last page */
4c8ff7095bef64 Chao Yu 2019-11-01 @2247 if (nr_pages == 1 && !f2fs_cluster_is_empty(&cc)) {
4c8ff7095bef64 Chao Yu 2019-11-01 2248 ret = f2fs_read_multi_pages(&cc, &bio,
4c8ff7095bef64 Chao Yu 2019-11-01 2249 max_nr_pages,
4c8ff7095bef64 Chao Yu 2019-11-01 2250 &last_block_in_bio,
4c8ff7095bef64 Chao Yu 2019-11-01 2251 is_readahead);
4c8ff7095bef64 Chao Yu 2019-11-01 2252 f2fs_destroy_compress_ctx(&cc);
4c8ff7095bef64 Chao Yu 2019-11-01 2253 }
4c8ff7095bef64 Chao Yu 2019-11-01 2254 }
f1e8866016b53b Jaegeuk Kim 2015-04-09 2255 }
f1e8866016b53b Jaegeuk Kim 2015-04-09 2256 BUG_ON(pages && !list_empty(pages));
f1e8866016b53b Jaegeuk Kim 2015-04-09 2257 if (bio)
4fc29c1aa37535 Linus Torvalds 2016-07-27 2258 __submit_bio(F2FS_I_SB(inode), bio, DATA);
2df0ab045784a1 Chao Yu 2019-03-25 2259 return pages ? 0 : ret;
f1e8866016b53b Jaegeuk Kim 2015-04-09 2260 }
f1e8866016b53b Jaegeuk Kim 2015-04-09 2261
:::::: The code@line 2208 was first introduced by commit
:::::: 4c8ff7095bef64fc47e996a938f7d57f9e077da3 f2fs: support data compression
:::::: TO: Chao Yu <yuchao0@huawei.com>
:::::: CC: Jaegeuk Kim <jaegeuk@kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 48724 bytes --]
prev parent reply other threads:[~2020-02-12 3:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-01 15:08 [f2fs-dev] [PATCH] f2fs: Make f2fs_readpages readable again Matthew Wilcox
2020-02-01 15:08 ` Matthew Wilcox
2020-02-03 3:39 ` [f2fs-dev] [PATCH v2] " Matthew Wilcox
2020-02-03 3:39 ` Matthew Wilcox
2020-02-05 1:58 ` [f2fs-dev] " Chao Yu
2020-02-05 1:58 ` Chao Yu
2020-02-05 3:08 ` [f2fs-dev] " Matthew Wilcox
2020-02-05 3:08 ` Matthew Wilcox
2020-02-06 6:29 ` [f2fs-dev] " Chao Yu
2020-02-06 6:29 ` Chao Yu
2020-02-04 5:19 ` [PATCH] " kbuild test robot
2020-02-12 3:13 ` kbuild test robot [this message]
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=202002121140.eIxGH5kv%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 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.