From: kernel test robot <lkp@intel.com>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
Dave Kleikamp <shaggy@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
jfs-discussion@lists.sourceforge.net,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 10/13] jfs: Convert inc_io and mp_anchor to take a folio
Date: Sat, 3 Feb 2024 09:53:39 +0800 [thread overview]
Message-ID: <202402030956.qthlo2BE-lkp@intel.com> (raw)
In-Reply-To: <20240201224605.4055895-11-willy@infradead.org>
Hi Matthew,
kernel test robot noticed the following build errors:
[auto build test ERROR on kleikamp-shaggy/jfs-next]
[also build test ERROR on linus/master v6.8-rc2 next-20240202]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Matthew-Wilcox-Oracle/jfs-Convert-metapage_read_folio-to-use-folio-APIs/20240202-064805
base: https://github.com/kleikamp/linux-shaggy jfs-next
patch link: https://lore.kernel.org/r/20240201224605.4055895-11-willy%40infradead.org
patch subject: [PATCH 10/13] jfs: Convert inc_io and mp_anchor to take a folio
config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20240203/202402030956.qthlo2BE-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240203/202402030956.qthlo2BE-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402030956.qthlo2BE-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
fs/jfs/jfs_metapage.c: In function 'remove_metapage':
fs/jfs/jfs_metapage.c:130:38: error: passing argument 1 of 'folio_detach_private' from incompatible pointer type [-Werror=incompatible-pointer-types]
130 | folio_detach_private(&folio->page);
| ^~~~~~~~~~~~
| |
| struct page *
In file included from include/linux/buffer_head.h:15,
from fs/jfs/jfs_metapage.c:14:
include/linux/pagemap.h:508:56: note: expected 'struct folio *' but argument is of type 'struct page *'
508 | static inline void *folio_detach_private(struct folio *folio)
| ~~~~~~~~~~~~~~^~~~~
fs/jfs/jfs_metapage.c: In function 'inc_io':
>> fs/jfs/jfs_metapage.c:137:37: warning: dereferencing 'void *' pointer
137 | atomic_inc(&mp_anchor(folio)->io_count);
| ^~
>> fs/jfs/jfs_metapage.c:137:37: error: request for member 'io_count' in something not a structure or union
cc1: some warnings being treated as errors
vim +/io_count +137 fs/jfs/jfs_metapage.c
> 14 #include <linux/buffer_head.h>
15 #include <linux/mempool.h>
16 #include <linux/seq_file.h>
17 #include <linux/writeback.h>
18 #include "jfs_incore.h"
19 #include "jfs_superblock.h"
20 #include "jfs_filsys.h"
21 #include "jfs_metapage.h"
22 #include "jfs_txnmgr.h"
23 #include "jfs_debug.h"
24
25 #ifdef CONFIG_JFS_STATISTICS
26 static struct {
27 uint pagealloc; /* # of page allocations */
28 uint pagefree; /* # of page frees */
29 uint lockwait; /* # of sleeping lock_metapage() calls */
30 } mpStat;
31 #endif
32
33 #define metapage_locked(mp) test_bit(META_locked, &(mp)->flag)
34 #define trylock_metapage(mp) test_and_set_bit_lock(META_locked, &(mp)->flag)
35
36 static inline void unlock_metapage(struct metapage *mp)
37 {
38 clear_bit_unlock(META_locked, &mp->flag);
39 wake_up(&mp->wait);
40 }
41
42 static inline void __lock_metapage(struct metapage *mp)
43 {
44 DECLARE_WAITQUEUE(wait, current);
45 INCREMENT(mpStat.lockwait);
46 add_wait_queue_exclusive(&mp->wait, &wait);
47 do {
48 set_current_state(TASK_UNINTERRUPTIBLE);
49 if (metapage_locked(mp)) {
50 unlock_page(mp->page);
51 io_schedule();
52 lock_page(mp->page);
53 }
54 } while (trylock_metapage(mp));
55 __set_current_state(TASK_RUNNING);
56 remove_wait_queue(&mp->wait, &wait);
57 }
58
59 /*
60 * Must have mp->page locked
61 */
62 static inline void lock_metapage(struct metapage *mp)
63 {
64 if (trylock_metapage(mp))
65 __lock_metapage(mp);
66 }
67
68 #define METAPOOL_MIN_PAGES 32
69 static struct kmem_cache *metapage_cache;
70 static mempool_t *metapage_mempool;
71
72 #define MPS_PER_PAGE (PAGE_SIZE >> L2PSIZE)
73
74 #if MPS_PER_PAGE > 1
75
76 struct meta_anchor {
77 int mp_count;
78 atomic_t io_count;
79 struct metapage *mp[MPS_PER_PAGE];
80 };
81 #define mp_anchor(folio) (folio->private)
82
83 static inline struct metapage *folio_to_mp(struct folio *folio, int offset)
84 {
85 struct meta_anchor *anchor = folio->private;
86
87 if (!anchor)
88 return NULL;
89 return anchor->mp[offset >> L2PSIZE];
90 }
91
92 static inline int insert_metapage(struct folio *folio, struct metapage *mp)
93 {
94 struct meta_anchor *a;
95 int index;
96 int l2mp_blocks; /* log2 blocks per metapage */
97
98 a = folio->private;
99 if (!a) {
100 a = kzalloc(sizeof(struct meta_anchor), GFP_NOFS);
101 if (!a)
102 return -ENOMEM;
103 folio_attach_private(folio, a);
104 kmap(&folio->page);
105 }
106
107 if (mp) {
108 l2mp_blocks = L2PSIZE - folio->mapping->host->i_blkbits;
109 index = (mp->index >> l2mp_blocks) & (MPS_PER_PAGE - 1);
110 a->mp_count++;
111 a->mp[index] = mp;
112 }
113
114 return 0;
115 }
116
117 static inline void remove_metapage(struct folio *folio, struct metapage *mp)
118 {
119 struct meta_anchor *a = mp_anchor(folio);
120 int l2mp_blocks = L2PSIZE - folio->mapping->host->i_blkbits;
121 int index;
122
123 index = (mp->index >> l2mp_blocks) & (MPS_PER_PAGE - 1);
124
125 BUG_ON(a->mp[index] != mp);
126
127 a->mp[index] = NULL;
128 if (--a->mp_count == 0) {
129 kfree(a);
130 folio_detach_private(&folio->page);
131 kunmap(&folio->page);
132 }
133 }
134
135 static inline void inc_io(struct folio *folio)
136 {
> 137 atomic_inc(&mp_anchor(folio)->io_count);
138 }
139
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-02-03 1:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 22:45 [PATCH 00/13] JFS folio conversion Matthew Wilcox (Oracle)
2024-02-01 22:45 ` [PATCH 01/13] jfs: Convert metapage_read_folio to use folio APIs Matthew Wilcox (Oracle)
2024-02-01 22:45 ` [PATCH 02/13] jfs: Convert metapage_writepage to metapage_write_folio Matthew Wilcox (Oracle)
2024-02-01 22:45 ` [PATCH 03/13] jfs: Convert __get_metapage to use a folio Matthew Wilcox (Oracle)
2024-02-01 22:45 ` [PATCH 04/13] jfs: Convert insert_metapage() to take " Matthew Wilcox (Oracle)
2024-02-01 22:45 ` [PATCH 05/13] jfs; Convert release_metapage to use " Matthew Wilcox (Oracle)
2024-02-01 22:45 ` [PATCH 06/13] jfs: Convert drop_metapage and remove_metapage to take " Matthew Wilcox (Oracle)
2024-02-02 17:18 ` kernel test robot
2024-02-05 11:29 ` kernel test robot
2024-02-01 22:45 ` [PATCH 07/13] jfs: Convert dec_io " Matthew Wilcox (Oracle)
2024-02-01 22:45 ` [PATCH 08/13] jfs; Convert __invalidate_metapages to use " Matthew Wilcox (Oracle)
2024-02-01 22:45 ` [PATCH 09/13] jfs: Convert page_to_mp to folio_to_mp Matthew Wilcox (Oracle)
2024-02-01 22:45 ` [PATCH 10/13] jfs: Convert inc_io and mp_anchor to take a folio Matthew Wilcox (Oracle)
2024-02-03 1:53 ` kernel test robot [this message]
2024-02-01 22:46 ` [PATCH 11/13] jfs: Convert force_metapage to use " Matthew Wilcox (Oracle)
2024-02-01 22:46 ` [PATCH 12/13] jfs: Change metapage->page to metapage->folio Matthew Wilcox (Oracle)
2024-02-01 22:46 ` [PATCH 13/13] fs: Remove i_blocks_per_page Matthew Wilcox (Oracle)
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=202402030956.qthlo2BE-lkp@intel.com \
--to=lkp@intel.com \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=shaggy@kernel.org \
--cc=willy@infradead.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;
as well as URLs for NNTP newsgroup(s).