[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202301142239.pZrF3h03-lkp@intel.com>
Date: Sat, 14 Jan 2023 22:46:19 +0800
From: kernel test robot <lkp@...el.com>
To: Gao Xiang <xiang@...nel.org>, linux-erofs@...ts.ozlabs.org,
Chao Yu <yuchao0@...wei.com>, Chao Yu <chao@...nel.org>,
Yue Hu <huyue2@...lpad.com>,
Jingbo Xu <jefflexu@...ux.alibaba.com>
Cc: oe-kbuild-all@...ts.linux.dev, LKML <linux-kernel@...r.kernel.org>,
Gao Xiang <hsiangkao@...ux.alibaba.com>
Subject: Re: [PATCH 2/2] erofs: simplify iloc()
Hi Gao,
I love your patch! Yet something to improve:
[auto build test ERROR on xiang-erofs/dev-test]
[also build test ERROR on xiang-erofs/dev xiang-erofs/fixes linus/master v6.2-rc3 next-20230113]
[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/Gao-Xiang/erofs-simplify-iloc/20230114-205836
base: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git dev-test
patch link: https://lore.kernel.org/r/20230114125746.399253-2-xiang%40kernel.org
patch subject: [PATCH 2/2] erofs: simplify iloc()
config: i386-randconfig-a003
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/5bb46a259e46bff4dbe228e70e5446d450c396f6
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Gao-Xiang/erofs-simplify-iloc/20230114-205836
git checkout 5bb46a259e46bff4dbe228e70e5446d450c396f6
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 olddefconfig
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash fs/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
In file included from fs/erofs/xattr.h:9,
from fs/erofs/super.c:16:
fs/erofs/internal.h: In function 'erofs_iloc':
>> fs/erofs/internal.h:177:59: error: 'struct erofs_sb_info' has no member named 'i_sb'
177 | #define EROFS_I_SB(inode) ((struct erofs_sb_info *)(inode)->i_sb->s_fs_info)
| ^~
fs/erofs/internal.h:341:37: note: in expansion of macro 'EROFS_I_SB'
341 | struct erofs_sb_info *sbi = EROFS_I_SB(sbi);
| ^~~~~~~~~~
In file included from include/linux/list.h:5,
from include/linux/module.h:12,
from fs/erofs/super.c:7:
>> fs/erofs/internal.h:344:26: error: 'nid' undeclared (first use in this function); did you mean 'fid'?
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~~
include/linux/container_of.h:19:33: note: in definition of macro 'container_of'
19 | void *__mptr = (void *)(ptr); \
| ^~~
fs/erofs/internal.h:344:18: note: in expansion of macro 'EROFS_I'
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~~~~~~
fs/erofs/internal.h:344:26: note: each undeclared identifier is reported only once for each function it appears in
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~~
include/linux/container_of.h:19:33: note: in definition of macro 'container_of'
19 | void *__mptr = (void *)(ptr); \
| ^~~
fs/erofs/internal.h:344:18: note: in expansion of macro 'EROFS_I'
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~~~~~~
In file included from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/module.h:12,
from fs/erofs/super.c:7:
>> include/linux/compiler_types.h:299:27: error: expression in static assertion is not an integer
299 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
fs/erofs/internal.h:337:25: note: in expansion of macro 'container_of'
337 | #define EROFS_I(ptr) container_of(ptr, struct erofs_inode, vfs_inode)
| ^~~~~~~~~~~~
fs/erofs/internal.h:344:18: note: in expansion of macro 'EROFS_I'
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~~~~~~
In file included from fs/erofs/xattr.h:9,
from fs/erofs/super.c:16:
>> fs/erofs/internal.h:344:31: error: invalid operands to binary << (have 'struct erofs_inode *' and 'int')
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~ ~~~~~~~~~~~~~~
| |
| unsigned char
In file included from include/trace/define_trace.h:102,
from include/trace/events/erofs.h:256,
from fs/erofs/super.c:19:
include/trace/events/erofs.h: In function 'trace_event_raw_event_erofs_fill_inode':
>> include/trace/events/erofs.h:69:55: error: implicit declaration of function 'iloc' [-Werror=implicit-function-declaration]
69 | __entry->blkaddr = erofs_blknr(iloc(EROFS_I_SB(inode), __entry->nid));
| ^~~~
include/trace/trace_events.h:402:11: note: in definition of macro 'DECLARE_EVENT_CLASS'
402 | { assign; } \
| ^~~~~~
include/trace/trace_events.h:44:30: note: in expansion of macro 'PARAMS'
44 | PARAMS(assign), \
| ^~~~~~
include/trace/events/erofs.h:55:1: note: in expansion of macro 'TRACE_EVENT'
55 | TRACE_EVENT(erofs_fill_inode,
| ^~~~~~~~~~~
include/trace/events/erofs.h:66:9: note: in expansion of macro 'TP_fast_assign'
66 | TP_fast_assign(
| ^~~~~~~~~~~~~~
include/trace/events/erofs.h:69:43: note: in expansion of macro 'erofs_blknr'
69 | __entry->blkaddr = erofs_blknr(iloc(EROFS_I_SB(inode), __entry->nid));
| ^~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from fs/erofs/xattr.h:9,
from fs/erofs/inode.c:7:
fs/erofs/internal.h: In function 'erofs_iloc':
>> fs/erofs/internal.h:177:59: error: 'struct erofs_sb_info' has no member named 'i_sb'
177 | #define EROFS_I_SB(inode) ((struct erofs_sb_info *)(inode)->i_sb->s_fs_info)
| ^~
fs/erofs/internal.h:341:37: note: in expansion of macro 'EROFS_I_SB'
341 | struct erofs_sb_info *sbi = EROFS_I_SB(sbi);
| ^~~~~~~~~~
In file included from include/linux/list.h:5,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/erofs/internal.h:10,
from fs/erofs/xattr.h:9,
from fs/erofs/inode.c:7:
fs/erofs/internal.h:344:26: error: 'nid' undeclared (first use in this function); did you mean 'pid'?
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~~
include/linux/container_of.h:19:33: note: in definition of macro 'container_of'
19 | void *__mptr = (void *)(ptr); \
| ^~~
fs/erofs/internal.h:344:18: note: in expansion of macro 'EROFS_I'
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~~~~~~
fs/erofs/internal.h:344:26: note: each undeclared identifier is reported only once for each function it appears in
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~~
include/linux/container_of.h:19:33: note: in definition of macro 'container_of'
19 | void *__mptr = (void *)(ptr); \
| ^~~
fs/erofs/internal.h:344:18: note: in expansion of macro 'EROFS_I'
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~~~~~~
In file included from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/erofs/internal.h:10,
from fs/erofs/xattr.h:9,
from fs/erofs/inode.c:7:
>> include/linux/compiler_types.h:299:27: error: expression in static assertion is not an integer
299 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
fs/erofs/internal.h:337:25: note: in expansion of macro 'container_of'
337 | #define EROFS_I(ptr) container_of(ptr, struct erofs_inode, vfs_inode)
| ^~~~~~~~~~~~
fs/erofs/internal.h:344:18: note: in expansion of macro 'EROFS_I'
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~~~~~~
In file included from fs/erofs/xattr.h:9,
from fs/erofs/inode.c:7:
>> fs/erofs/internal.h:344:31: error: invalid operands to binary << (have 'struct erofs_inode *' and 'int')
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~ ~~~~~~~~~~~~~~
| |
| unsigned char
fs/erofs/internal.h:345:1: error: control reaches end of non-void function [-Werror=return-type]
345 | }
| ^
cc1: some warnings being treated as errors
--
In file included from fs/erofs/xattr.h:9,
from fs/erofs/namei.c:7:
fs/erofs/internal.h: In function 'erofs_iloc':
>> fs/erofs/internal.h:177:59: error: 'struct erofs_sb_info' has no member named 'i_sb'
177 | #define EROFS_I_SB(inode) ((struct erofs_sb_info *)(inode)->i_sb->s_fs_info)
| ^~
fs/erofs/internal.h:341:37: note: in expansion of macro 'EROFS_I_SB'
341 | struct erofs_sb_info *sbi = EROFS_I_SB(sbi);
| ^~~~~~~~~~
In file included from include/linux/list.h:5,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/erofs/internal.h:10,
from fs/erofs/xattr.h:9,
from fs/erofs/namei.c:7:
fs/erofs/internal.h:344:26: error: 'nid' undeclared (first use in this function); did you mean 'pid'?
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~~
include/linux/container_of.h:19:33: note: in definition of macro 'container_of'
19 | void *__mptr = (void *)(ptr); \
| ^~~
fs/erofs/internal.h:344:18: note: in expansion of macro 'EROFS_I'
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~~~~~~
fs/erofs/internal.h:344:26: note: each undeclared identifier is reported only once for each function it appears in
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~~
include/linux/container_of.h:19:33: note: in definition of macro 'container_of'
19 | void *__mptr = (void *)(ptr); \
| ^~~
fs/erofs/internal.h:344:18: note: in expansion of macro 'EROFS_I'
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~~~~~~
In file included from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/erofs/internal.h:10,
from fs/erofs/xattr.h:9,
from fs/erofs/namei.c:7:
>> include/linux/compiler_types.h:299:27: error: expression in static assertion is not an integer
299 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:20:23: note: in expansion of macro '__same_type'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
fs/erofs/internal.h:337:25: note: in expansion of macro 'container_of'
337 | #define EROFS_I(ptr) container_of(ptr, struct erofs_inode, vfs_inode)
| ^~~~~~~~~~~~
fs/erofs/internal.h:344:18: note: in expansion of macro 'EROFS_I'
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~~~~~~
In file included from fs/erofs/xattr.h:9,
from fs/erofs/namei.c:7:
>> fs/erofs/internal.h:344:31: error: invalid operands to binary << (have 'struct erofs_inode *' and 'int')
344 | (EROFS_I(nid) << sbi->islotbits);
| ^~ ~~~~~~~~~~~~~~
| |
| unsigned char
vim +177 fs/erofs/internal.h
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 175
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 176 #define EROFS_SB(sb) ((struct erofs_sb_info *)(sb)->s_fs_info)
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 @177 #define EROFS_I_SB(inode) ((struct erofs_sb_info *)(inode)->i_sb->s_fs_info)
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 178
b17500a0fdbae1 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 179 /* Mount flags set via mount options or defaults */
b17500a0fdbae1 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 180 #define EROFS_MOUNT_XATTR_USER 0x00000010
b17500a0fdbae1 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 181 #define EROFS_MOUNT_POSIX_ACL 0x00000020
06252e9ce05b94 fs/erofs/internal.h Gao Xiang 2021-08-05 182 #define EROFS_MOUNT_DAX_ALWAYS 0x00000040
06252e9ce05b94 fs/erofs/internal.h Gao Xiang 2021-08-05 183 #define EROFS_MOUNT_DAX_NEVER 0x00000080
b17500a0fdbae1 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 184
e62424651f43cb fs/erofs/internal.h Gao Xiang 2021-10-07 185 #define clear_opt(opt, option) ((opt)->mount_opt &= ~EROFS_MOUNT_##option)
e62424651f43cb fs/erofs/internal.h Gao Xiang 2021-10-07 186 #define set_opt(opt, option) ((opt)->mount_opt |= EROFS_MOUNT_##option)
e62424651f43cb fs/erofs/internal.h Gao Xiang 2021-10-07 187 #define test_opt(opt, option) ((opt)->mount_opt & EROFS_MOUNT_##option)
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 188
93b856bb5f66ae fs/erofs/internal.h Jeffle Xu 2022-04-25 189 static inline bool erofs_is_fscache_mode(struct super_block *sb)
93b856bb5f66ae fs/erofs/internal.h Jeffle Xu 2022-04-25 190 {
93b856bb5f66ae fs/erofs/internal.h Jeffle Xu 2022-04-25 191 return IS_ENABLED(CONFIG_EROFS_FS_ONDEMAND) && !sb->s_bdev;
93b856bb5f66ae fs/erofs/internal.h Jeffle Xu 2022-04-25 192 }
93b856bb5f66ae fs/erofs/internal.h Jeffle Xu 2022-04-25 193
4279f3f9889f26 drivers/staging/erofs/internal.h Gao Xiang 2019-07-31 194 enum {
4279f3f9889f26 drivers/staging/erofs/internal.h Gao Xiang 2019-07-31 195 EROFS_ZIP_CACHE_DISABLED,
4279f3f9889f26 drivers/staging/erofs/internal.h Gao Xiang 2019-07-31 196 EROFS_ZIP_CACHE_READAHEAD,
4279f3f9889f26 drivers/staging/erofs/internal.h Gao Xiang 2019-07-31 197 EROFS_ZIP_CACHE_READAROUND
4279f3f9889f26 drivers/staging/erofs/internal.h Gao Xiang 2019-07-31 198 };
4279f3f9889f26 drivers/staging/erofs/internal.h Gao Xiang 2019-07-31 199
14f362b4f40580 drivers/staging/erofs/internal.h Gao Xiang 2019-07-31 200 #define EROFS_LOCKED_MAGIC (INT_MIN | 0xE0F510CCL)
14f362b4f40580 drivers/staging/erofs/internal.h Gao Xiang 2019-07-31 201
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 202 /* basic unit of the workstation of a super_block */
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 203 struct erofs_workgroup {
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 204 /* the workgroup index in the workstation */
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 205 pgoff_t index;
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 206
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 207 /* overall workgroup reference count */
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 208 atomic_t refcount;
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 209 };
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 210
73f5c66df3e26a drivers/staging/erofs/internal.h Gao Xiang 2018-11-23 211 static inline bool erofs_workgroup_try_to_freeze(struct erofs_workgroup *grp,
73f5c66df3e26a drivers/staging/erofs/internal.h Gao Xiang 2018-11-23 212 int val)
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 213 {
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 214 preempt_disable();
73f5c66df3e26a drivers/staging/erofs/internal.h Gao Xiang 2018-11-23 215 if (val != atomic_cmpxchg(&grp->refcount, val, EROFS_LOCKED_MAGIC)) {
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 216 preempt_enable();
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 217 return false;
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 218 }
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 219 return true;
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 220 }
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 221
73f5c66df3e26a drivers/staging/erofs/internal.h Gao Xiang 2018-11-23 222 static inline void erofs_workgroup_unfreeze(struct erofs_workgroup *grp,
73f5c66df3e26a drivers/staging/erofs/internal.h Gao Xiang 2018-11-23 223 int orig_val)
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 224 {
948bbdb1818b7a drivers/staging/erofs/internal.h Gao Xiang 2018-11-23 225 /*
948bbdb1818b7a drivers/staging/erofs/internal.h Gao Xiang 2018-11-23 226 * other observers should notice all modifications
948bbdb1818b7a drivers/staging/erofs/internal.h Gao Xiang 2018-11-23 227 * in the freezing period.
948bbdb1818b7a drivers/staging/erofs/internal.h Gao Xiang 2018-11-23 228 */
948bbdb1818b7a drivers/staging/erofs/internal.h Gao Xiang 2018-11-23 229 smp_mb();
73f5c66df3e26a drivers/staging/erofs/internal.h Gao Xiang 2018-11-23 230 atomic_set(&grp->refcount, orig_val);
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 231 preempt_enable();
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 232 }
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 233
df134b8d17b90c drivers/staging/erofs/internal.h Gao Xiang 2018-11-23 234 static inline int erofs_wait_on_workgroup_freezed(struct erofs_workgroup *grp)
df134b8d17b90c drivers/staging/erofs/internal.h Gao Xiang 2018-11-23 235 {
df134b8d17b90c drivers/staging/erofs/internal.h Gao Xiang 2018-11-23 236 return atomic_cond_read_relaxed(&grp->refcount,
df134b8d17b90c drivers/staging/erofs/internal.h Gao Xiang 2018-11-23 237 VAL != EROFS_LOCKED_MAGIC);
df134b8d17b90c drivers/staging/erofs/internal.h Gao Xiang 2018-11-23 238 }
e7e9a307be9d75 drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 239
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 240 /* we strictly follow PAGE_SIZE and no buffer head yet */
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 241 #define LOG_BLOCK_SIZE PAGE_SHIFT
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 242
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 243 #undef LOG_SECTORS_PER_BLOCK
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 244 #define LOG_SECTORS_PER_BLOCK (PAGE_SHIFT - 9)
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 245
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 246 #undef SECTORS_PER_BLOCK
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 247 #define SECTORS_PER_BLOCK (1 << SECTORS_PER_BLOCK)
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 248
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 249 #define EROFS_BLKSIZ (1 << LOG_BLOCK_SIZE)
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 250
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 251 #if (EROFS_BLKSIZ % 4096 || !EROFS_BLKSIZ)
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 252 #error erofs cannot be used in this platform
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 253 #endif
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 254
fdf80a4793021c fs/erofs/internal.h Gao Xiang 2022-01-02 255 enum erofs_kmap_type {
fdf80a4793021c fs/erofs/internal.h Gao Xiang 2022-01-02 256 EROFS_NO_KMAP, /* don't map the buffer */
927e5010ff5bd7 fs/erofs/internal.h Gao Xiang 2022-10-18 257 EROFS_KMAP, /* use kmap_local_page() to map the buffer */
fdf80a4793021c fs/erofs/internal.h Gao Xiang 2022-01-02 258 };
fdf80a4793021c fs/erofs/internal.h Gao Xiang 2022-01-02 259
fdf80a4793021c fs/erofs/internal.h Gao Xiang 2022-01-02 260 struct erofs_buf {
fdf80a4793021c fs/erofs/internal.h Gao Xiang 2022-01-02 261 struct page *page;
fdf80a4793021c fs/erofs/internal.h Gao Xiang 2022-01-02 262 void *base;
fdf80a4793021c fs/erofs/internal.h Gao Xiang 2022-01-02 263 enum erofs_kmap_type kmap_type;
fdf80a4793021c fs/erofs/internal.h Gao Xiang 2022-01-02 264 };
fdf80a4793021c fs/erofs/internal.h Gao Xiang 2022-01-02 265 #define __EROFS_BUF_INITIALIZER ((struct erofs_buf){ .page = NULL })
fdf80a4793021c fs/erofs/internal.h Gao Xiang 2022-01-02 266
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 267 #define ROOT_NID(sb) ((sb)->root_nid)
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 268
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 269 #define erofs_blknr(addr) ((addr) / EROFS_BLKSIZ)
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 270 #define erofs_blkoff(addr) ((addr) % EROFS_BLKSIZ)
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 271 #define blknr_to_addr(nr) ((erofs_off_t)(nr) * EROFS_BLKSIZ)
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 272
de06a6a375414b fs/erofs/internal.h Gao Xiang 2021-03-29 273 #define EROFS_FEATURE_FUNCS(name, compat, feature) \
de06a6a375414b fs/erofs/internal.h Gao Xiang 2021-03-29 274 static inline bool erofs_sb_has_##name(struct erofs_sb_info *sbi) \
de06a6a375414b fs/erofs/internal.h Gao Xiang 2021-03-29 275 { \
de06a6a375414b fs/erofs/internal.h Gao Xiang 2021-03-29 276 return sbi->feature_##compat & EROFS_FEATURE_##feature; \
de06a6a375414b fs/erofs/internal.h Gao Xiang 2021-03-29 277 }
de06a6a375414b fs/erofs/internal.h Gao Xiang 2021-03-29 278
7e508f2ca8bbda fs/erofs/internal.h Huang Jianan 2021-11-13 279 EROFS_FEATURE_FUNCS(zero_padding, incompat, INCOMPAT_ZERO_PADDING)
14373711dd54be fs/erofs/internal.h Gao Xiang 2021-03-29 280 EROFS_FEATURE_FUNCS(compr_cfgs, incompat, INCOMPAT_COMPR_CFGS)
5404c33010cb8e fs/erofs/internal.h Gao Xiang 2021-04-07 281 EROFS_FEATURE_FUNCS(big_pcluster, incompat, INCOMPAT_BIG_PCLUSTER)
168e9a76200c54 fs/erofs/internal.h Huang Jianan 2021-12-01 282 EROFS_FEATURE_FUNCS(chunked_file, incompat, INCOMPAT_CHUNKED_FILE)
dfeab2e95a75a4 fs/erofs/internal.h Gao Xiang 2021-10-14 283 EROFS_FEATURE_FUNCS(device_table, incompat, INCOMPAT_DEVICE_TABLE)
168e9a76200c54 fs/erofs/internal.h Huang Jianan 2021-12-01 284 EROFS_FEATURE_FUNCS(compr_head2, incompat, INCOMPAT_COMPR_HEAD2)
ab92184ff8f129 fs/erofs/internal.h Yue Hu 2021-12-28 285 EROFS_FEATURE_FUNCS(ztailpacking, incompat, INCOMPAT_ZTAILPACKING)
b15b2e307c3a19 fs/erofs/internal.h Yue Hu 2022-09-23 286 EROFS_FEATURE_FUNCS(fragments, incompat, INCOMPAT_FRAGMENTS)
5c2a64252c5dc4 fs/erofs/internal.h Gao Xiang 2022-09-23 287 EROFS_FEATURE_FUNCS(dedupe, incompat, INCOMPAT_DEDUPE)
de06a6a375414b fs/erofs/internal.h Gao Xiang 2021-03-29 288 EROFS_FEATURE_FUNCS(sb_chksum, compat, COMPAT_SB_CHKSUM)
de06a6a375414b fs/erofs/internal.h Gao Xiang 2021-03-29 289
62dc45979f3f8c drivers/staging/erofs/internal.h Gao Xiang 2019-02-18 290 /* atomic flag definitions */
a5876e24f13f13 fs/erofs/internal.h Gao Xiang 2019-09-04 291 #define EROFS_I_EA_INITED_BIT 0
a5876e24f13f13 fs/erofs/internal.h Gao Xiang 2019-09-04 292 #define EROFS_I_Z_INITED_BIT 1
62dc45979f3f8c drivers/staging/erofs/internal.h Gao Xiang 2019-02-18 293
62dc45979f3f8c drivers/staging/erofs/internal.h Gao Xiang 2019-02-18 294 /* bitlock definitions (arranged in reverse order) */
a5876e24f13f13 fs/erofs/internal.h Gao Xiang 2019-09-04 295 #define EROFS_I_BL_XATTR_BIT (BITS_PER_LONG - 1)
a5876e24f13f13 fs/erofs/internal.h Gao Xiang 2019-09-04 296 #define EROFS_I_BL_Z_BIT (BITS_PER_LONG - 2)
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 297
a5876e24f13f13 fs/erofs/internal.h Gao Xiang 2019-09-04 298 struct erofs_inode {
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 299 erofs_nid_t nid;
62dc45979f3f8c drivers/staging/erofs/internal.h Gao Xiang 2019-02-18 300
62dc45979f3f8c drivers/staging/erofs/internal.h Gao Xiang 2019-02-18 301 /* atomic flags (including bitlocks) */
62dc45979f3f8c drivers/staging/erofs/internal.h Gao Xiang 2019-02-18 302 unsigned long flags;
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 303
8a76568225deae fs/erofs/internal.h Gao Xiang 2019-09-04 304 unsigned char datalayout;
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 305 unsigned char inode_isize;
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 306 unsigned short xattr_isize;
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 307
e82a9a17d49c52 drivers/staging/erofs/internal.h Pratik Shinde 2019-07-15 308 unsigned int xattr_shared_count;
e82a9a17d49c52 drivers/staging/erofs/internal.h Pratik Shinde 2019-07-15 309 unsigned int *xattr_shared_xattrs;
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 310
152a333a589560 drivers/staging/erofs/internal.h Gao Xiang 2019-06-24 311 union {
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 312 erofs_blk_t raw_blkaddr;
c5aa903a59db27 fs/erofs/internal.h Gao Xiang 2021-08-20 313 struct {
c5aa903a59db27 fs/erofs/internal.h Gao Xiang 2021-08-20 314 unsigned short chunkformat;
c5aa903a59db27 fs/erofs/internal.h Gao Xiang 2021-08-20 315 unsigned char chunkbits;
c5aa903a59db27 fs/erofs/internal.h Gao Xiang 2021-08-20 316 };
152a333a589560 drivers/staging/erofs/internal.h Gao Xiang 2019-06-24 317 #ifdef CONFIG_EROFS_FS_ZIP
152a333a589560 drivers/staging/erofs/internal.h Gao Xiang 2019-06-24 318 struct {
152a333a589560 drivers/staging/erofs/internal.h Gao Xiang 2019-06-24 319 unsigned short z_advise;
152a333a589560 drivers/staging/erofs/internal.h Gao Xiang 2019-06-24 320 unsigned char z_algorithmtype[2];
152a333a589560 drivers/staging/erofs/internal.h Gao Xiang 2019-06-24 321 unsigned char z_logical_clusterbits;
ab92184ff8f129 fs/erofs/internal.h Yue Hu 2021-12-28 322 unsigned long z_tailextent_headlcn;
b15b2e307c3a19 fs/erofs/internal.h Yue Hu 2022-09-23 323 union {
b15b2e307c3a19 fs/erofs/internal.h Yue Hu 2022-09-23 324 struct {
22ba5e99b96f1c fs/erofs/internal.h Gao Xiang 2022-02-22 325 erofs_off_t z_idataoff;
ab92184ff8f129 fs/erofs/internal.h Yue Hu 2021-12-28 326 unsigned short z_idata_size;
152a333a589560 drivers/staging/erofs/internal.h Gao Xiang 2019-06-24 327 };
b15b2e307c3a19 fs/erofs/internal.h Yue Hu 2022-09-23 328 erofs_off_t z_fragmentoff;
b15b2e307c3a19 fs/erofs/internal.h Yue Hu 2022-09-23 329 };
b15b2e307c3a19 fs/erofs/internal.h Yue Hu 2022-09-23 330 };
14f362b4f40580 drivers/staging/erofs/internal.h Gao Xiang 2019-07-31 331 #endif /* CONFIG_EROFS_FS_ZIP */
152a333a589560 drivers/staging/erofs/internal.h Gao Xiang 2019-06-24 332 };
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 333 /* the corresponding vfs inode */
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 334 struct inode vfs_inode;
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 335 };
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 336
5bb46a259e46bf fs/erofs/internal.h Gao Xiang 2023-01-14 @337 #define EROFS_I(ptr) container_of(ptr, struct erofs_inode, vfs_inode)
5bb46a259e46bf fs/erofs/internal.h Gao Xiang 2023-01-14 338
5bb46a259e46bf fs/erofs/internal.h Gao Xiang 2023-01-14 339 static inline erofs_off_t erofs_iloc(struct inode *inode)
5bb46a259e46bf fs/erofs/internal.h Gao Xiang 2023-01-14 340 {
5bb46a259e46bf fs/erofs/internal.h Gao Xiang 2023-01-14 341 struct erofs_sb_info *sbi = EROFS_I_SB(sbi);
5bb46a259e46bf fs/erofs/internal.h Gao Xiang 2023-01-14 342
5bb46a259e46bf fs/erofs/internal.h Gao Xiang 2023-01-14 343 return blknr_to_addr(sbi->meta_blkaddr) +
5bb46a259e46bf fs/erofs/internal.h Gao Xiang 2023-01-14 @344 (EROFS_I(nid) << sbi->islotbits);
5bb46a259e46bf fs/erofs/internal.h Gao Xiang 2023-01-14 345 }
bfb8674dc0447d drivers/staging/erofs/internal.h Gao Xiang 2018-07-26 346
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
View attachment "config" of type "text/plain" (159667 bytes)
Powered by blists - more mailing lists