From: kernel test robot <lkp@intel.com>
To: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Cc: kbuild-all@lists.01.org, Nikolay Borisov <nborisov@suse.com>
Subject: Re: [PATCH v2 05/19] btrfs: make btrfs_fs_info::buffer_radix to take sector size devided values
Date: Wed, 16 Sep 2020 01:40:31 +0800 [thread overview]
Message-ID: <202009160107.DZZO6Dfi%lkp@intel.com> (raw)
In-Reply-To: <20200915053532.63279-6-wqu@suse.com>
[-- Attachment #1: Type: text/plain, Size: 5983 bytes --]
Hi Qu,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v5.9-rc5]
[also build test ERROR on next-20200915]
[cannot apply to kdave/for-next btrfs/next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Qu-Wenruo/btrfs-add-read-only-support-for-subpage-sector-size/20200915-133811
base: 856deb866d16e29bd65952e0289066f6078af773
config: m68k-randconfig-r014-20200913 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
m68k-linux-ld: fs/btrfs/extent_io.o: in function `alloc_extent_buffer':
>> fs/btrfs/extent_io.c:5305: undefined reference to `__udivdi3'
m68k-linux-ld: fs/btrfs/extent_io.o: in function `release_extent_buffer':
fs/btrfs/extent_io.c:5361: undefined reference to `__udivdi3'
m68k-linux-ld: fs/btrfs/extent_io.o: in function `find_extent_buffer':
fs/btrfs/extent_io.c:5145: undefined reference to `__udivdi3'
# https://github.com/0day-ci/linux/commit/d68d61d0719a047c653dcee58952ec46f5db5d00
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Qu-Wenruo/btrfs-add-read-only-support-for-subpage-sector-size/20200915-133811
git checkout d68d61d0719a047c653dcee58952ec46f5db5d00
vim +5305 fs/btrfs/extent_io.c
5216
5217 struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info,
5218 u64 start)
5219 {
5220 unsigned long len = fs_info->nodesize;
5221 int num_pages;
5222 int i;
5223 unsigned long index = start >> PAGE_SHIFT;
5224 struct extent_buffer *eb;
5225 struct extent_buffer *exists = NULL;
5226 struct page *p;
5227 struct address_space *mapping = fs_info->btree_inode->i_mapping;
5228 int uptodate = 1;
5229 int ret;
5230
5231 if (!IS_ALIGNED(start, fs_info->sectorsize)) {
5232 btrfs_err(fs_info, "bad tree block start %llu", start);
5233 return ERR_PTR(-EINVAL);
5234 }
5235
5236 eb = find_extent_buffer(fs_info, start);
5237 if (eb)
5238 return eb;
5239
5240 eb = __alloc_extent_buffer(fs_info, start, len);
5241 if (!eb)
5242 return ERR_PTR(-ENOMEM);
5243
5244 num_pages = num_extent_pages(eb);
5245 for (i = 0; i < num_pages; i++, index++) {
5246 p = find_or_create_page(mapping, index, GFP_NOFS|__GFP_NOFAIL);
5247 if (!p) {
5248 exists = ERR_PTR(-ENOMEM);
5249 goto free_eb;
5250 }
5251
5252 spin_lock(&mapping->private_lock);
5253 if (PagePrivate(p)) {
5254 /*
5255 * We could have already allocated an eb for this page
5256 * and attached one so lets see if we can get a ref on
5257 * the existing eb, and if we can we know it's good and
5258 * we can just return that one, else we know we can just
5259 * overwrite page->private.
5260 */
5261 exists = (struct extent_buffer *)p->private;
5262 if (atomic_inc_not_zero(&exists->refs)) {
5263 spin_unlock(&mapping->private_lock);
5264 unlock_page(p);
5265 put_page(p);
5266 mark_extent_buffer_accessed(exists, p);
5267 goto free_eb;
5268 }
5269 exists = NULL;
5270
5271 /*
5272 * Do this so attach doesn't complain and we need to
5273 * drop the ref the old guy had.
5274 */
5275 ClearPagePrivate(p);
5276 WARN_ON(PageDirty(p));
5277 put_page(p);
5278 }
5279 attach_extent_buffer_page(eb, p);
5280 spin_unlock(&mapping->private_lock);
5281 WARN_ON(PageDirty(p));
5282 eb->pages[i] = p;
5283 if (!PageUptodate(p))
5284 uptodate = 0;
5285
5286 /*
5287 * We can't unlock the pages just yet since the extent buffer
5288 * hasn't been properly inserted in the radix tree, this
5289 * opens a race with btree_releasepage which can free a page
5290 * while we are still filling in all pages for the buffer and
5291 * we could crash.
5292 */
5293 }
5294 if (uptodate)
5295 set_bit(EXTENT_BUFFER_UPTODATE, &eb->bflags);
5296 again:
5297 ret = radix_tree_preload(GFP_NOFS);
5298 if (ret) {
5299 exists = ERR_PTR(ret);
5300 goto free_eb;
5301 }
5302
5303 spin_lock(&fs_info->buffer_lock);
5304 ret = radix_tree_insert(&fs_info->buffer_radix,
> 5305 start / fs_info->sectorsize, eb);
5306 spin_unlock(&fs_info->buffer_lock);
5307 radix_tree_preload_end();
5308 if (ret == -EEXIST) {
5309 exists = find_extent_buffer(fs_info, start);
5310 if (exists)
5311 goto free_eb;
5312 else
5313 goto again;
5314 }
5315 /* add one reference for the tree */
5316 check_buffer_tree_ref(eb);
5317 set_bit(EXTENT_BUFFER_IN_TREE, &eb->bflags);
5318
5319 /*
5320 * Now it's safe to unlock the pages because any calls to
5321 * btree_releasepage will correctly detect that a page belongs to a
5322 * live buffer and won't free them prematurely.
5323 */
5324 for (i = 0; i < num_pages; i++)
5325 unlock_page(eb->pages[i]);
5326 return eb;
5327
5328 free_eb:
5329 WARN_ON(!atomic_dec_and_test(&eb->refs));
5330 for (i = 0; i < num_pages; i++) {
5331 if (eb->pages[i])
5332 unlock_page(eb->pages[i]);
5333 }
5334
5335 btrfs_release_extent_buffer(eb);
5336 return exists;
5337 }
5338
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 22530 bytes --]
next prev parent reply other threads:[~2020-09-15 17:45 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-15 5:35 [PATCH v2 00/19] btrfs: add read-only support for subpage sector size Qu Wenruo
2020-09-15 5:35 ` [PATCH v2 01/19] btrfs: extent-io-tests: remove invalid tests Qu Wenruo
2020-09-15 5:35 ` [PATCH v2 02/19] btrfs: remove the unnecessary parameter @start and @len for check_data_csum() Qu Wenruo
2020-09-15 8:39 ` Johannes Thumshirn
2020-09-15 5:35 ` [PATCH v2 03/19] btrfs: calculate inline extent buffer page size based on page size Qu Wenruo
2020-09-15 8:35 ` Nikolay Borisov
2020-09-15 10:05 ` Qu Wenruo
2020-09-15 8:40 ` Johannes Thumshirn
2020-09-15 5:35 ` [PATCH v2 04/19] btrfs: remove the open-code to read disk-key Qu Wenruo
2020-09-15 8:36 ` Nikolay Borisov
2020-09-15 8:40 ` Johannes Thumshirn
2020-09-16 16:01 ` David Sterba
2020-09-17 8:02 ` Qu Wenruo
2020-09-17 12:37 ` David Sterba
2020-09-17 13:15 ` Qu Wenruo
2020-09-17 22:41 ` David Sterba
2020-09-17 23:26 ` Qu Wenruo
2020-09-15 5:35 ` [PATCH v2 05/19] btrfs: make btrfs_fs_info::buffer_radix to take sector size devided values Qu Wenruo
2020-09-15 8:27 ` Johannes Thumshirn
2020-09-15 10:04 ` Qu Wenruo
2020-09-15 10:12 ` Johannes Thumshirn
2020-09-15 17:40 ` kernel test robot [this message]
2020-09-15 5:35 ` [PATCH v2 06/19] btrfs: don't allow tree block to cross page boundary for subpage support Qu Wenruo
2020-09-15 8:37 ` Nikolay Borisov
2020-09-15 10:06 ` Qu Wenruo
2020-09-15 8:44 ` Johannes Thumshirn
2020-09-15 5:35 ` [PATCH v2 07/19] btrfs: update num_extent_pages() to support subpage sized extent buffer Qu Wenruo
2020-09-15 8:42 ` Johannes Thumshirn
2020-09-15 10:07 ` Qu Wenruo
2020-09-15 10:12 ` Johannes Thumshirn
2020-09-15 10:07 ` Qu Wenruo
2020-09-15 5:35 ` [PATCH v2 08/19] btrfs: handle sectorsize < PAGE_SIZE case for extent buffer accessors Qu Wenruo
2020-09-15 5:35 ` [PATCH v2 09/19] btrfs: make csum_tree_block() handle sectorsize smaller than page size Qu Wenruo
2020-09-15 8:47 ` Johannes Thumshirn
2020-09-15 5:35 ` [PATCH v2 10/19] btrfs: add assert_spin_locked() for attach_extent_buffer_page() Qu Wenruo
2020-09-15 8:52 ` Johannes Thumshirn
2020-09-15 5:35 ` [PATCH v2 11/19] btrfs: extract the extent buffer verification from btree_readpage_end_io_hook() Qu Wenruo
2020-09-15 5:35 ` [PATCH v2 12/19] btrfs: extent_io: only require sector size alignment for page read Qu Wenruo
2020-09-15 5:35 ` [PATCH v2 13/19] btrfs: make btrfs_readpage_end_io_hook() follow sector size Qu Wenruo
2020-09-15 5:35 ` [PATCH v2 14/19] btrfs: make btree inode io_tree has its special owner Qu Wenruo
2020-09-16 9:28 ` Johannes Thumshirn
2020-09-16 16:06 ` David Sterba
2020-09-17 0:02 ` Qu Wenruo
2020-09-17 12:50 ` David Sterba
2020-09-18 8:18 ` Qu Wenruo
2020-09-22 14:06 ` David Sterba
2020-09-22 14:14 ` David Sterba
2020-09-15 5:35 ` [PATCH v2 15/19] btrfs: don't set extent_io_tree bits for btree inode at endio time Qu Wenruo
2020-09-15 5:35 ` [PATCH v2 16/19] btrfs: use extent_io_tree to handle subpage extent buffer allocation Qu Wenruo
2020-09-15 5:35 ` [PATCH v2 17/19] btrfs: implement subpage metadata read and its endio function Qu Wenruo
2020-09-16 8:47 ` kernel test robot
2020-09-15 5:35 ` [PATCH v2 18/19] btrfs: implement btree_readpage() and try_release_extent_buffer() for subpage Qu Wenruo
2020-09-15 5:35 ` [PATCH v2 19/19] btrfs: allow RO mount of 4K sector size fs on 64K page system Qu Wenruo
2020-09-16 1:35 ` [PATCH v2 00/19] btrfs: add read-only support for subpage sector size Qu Wenruo
2020-09-16 16:18 ` Neal Gompa
2020-09-17 0:03 ` Qu Wenruo
2020-09-17 0:13 ` Neal Gompa
2020-09-17 0:24 ` Qu Wenruo
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=202009160107.DZZO6Dfi%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.com \
--cc=wqu@suse.com \
/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;
as well as URLs for NNTP newsgroup(s).