tree:
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git f2fs-dev
head: 3071cd33e669ffcb435bdc108c975407ebcbcb48
commit: 3071cd33e669ffcb435bdc108c975407ebcbcb48 [9/9] f2fs: support age threshold based
garbage collection
config: alpha-allyesconfig (attached as .config)
compiler: alpha-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
git checkout 3071cd33e669ffcb435bdc108c975407ebcbcb48
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
fs/ceph/locks.c:65: warning: Function parameter or member 'cmd' not described
in 'ceph_lock_message'
fs/ceph/locks.c:65: warning: Function parameter or member 'wait' not described
in 'ceph_lock_message'
fs/ceph/locks.c:65: warning: Function parameter or member 'fl' not described in
'ceph_lock_message'
fs/ocfs2/journal.c:21:10: fatal error: cluster/masklog.h: No such file or directory
21 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
fs/ceph/locks.c:233: warning: Function parameter or member 'file' not described
in 'ceph_lock'
fs/ceph/locks.c:233: warning: Function parameter or member 'cmd' not described
in 'ceph_lock'
fs/ceph/locks.c:233: warning: Function parameter or member 'fl' not described
in 'ceph_lock'
fs/ceph/locks.c:419: warning: Function parameter or member 'inode' not
described in 'ceph_encode_locks_to_buffer'
fs/ceph/locks.c:419: warning: Function parameter or member 'flocks' not
described in 'ceph_encode_locks_to_buffer'
fs/ceph/locks.c:419: warning: Function parameter or member 'num_fcntl_locks'
not described in 'ceph_encode_locks_to_buffer'
fs/ceph/locks.c:419: warning: Function parameter or member 'num_flock_locks'
not described in 'ceph_encode_locks_to_buffer'
fs/ceph/locks.c:470: warning: Function parameter or member 'flocks' not
described in 'ceph_locks_to_pagelist'
fs/ceph/locks.c:470: warning: Function parameter or member 'pagelist' not
described in 'ceph_locks_to_pagelist'
fs/ceph/locks.c:470: warning: Function parameter or member 'num_fcntl_locks'
not described in 'ceph_locks_to_pagelist'
fs/ceph/locks.c:470: warning: Function parameter or member 'num_flock_locks'
not described in 'ceph_locks_to_pagelist'
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/journal.o] Error 1
fs/ocfs2/localalloc.c:18:10: fatal error: cluster/masklog.h: No such file or directory
18 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/localalloc.o] Error 1
fs/gfs2/log.c:74: warning: Excess function parameter 'mapping' description in
'gfs2_remove_from_ail'
fs/gfs2/log.c:95: warning: Function parameter or member 'tr' not described in
'gfs2_ail1_start_one'
fs/gfs2/log.c:95: warning: Excess function parameter 'ai' description in
'gfs2_ail1_start_one'
fs/gfs2/log.c:351: warning: Function parameter or member 'sdp' not described in
'gfs2_ail_empty_tr'
fs/gfs2/log.c:351: warning: Function parameter or member 'tr' not described in
'gfs2_ail_empty_tr'
fs/gfs2/log.c:351: warning: Function parameter or member 'head' not described
in 'gfs2_ail_empty_tr'
fs/gfs2/log.c:1022: warning: Function parameter or member 'sdp' not described
in 'gfs2_merge_trans'
fs/gfs2/log.c:1022: warning: Excess function parameter 'old' description in
'gfs2_merge_trans'
fs/gfs2/log.c:1148: warning: Function parameter or member 'data' not described
in 'gfs2_logd'
fs/gfs2/log.c:1148: warning: Excess function parameter 'sdp' description in
'gfs2_logd'
fs/gfs2/lops.c:100: warning: Function parameter or member 'tr' not described in
'gfs2_unpin'
fs/gfs2/lops.c:100: warning: Excess function parameter 'flags' description in
'gfs2_unpin'
fs/gfs2/lops.c:294: warning: Function parameter or member 'biop' not described
in 'gfs2_log_get_bio'
fs/gfs2/lops.c:294: warning: Excess function parameter 'bio' description in
'gfs2_log_get_bio'
fs/gfs2/lops.c:420: warning: Function parameter or member 'head' not described
in 'gfs2_jhead_pg_srch'
fs/gfs2/lops.c:463: warning: Function parameter or member 'head' not described
in 'gfs2_jhead_process_page'
fs/gfs2/lops.c:505: warning: Function parameter or member 'keep_cache' not
described in 'gfs2_find_jhead'
fs/gfs2/lops.c:998: warning: Function parameter or member 'sdp' not described
in 'databuf_lo_before_commit'
fs/gfs2/lops.c:998: warning: Function parameter or member 'tr' not described in
'databuf_lo_before_commit'
fs/ocfs2/locks.c:15:10: fatal error: cluster/masklog.h: No such file or directory
15 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:280: fs/ocfs2/locks.o] Error 1
In file included from fs/btrfs/tree-log.h:9,
from fs/btrfs/extent-tree.c:20:
fs/btrfs/ctree.h:2216:8: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
2216 | size_t __const btrfs_get_num_csums(void);
| ^~~~~~~
In file included from fs/btrfs/extent-tree.c:28:
fs/btrfs/sysfs.h:16:1: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
16 | const char * const btrfs_feature_set_name(enum btrfs_feature_set set);
| ^~~~~
In file included from fs/btrfs/print-tree.c:6:
fs/btrfs/ctree.h:2216:8: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
2216 | size_t __const btrfs_get_num_csums(void);
| ^~~~~~~
In file included from fs/btrfs/root-tree.c:8:
fs/btrfs/ctree.h:2216:8: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
2216 | size_t __const btrfs_get_num_csums(void);
| ^~~~~~~
fs/ocfs2/mmap.c:20:10: fatal error: cluster/masklog.h: No such file or directory
20 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/mmap.o] Error 1
fs/ocfs2/refcounttree.c:11:10: fatal error: cluster/masklog.h: No such file or
directory
11 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/refcounttree.o] Error 1
fs/ocfs2/reservations.c:25:10: fatal error: cluster/masklog.h: No such file or
directory
25 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/reservations.o] Error 1
fs/ceph/caps.c: In function 'ceph_handle_caps':
fs/ceph/caps.c:4019:19: warning: variable 'caller_gid' set but not used
[-Wunused-but-set-variable]
4019 | u32 caller_uid, caller_gid;
| ^~~~~~~~~~
fs/ceph/caps.c:4019:7: warning: variable 'caller_uid' set but not used
[-Wunused-but-set-variable]
4019 | u32 caller_uid, caller_gid;
| ^~~~~~~~~~
fs/ceph/caps.c:4018:7: warning: variable 'flush_tid' set but not used
[-Wunused-but-set-variable]
4018 | u64 flush_tid;
| ^~~~~~~~~
fs/ceph/caps.c:4049:7: warning: variable 'flags' set but not used
[-Wunused-but-set-variable]
4049 | u32 flags;
| ^~~~~
fs/ocfs2/namei.c:32:10: fatal error: cluster/masklog.h: No such file or directory
32 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
fs/gfs2/meta_io.c:249: warning: Function parameter or member 'rahead' not
described in 'gfs2_meta_read'
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/namei.o] Error 1
fs/f2fs/gc.c: In function 'insert_victim_entry':
> fs/f2fs/gc.c:374:23: warning: variable 've' set but not
used [-Wunused-but-set-variable]
374 | struct victim_entry *ve = NULL;
| ^~
fs/f2fs/gc.c: In function 'atssr_lookup_victim':
> fs/f2fs/gc.c:507:21: warning: variable 'total_time' set
but not used [-Wunused-but-set-variable]
507 | unsigned long long total_time;
| ^~~~~~~~~~
fs/f2fs/gc.c: At top level:
> fs/f2fs/gc.c:588:6: warning: no previous prototype for
'release_victim_entry' [-Wmissing-prototypes]
588 | void
release_victim_entry(struct f2fs_sb_info *sbi)
| ^~~~~~~~~~~~~~~~~~~~
fs/ceph/snap.c: In function 'build_snap_context':
fs/ceph/snap.c:348:10: warning: comparison is always false due to limited range of data
type [-Wtype-limits]
348 | if (num > (SIZE_MAX - sizeof(*snapc)) / sizeof(u64))
| ^
In file included from fs/btrfs/dir-item.c:6:
fs/btrfs/ctree.h:2216:8: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
2216 | size_t __const btrfs_get_num_csums(void);
| ^~~~~~~
fs/nilfs2/recovery.c:571: warning: Function parameter or member 'root' not
described in 'nilfs_do_roll_forward'
In file included from fs/btrfs/file-item.c:12:
fs/btrfs/ctree.h:2216:8: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
2216 | size_t __const btrfs_get_num_csums(void);
| ^~~~~~~
fs/ocfs2/move_extents.c:14:10: fatal error: cluster/masklog.h: No such file or
directory
14 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/move_extents.o] Error 1
fs/ceph/xattr.c: In function 'ceph_fmt_xattr':
fs/ceph/xattr.c:126:2: warning: function 'ceph_fmt_xattr' might be a candidate
for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
126 | ret = vsnprintf(buf, size ? sizeof(buf) : 0, fmt, args);
| ^~~
fs/ocfs2/resize.c:16:10: fatal error: cluster/masklog.h: No such file or directory
16 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/resize.o] Error 1
fs/gfs2/aops.c:598: warning: Function parameter or member 'rac' not described
in 'gfs2_readahead'
fs/gfs2/aops.c:598: warning: Excess function parameter 'file' description in
'gfs2_readahead'
fs/gfs2/aops.c:598: warning: Excess function parameter 'mapping' description in
'gfs2_readahead'
fs/gfs2/aops.c:598: warning: Excess function parameter 'pages' description in
'gfs2_readahead'
fs/gfs2/aops.c:598: warning: Excess function parameter 'nr_pages' description
in 'gfs2_readahead'
fs/ocfs2/slot_map.c:14:10: fatal error: cluster/masklog.h: No such file or directory
14 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/slot_map.o] Error 1
fs/ubifs/auth.c:66: warning: Function parameter or member 'inhash' not
described in 'ubifs_prepare_auth_node'
fs/ubifs/auth.c:66: warning: Excess function parameter 'hash' description in
'ubifs_prepare_auth_node'
fs/ocfs2/suballoc.c:18:10: fatal error: cluster/masklog.h: No such file or directory
18 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/suballoc.o] Error 1
In file included from fs/btrfs/inode-map.c:9:
fs/btrfs/ctree.h:2216:8: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
2216 | size_t __const btrfs_get_num_csums(void);
| ^~~~~~~
In file included from fs/btrfs/inode-item.c:6:
fs/btrfs/ctree.h:2216:8: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
2216 | size_t __const btrfs_get_num_csums(void);
| ^~~~~~~
fs/ceph/mds_client.c: In function 'parse_reply_info_create':
fs/ceph/mds_client.c:520:8: warning: variable 'len' set but not used
[-Wunused-but-set-variable]
520 | u32 len;
| ^~~
fs/ceph/mds_client.c:519:17: warning: variable 'struct_compat' set but not used
[-Wunused-but-set-variable]
519 | u8 struct_v, struct_compat;
| ^~~~~~~~~~~~~
fs/ceph/mds_client.c:519:7: warning: variable 'struct_v' set but not used
[-Wunused-but-set-variable]
519 | u8 struct_v, struct_compat;
| ^~~~~~~~
> fs/f2fs/segment.c:2437:6: warning: no previous prototype for
'get_new_segment' [-Wmissing-prototypes]
2437 | void
get_new_segment(struct f2fs_sb_info *sbi,
| ^~~~~~~~~~~~~~~
fs/ceph/mds_client.c: In function 'ceph_mdsc_handle_fsmap':
fs/btrfs/file-item.c:27: warning: Cannot understand * @inode - the inode we want to
update the disk_i_size for
on line 27 - I thought it was a doc line
fs/btrfs/file-item.c:65: warning: Cannot understand * @inode - the inode we're
modifying
on line 65 - I thought it was a doc line
fs/btrfs/file-item.c:91: warning: Cannot understand * @inode - the inode we're
modifying
on line 91 - I thought it was a doc line
In file included from fs/ocfs2/ocfs2_trace.h:2767,
from fs/ocfs2/super.c:34:
include/trace/define_trace.h:95:42: fatal error: ./ocfs2_trace.h: No such file or
directory
95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
| ^
compilation terminated.
> fs/f2fs/segment.c:2722:6: warning: no previous prototype for
'__f2fs_save_inmem_curseg' [-Wmissing-prototypes]
2722 | void
__f2fs_save_inmem_curseg(struct f2fs_sb_info *sbi, int type)
| ^~~~~~~~~~~~~~~~~~~~~~~~
> fs/f2fs/segment.c:2753:6: warning: no previous prototype for
'__f2fs_restore_inmem_curseg' [-Wmissing-prototypes]
2753 | void
__f2fs_restore_inmem_curseg(struct f2fs_sb_info *sbi, int type)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/f2fs/segment.c:2898:6: warning: no previous prototype for
'__allocate_new_segment' [-Wmissing-prototypes]
2898 | void __allocate_new_segment(struct f2fs_sb_info *sbi, int type)
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bits.h:23,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/f2fs/segment.c:8:
fs/f2fs/segment.c: In function 'fix_curseg_write_pointer':
include/linux/bits.h:26:28: warning: comparison of unsigned expression < 0 is always
false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro
'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
fs/f2fs/segment.c:4773:28: note: in expansion of macro 'GENMASK'
4773 | wp_sector_off = zone.wp & GENMASK(log_sectors_per_block - 1, 0);
| ^~~~~~~
include/linux/bits.h:26:40: warning: comparison of unsigned expression < 0 is always
false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro
'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
fs/f2fs/segment.c:4773:28: note: in expansion of macro 'GENMASK'
4773 | wp_sector_off = zone.wp & GENMASK(log_sectors_per_block - 1, 0);
| ^~~~~~~
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/super.o] Error 1
fs/ceph/mds_client.c:4718:14: warning: variable 'info_cv' set but not used
[-Wunused-but-set-variable]
4718 | u8 info_v, info_cv;
| ^~~~~~~
fs/ceph/mds_client.c:4718:6: warning: variable 'info_v' set but not used
[-Wunused-but-set-variable]
4718 | u8 info_v, info_cv;
| ^~~~~~
fs/ceph/mds_client.c:4698:15: warning: variable 'struct_cv' set but not used
[-Wunused-but-set-variable]
4698 | u8 struct_v, struct_cv;
| ^~~~~~~~~
fs/ceph/mds_client.c:4698:5: warning: variable 'struct_v' set but not used
[-Wunused-but-set-variable]
4698 | u8 struct_v, struct_cv;
| ^~~~~~~~
fs/ceph/mds_client.c:4695:6: warning: variable 'map_len' set but not used
[-Wunused-but-set-variable]
4695 | u32 map_len;
| ^~~~~~~
In file included from fs/ceph/mds_client.c:18:
At top level:
include/linux/ceph/ceph_features.h:21:24: warning:
'DEPRECATED_CEPH_FEATUREMASK_RESERVED_BROKEN' defined but not used
[-Wunused-const-variable=]
21 | static const uint64_t DEPRECATED_CEPH_FEATUREMASK_##name = \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:172:1: note: in expansion of macro
'DEFINE_CEPH_FEATURE_DEPRECATED'
172 | DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) //
client-facing
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:20:24: warning:
'DEPRECATED_CEPH_FEATURE_RESERVED_BROKEN' defined but not used
[-Wunused-const-variable=]
20 | static const uint64_t DEPRECATED_CEPH_FEATURE_##name = (1ULL<<bit); \
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:172:1: note: in expansion of macro
'DEFINE_CEPH_FEATURE_DEPRECATED'
172 | DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) //
client-facing
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:15:24: warning: 'CEPH_FEATUREMASK_RESERVED'
defined but not used [-Wunused-const-variable=]
15 | static const uint64_t CEPH_FEATUREMASK_##name = \
| ^~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:171:1: note: in expansion of macro
'DEFINE_CEPH_FEATURE'
171 | DEFINE_CEPH_FEATURE(62, 1, RESERVED) // do not use; used as a
sentinal
| ^~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:14:24: warning: 'CEPH_FEATURE_RESERVED'
defined but not used [-Wunused-const-variable=]
14 | static const uint64_t CEPH_FEATURE_##name = (1ULL<<bit); \
| ^~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:171:1: note: in expansion of macro
'DEFINE_CEPH_FEATURE'
171 | DEFINE_CEPH_FEATURE(62, 1, RESERVED) // do not use; used as a
sentinal
| ^~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:15:24: warning: 'CEPH_FEATUREMASK_CEPHX_V2'
defined but not used [-Wunused-const-variable=]
15 | static const uint64_t CEPH_FEATUREMASK_##name = \
| ^~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:169:1: note: in expansion of macro
'DEFINE_CEPH_FEATURE'
169 | DEFINE_CEPH_FEATURE(61, 1, CEPHX_V2) // *do not share this bit*
| ^~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:14:24: warning: 'CEPH_FEATURE_CEPHX_V2'
defined but not used [-Wunused-const-variable=]
14 | static const uint64_t CEPH_FEATURE_##name = (1ULL<<bit); \
| ^~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:169:1: note: in expansion of macro
'DEFINE_CEPH_FEATURE'
169 | DEFINE_CEPH_FEATURE(61, 1, CEPHX_V2) // *do not share this bit*
| ^~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:15:24: warning:
'CEPH_FEATUREMASK_OSD_RECOVERY_DELETES' defined but not used
[-Wunused-const-variable=]
15 | static const uint64_t CEPH_FEATUREMASK_##name = \
| ^~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:168:1: note: in expansion of macro
'DEFINE_CEPH_FEATURE'
168 | DEFINE_CEPH_FEATURE(60, 1, OSD_RECOVERY_DELETES) // *do not share this bit*
| ^~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:14:24: warning:
'CEPH_FEATURE_OSD_RECOVERY_DELETES' defined but not used
[-Wunused-const-variable=]
14 | static const uint64_t CEPH_FEATURE_##name = (1ULL<<bit); \
--
fs/ceph/locks.c:65: warning: Function parameter or member 'cmd' not described
in 'ceph_lock_message'
fs/ceph/locks.c:65: warning: Function parameter or member 'wait' not described
in 'ceph_lock_message'
fs/ceph/locks.c:65: warning: Function parameter or member 'fl' not described in
'ceph_lock_message'
fs/ocfs2/journal.c:21:10: fatal error: cluster/masklog.h: No such file or directory
21 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
fs/ceph/locks.c:233: warning: Function parameter or member 'file' not described
in 'ceph_lock'
fs/ceph/locks.c:233: warning: Function parameter or member 'cmd' not described
in 'ceph_lock'
fs/ceph/locks.c:233: warning: Function parameter or member 'fl' not described
in 'ceph_lock'
fs/ceph/locks.c:419: warning: Function parameter or member 'inode' not
described in 'ceph_encode_locks_to_buffer'
fs/ceph/locks.c:419: warning: Function parameter or member 'flocks' not
described in 'ceph_encode_locks_to_buffer'
fs/ceph/locks.c:419: warning: Function parameter or member 'num_fcntl_locks'
not described in 'ceph_encode_locks_to_buffer'
fs/ceph/locks.c:419: warning: Function parameter or member 'num_flock_locks'
not described in 'ceph_encode_locks_to_buffer'
fs/ceph/locks.c:470: warning: Function parameter or member 'flocks' not
described in 'ceph_locks_to_pagelist'
fs/ceph/locks.c:470: warning: Function parameter or member 'pagelist' not
described in 'ceph_locks_to_pagelist'
fs/ceph/locks.c:470: warning: Function parameter or member 'num_fcntl_locks'
not described in 'ceph_locks_to_pagelist'
fs/ceph/locks.c:470: warning: Function parameter or member 'num_flock_locks'
not described in 'ceph_locks_to_pagelist'
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/journal.o] Error 1
fs/ocfs2/localalloc.c:18:10: fatal error: cluster/masklog.h: No such file or directory
18 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/localalloc.o] Error 1
fs/gfs2/log.c:74: warning: Excess function parameter 'mapping' description in
'gfs2_remove_from_ail'
fs/gfs2/log.c:95: warning: Function parameter or member 'tr' not described in
'gfs2_ail1_start_one'
fs/gfs2/log.c:95: warning: Excess function parameter 'ai' description in
'gfs2_ail1_start_one'
fs/gfs2/log.c:351: warning: Function parameter or member 'sdp' not described in
'gfs2_ail_empty_tr'
fs/gfs2/log.c:351: warning: Function parameter or member 'tr' not described in
'gfs2_ail_empty_tr'
fs/gfs2/log.c:351: warning: Function parameter or member 'head' not described
in 'gfs2_ail_empty_tr'
fs/gfs2/log.c:1022: warning: Function parameter or member 'sdp' not described
in 'gfs2_merge_trans'
fs/gfs2/log.c:1022: warning: Excess function parameter 'old' description in
'gfs2_merge_trans'
fs/gfs2/log.c:1148: warning: Function parameter or member 'data' not described
in 'gfs2_logd'
fs/gfs2/log.c:1148: warning: Excess function parameter 'sdp' description in
'gfs2_logd'
fs/gfs2/lops.c:100: warning: Function parameter or member 'tr' not described in
'gfs2_unpin'
fs/gfs2/lops.c:100: warning: Excess function parameter 'flags' description in
'gfs2_unpin'
fs/gfs2/lops.c:294: warning: Function parameter or member 'biop' not described
in 'gfs2_log_get_bio'
fs/gfs2/lops.c:294: warning: Excess function parameter 'bio' description in
'gfs2_log_get_bio'
fs/gfs2/lops.c:420: warning: Function parameter or member 'head' not described
in 'gfs2_jhead_pg_srch'
fs/gfs2/lops.c:463: warning: Function parameter or member 'head' not described
in 'gfs2_jhead_process_page'
fs/gfs2/lops.c:505: warning: Function parameter or member 'keep_cache' not
described in 'gfs2_find_jhead'
fs/gfs2/lops.c:998: warning: Function parameter or member 'sdp' not described
in 'databuf_lo_before_commit'
fs/gfs2/lops.c:998: warning: Function parameter or member 'tr' not described in
'databuf_lo_before_commit'
fs/ocfs2/locks.c:15:10: fatal error: cluster/masklog.h: No such file or directory
15 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:280: fs/ocfs2/locks.o] Error 1
In file included from fs/btrfs/tree-log.h:9,
from fs/btrfs/extent-tree.c:20:
fs/btrfs/ctree.h:2216:8: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
2216 | size_t __const btrfs_get_num_csums(void);
| ^~~~~~~
In file included from fs/btrfs/extent-tree.c:28:
fs/btrfs/sysfs.h:16:1: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
16 | const char * const btrfs_feature_set_name(enum btrfs_feature_set set);
| ^~~~~
In file included from fs/btrfs/print-tree.c:6:
fs/btrfs/ctree.h:2216:8: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
2216 | size_t __const btrfs_get_num_csums(void);
| ^~~~~~~
In file included from fs/btrfs/root-tree.c:8:
fs/btrfs/ctree.h:2216:8: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
2216 | size_t __const btrfs_get_num_csums(void);
| ^~~~~~~
fs/ocfs2/mmap.c:20:10: fatal error: cluster/masklog.h: No such file or directory
20 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/mmap.o] Error 1
fs/ocfs2/refcounttree.c:11:10: fatal error: cluster/masklog.h: No such file or
directory
11 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/refcounttree.o] Error 1
fs/ocfs2/reservations.c:25:10: fatal error: cluster/masklog.h: No such file or
directory
25 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/reservations.o] Error 1
fs/ceph/caps.c: In function 'ceph_handle_caps':
fs/ceph/caps.c:4019:19: warning: variable 'caller_gid' set but not used
[-Wunused-but-set-variable]
4019 | u32 caller_uid, caller_gid;
| ^~~~~~~~~~
fs/ceph/caps.c:4019:7: warning: variable 'caller_uid' set but not used
[-Wunused-but-set-variable]
4019 | u32 caller_uid, caller_gid;
| ^~~~~~~~~~
fs/ceph/caps.c:4018:7: warning: variable 'flush_tid' set but not used
[-Wunused-but-set-variable]
4018 | u64 flush_tid;
| ^~~~~~~~~
fs/ceph/caps.c:4049:7: warning: variable 'flags' set but not used
[-Wunused-but-set-variable]
4049 | u32 flags;
| ^~~~~
fs/ocfs2/namei.c:32:10: fatal error: cluster/masklog.h: No such file or directory
32 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
fs/gfs2/meta_io.c:249: warning: Function parameter or member 'rahead' not
described in 'gfs2_meta_read'
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/namei.o] Error 1
fs/f2fs/gc.c: In function 'insert_victim_entry':
> fs/f2fs/gc.c:374:23: warning: variable 've' set but not
used [-Wunused-but-set-variable]
374 | struct victim_entry *ve = NULL;
| ^~
fs/f2fs/gc.c: In function 'atssr_lookup_victim':
> fs/f2fs/gc.c:507:21: warning: variable 'total_time' set
but not used [-Wunused-but-set-variable]
507 | unsigned long long total_time;
| ^~~~~~~~~~
fs/f2fs/gc.c: At top level:
> fs/f2fs/gc.c:588:6: warning: no previous prototype for
'release_victim_entry' [-Wmissing-prototypes]
588 | void
release_victim_entry(struct f2fs_sb_info *sbi)
| ^~~~~~~~~~~~~~~~~~~~
fs/ceph/snap.c: In function 'build_snap_context':
fs/ceph/snap.c:348:10: warning: comparison is always false due to limited range of data
type [-Wtype-limits]
348 | if (num > (SIZE_MAX - sizeof(*snapc)) / sizeof(u64))
| ^
In file included from fs/btrfs/dir-item.c:6:
fs/btrfs/ctree.h:2216:8: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
2216 | size_t __const btrfs_get_num_csums(void);
| ^~~~~~~
fs/nilfs2/recovery.c:571: warning: Function parameter or member 'root' not
described in 'nilfs_do_roll_forward'
In file included from fs/btrfs/file-item.c:12:
fs/btrfs/ctree.h:2216:8: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
2216 | size_t __const btrfs_get_num_csums(void);
| ^~~~~~~
fs/ocfs2/move_extents.c:14:10: fatal error: cluster/masklog.h: No such file or
directory
14 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/move_extents.o] Error 1
fs/ceph/xattr.c: In function 'ceph_fmt_xattr':
fs/ceph/xattr.c:126:2: warning: function 'ceph_fmt_xattr' might be a candidate
for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
126 | ret = vsnprintf(buf, size ? sizeof(buf) : 0, fmt, args);
| ^~~
fs/ocfs2/resize.c:16:10: fatal error: cluster/masklog.h: No such file or directory
16 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/resize.o] Error 1
fs/gfs2/aops.c:598: warning: Function parameter or member 'rac' not described
in 'gfs2_readahead'
fs/gfs2/aops.c:598: warning: Excess function parameter 'file' description in
'gfs2_readahead'
fs/gfs2/aops.c:598: warning: Excess function parameter 'mapping' description in
'gfs2_readahead'
fs/gfs2/aops.c:598: warning: Excess function parameter 'pages' description in
'gfs2_readahead'
fs/gfs2/aops.c:598: warning: Excess function parameter 'nr_pages' description
in 'gfs2_readahead'
fs/ocfs2/slot_map.c:14:10: fatal error: cluster/masklog.h: No such file or directory
14 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/slot_map.o] Error 1
fs/ubifs/auth.c:66: warning: Function parameter or member 'inhash' not
described in 'ubifs_prepare_auth_node'
fs/ubifs/auth.c:66: warning: Excess function parameter 'hash' description in
'ubifs_prepare_auth_node'
fs/ocfs2/suballoc.c:18:10: fatal error: cluster/masklog.h: No such file or directory
18 | #include <cluster/masklog.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/suballoc.o] Error 1
In file included from fs/btrfs/inode-map.c:9:
fs/btrfs/ctree.h:2216:8: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
2216 | size_t __const btrfs_get_num_csums(void);
| ^~~~~~~
In file included from fs/btrfs/inode-item.c:6:
fs/btrfs/ctree.h:2216:8: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
2216 | size_t __const btrfs_get_num_csums(void);
| ^~~~~~~
fs/ceph/mds_client.c: In function 'parse_reply_info_create':
fs/ceph/mds_client.c:520:8: warning: variable 'len' set but not used
[-Wunused-but-set-variable]
520 | u32 len;
| ^~~
fs/ceph/mds_client.c:519:17: warning: variable 'struct_compat' set but not used
[-Wunused-but-set-variable]
519 | u8 struct_v, struct_compat;
| ^~~~~~~~~~~~~
fs/ceph/mds_client.c:519:7: warning: variable 'struct_v' set but not used
[-Wunused-but-set-variable]
519 | u8 struct_v, struct_compat;
| ^~~~~~~~
> fs/f2fs/segment.c:2437:6: warning: no previous prototype for
'get_new_segment' [-Wmissing-prototypes]
2437 | void
get_new_segment(struct f2fs_sb_info *sbi,
| ^~~~~~~~~~~~~~~
fs/ceph/mds_client.c: In function 'ceph_mdsc_handle_fsmap':
fs/btrfs/file-item.c:27: warning: Cannot understand * @inode - the inode we want to
update the disk_i_size for
on line 27 - I thought it was a doc line
fs/btrfs/file-item.c:65: warning: Cannot understand * @inode - the inode we're
modifying
on line 65 - I thought it was a doc line
fs/btrfs/file-item.c:91: warning: Cannot understand * @inode - the inode we're
modifying
on line 91 - I thought it was a doc line
In file included from fs/ocfs2/ocfs2_trace.h:2767,
from fs/ocfs2/super.c:34:
include/trace/define_trace.h:95:42: fatal error: ./ocfs2_trace.h: No such file or
directory
95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
| ^
compilation terminated.
> fs/f2fs/segment.c:2722:6: warning: no previous prototype for
'__f2fs_save_inmem_curseg' [-Wmissing-prototypes]
2722 | void
__f2fs_save_inmem_curseg(struct f2fs_sb_info *sbi, int type)
| ^~~~~~~~~~~~~~~~~~~~~~~~
> fs/f2fs/segment.c:2753:6: warning: no previous prototype for
'__f2fs_restore_inmem_curseg' [-Wmissing-prototypes]
2753 | void
__f2fs_restore_inmem_curseg(struct f2fs_sb_info *sbi, int type)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/f2fs/segment.c:2898:6: warning: no previous prototype for
'__allocate_new_segment' [-Wmissing-prototypes]
2898 | void __allocate_new_segment(struct f2fs_sb_info *sbi, int type)
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bits.h:23,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/f2fs/segment.c:8:
fs/f2fs/segment.c: In function 'fix_curseg_write_pointer':
include/linux/bits.h:26:28: warning: comparison of unsigned expression < 0 is always
false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro
'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
fs/f2fs/segment.c:4773:28: note: in expansion of macro 'GENMASK'
4773 | wp_sector_off = zone.wp & GENMASK(log_sectors_per_block - 1, 0);
| ^~~~~~~
include/linux/bits.h:26:40: warning: comparison of unsigned expression < 0 is always
false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro
'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
fs/f2fs/segment.c:4773:28: note: in expansion of macro 'GENMASK'
4773 | wp_sector_off = zone.wp & GENMASK(log_sectors_per_block - 1, 0);
| ^~~~~~~
make[3]: *** [scripts/Makefile.build:281: fs/ocfs2/super.o] Error 1
fs/ceph/mds_client.c:4718:14: warning: variable 'info_cv' set but not used
[-Wunused-but-set-variable]
4718 | u8 info_v, info_cv;
| ^~~~~~~
fs/ceph/mds_client.c:4718:6: warning: variable 'info_v' set but not used
[-Wunused-but-set-variable]
4718 | u8 info_v, info_cv;
| ^~~~~~
fs/ceph/mds_client.c:4698:15: warning: variable 'struct_cv' set but not used
[-Wunused-but-set-variable]
4698 | u8 struct_v, struct_cv;
| ^~~~~~~~~
fs/ceph/mds_client.c:4698:5: warning: variable 'struct_v' set but not used
[-Wunused-but-set-variable]
4698 | u8 struct_v, struct_cv;
| ^~~~~~~~
fs/ceph/mds_client.c:4695:6: warning: variable 'map_len' set but not used
[-Wunused-but-set-variable]
4695 | u32 map_len;
| ^~~~~~~
In file included from fs/ceph/mds_client.c:18:
At top level:
include/linux/ceph/ceph_features.h:21:24: warning:
'DEPRECATED_CEPH_FEATUREMASK_RESERVED_BROKEN' defined but not used
[-Wunused-const-variable=]
21 | static const uint64_t DEPRECATED_CEPH_FEATUREMASK_##name = \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:172:1: note: in expansion of macro
'DEFINE_CEPH_FEATURE_DEPRECATED'
172 | DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) //
client-facing
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:20:24: warning:
'DEPRECATED_CEPH_FEATURE_RESERVED_BROKEN' defined but not used
[-Wunused-const-variable=]
20 | static const uint64_t DEPRECATED_CEPH_FEATURE_##name = (1ULL<<bit); \
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:172:1: note: in expansion of macro
'DEFINE_CEPH_FEATURE_DEPRECATED'
172 | DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) //
client-facing
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:15:24: warning: 'CEPH_FEATUREMASK_RESERVED'
defined but not used [-Wunused-const-variable=]
15 | static const uint64_t CEPH_FEATUREMASK_##name = \
| ^~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:171:1: note: in expansion of macro
'DEFINE_CEPH_FEATURE'
171 | DEFINE_CEPH_FEATURE(62, 1, RESERVED) // do not use; used as a
sentinal
| ^~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:14:24: warning: 'CEPH_FEATURE_RESERVED'
defined but not used [-Wunused-const-variable=]
14 | static const uint64_t CEPH_FEATURE_##name = (1ULL<<bit); \
| ^~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:171:1: note: in expansion of macro
'DEFINE_CEPH_FEATURE'
171 | DEFINE_CEPH_FEATURE(62, 1, RESERVED) // do not use; used as a
sentinal
| ^~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:15:24: warning: 'CEPH_FEATUREMASK_CEPHX_V2'
defined but not used [-Wunused-const-variable=]
15 | static const uint64_t CEPH_FEATUREMASK_##name = \
| ^~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:169:1: note: in expansion of macro
'DEFINE_CEPH_FEATURE'
169 | DEFINE_CEPH_FEATURE(61, 1, CEPHX_V2) // *do not share this bit*
| ^~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:14:24: warning: 'CEPH_FEATURE_CEPHX_V2'
defined but not used [-Wunused-const-variable=]
14 | static const uint64_t CEPH_FEATURE_##name = (1ULL<<bit); \
| ^~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:169:1: note: in expansion of macro
'DEFINE_CEPH_FEATURE'
169 | DEFINE_CEPH_FEATURE(61, 1, CEPHX_V2) // *do not share this bit*
| ^~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:15:24: warning:
'CEPH_FEATUREMASK_OSD_RECOVERY_DELETES' defined but not used
[-Wunused-const-variable=]
15 | static const uint64_t CEPH_FEATUREMASK_##name = \
| ^~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:168:1: note: in expansion of macro
'DEFINE_CEPH_FEATURE'
168 | DEFINE_CEPH_FEATURE(60, 1, OSD_RECOVERY_DELETES) // *do not share this bit*
| ^~~~~~~~~~~~~~~~~~~
include/linux/ceph/ceph_features.h:14:24: warning:
'CEPH_FEATURE_OSD_RECOVERY_DELETES' defined but not used
[-Wunused-const-variable=]
14 | static const uint64_t CEPH_FEATURE_##name = (1ULL<<bit); \
..
vim +/ve +374 fs/f2fs/gc.c
367
368 static void insert_victim_entry(struct f2fs_sb_info *sbi,
369 unsigned long long mtime, unsigned int segno)
370 {
371 struct atgc_management *am = &sbi->am;
372 struct rb_node **p;
373 struct rb_node *parent = NULL;
374 struct victim_entry *ve = NULL;
375 bool left_most =
true;
376
377 p = f2fs_lookup_rb_tree_ext(sbi, &am->root, &parent, mtime,
&left_most);
378 ve = attach_victim_entry(sbi, mtime, segno, parent, p, left_most);
379 }
380
381 static void add_victim_entry(struct f2fs_sb_info *sbi,
382 struct victim_sel_policy *p, unsigned int segno)
383 {
384 struct sit_info *sit_i = SIT_I(sbi);
385 unsigned int secno = GET_SEC_FROM_SEG(sbi, segno);
386 unsigned int start = GET_SEG_FROM_SEC(sbi, secno);
387 unsigned long long mtime = 0;
388 unsigned int i;
389
390 for (i = 0; i < sbi->segs_per_sec; i++)
391 mtime += get_seg_entry(sbi, start + i)->mtime;
392 mtime = div_u64(mtime, sbi->segs_per_sec);
393
394 /* Handle if the system time has changed by the user */
395 if (mtime < sit_i->min_mtime)
396 sit_i->min_mtime = mtime;
397 if (mtime > sit_i->max_mtime)
398 sit_i->max_mtime = mtime;
399 if (mtime < sit_i->dirty_min_mtime)
400 sit_i->dirty_min_mtime = mtime;
401 if (mtime > sit_i->dirty_max_mtime)
402 sit_i->dirty_max_mtime = mtime;
403
404 /* don't choose young section as candidate */
405 if (sit_i->dirty_max_mtime - mtime < p->age_threshold)
406 return;
407
408 insert_victim_entry(sbi, mtime, segno);
409 }
410
411 static struct rb_node *lookup_central_victim(struct f2fs_sb_info *sbi,
412 struct victim_sel_policy *p)
413 {
414 struct atgc_management *am = &sbi->am;
415 struct rb_node *parent = NULL;
416 bool left_most;
417
418 f2fs_lookup_rb_tree_ext(sbi, &am->root, &parent, p->age,
&left_most);
419
420 return parent;
421 }
422
423 static void atgc_lookup_victim(struct f2fs_sb_info *sbi,
424 struct victim_sel_policy *p)
425 {
426 struct sit_info *sit_i = SIT_I(sbi);
427 struct atgc_management *am = &sbi->am;
428 struct rb_root_cached *root = &am->root;
429 struct rb_node *node;
430 struct rb_entry *re;
431 struct victim_entry *ve;
432 unsigned long long total_time;
433 unsigned long long age, u, accu;
434 unsigned long long max_mtime = sit_i->dirty_max_mtime;
435 unsigned long long min_mtime = sit_i->dirty_min_mtime;
436 unsigned int sec_blocks = BLKS_PER_SEC(sbi);
437 unsigned int vblocks;
438 unsigned int dirty_threshold = max(am->max_candidate_count,
439 am->candidate_ratio *
440 am->victim_count / 100);
441 unsigned int age_weight = am->age_weight;
442 unsigned int cost;
443 unsigned int iter = 0;
444
445 if (max_mtime < min_mtime)
446 return;
447
448 max_mtime += 1;
449 total_time = max_mtime - min_mtime;
450
451 accu = min_t(unsigned long long,
452 ULLONG_MAX / total_time / 100,
453 DEFAULT_ACCURACY_CLASS);
454
455 node = rb_first_cached(root);
456 next:
457 re = rb_entry_safe(node, struct rb_entry, rb_node);
458 if (!re)
459 return;
460
461 ve = (struct victim_entry *)re;
462
463 if (ve->mtime >= max_mtime || ve->mtime < min_mtime)
464 goto skip;
465
466 /* age = 10000 * x% * 60 */
467 age = div64_u64(accu * (max_mtime - ve->mtime), total_time) *
468 age_weight;
469
470 vblocks = get_valid_blocks(sbi, ve->segno, true);
471 f2fs_bug_on(sbi, !vblocks || vblocks == sec_blocks);
472
473 /* u = 10000 * x% * 40 */
474 u = div64_u64(accu * (sec_blocks - vblocks), sec_blocks) *
475 (100 - age_weight);
476
477 f2fs_bug_on(sbi, age + u >= UINT_MAX);
478
479 cost = UINT_MAX - (age + u);
480 iter++;
481
482 if (cost < p->min_cost ||
483 (cost == p->min_cost && age > p->oldest_age)) {
484 p->min_cost = cost;
485 p->oldest_age = age;
486 p->min_segno = ve->segno;
487 }
488 skip:
489 if (iter < dirty_threshold) {
490 node = rb_next(node);
491 goto next;
492 }
493 }
494
495 /*
496 * select candidates around source section in range of
497 * [target - dirty_threshold, target + dirty_threshold]
498 */
499 static void atssr_lookup_victim(struct f2fs_sb_info *sbi,
500 struct victim_sel_policy *p)
501 {
502 struct sit_info *sit_i = SIT_I(sbi);
503 struct atgc_management *am = &sbi->am;
504 struct rb_node *node;
505 struct rb_entry *re;
506 struct victim_entry *ve;
507 unsigned long long total_time;
508 unsigned long long
age;
509 unsigned long long max_mtime = sit_i->dirty_max_mtime;
510 unsigned long long min_mtime = sit_i->dirty_min_mtime;
511 unsigned int seg_blocks = sbi->blocks_per_seg;
512 unsigned int vblocks;
513 unsigned int dirty_threshold = max(am->max_candidate_count,
514 am->candidate_ratio *
515 am->victim_count / 100);
516 unsigned int cost;
517 unsigned int iter = 0;
518 int stage = 0;
519
520 if (max_mtime < min_mtime)
521 return;
522 max_mtime += 1;
523 total_time = max_mtime - min_mtime;
524 next_stage:
525 node = lookup_central_victim(sbi, p);
526 next_node:
527 re = rb_entry_safe(node, struct rb_entry, rb_node);
528 if (!re) {
529 if (stage == 0)
530 goto skip_stage;
531 return;
532 }
533
534 ve = (struct victim_entry *)re;
535
536 if (ve->mtime >= max_mtime || ve->mtime < min_mtime)
537 goto skip_node;
538
539 age = max_mtime - ve->mtime;
540
541 vblocks = get_seg_entry(sbi, ve->segno)->ckpt_valid_blocks;
542 f2fs_bug_on(sbi, !vblocks);
543
544 /* rare case */
545 if (vblocks == seg_blocks)
546 goto skip_node;
547
548 iter++;
549
550 age = max_mtime - abs(p->age - age);
551 cost = UINT_MAX - vblocks;
552
553 if (cost < p->min_cost ||
554 (cost == p->min_cost && age > p->oldest_age)) {
555 p->min_cost = cost;
556 p->oldest_age = age;
557 p->min_segno = ve->segno;
558 }
559 skip_node:
560 if (iter < dirty_threshold) {
561 if (stage == 0)
562 node = rb_prev(node);
563 else if (stage == 1)
564 node = rb_next(node);
565 goto next_node;
566 }
567 skip_stage:
568 if (stage < 1) {
569 stage++;
570 iter = 0;
571 goto next_stage;
572 }
573 }
574 static void lookup_victim_by_age(struct f2fs_sb_info *sbi,
575 struct victim_sel_policy *p)
576 {
577 f2fs_bug_on(sbi, !f2fs_check_rb_tree_consistence(sbi,
578 &sbi->am.root, true));
579
580 if (p->gc_mode == GC_AT)
581 atgc_lookup_victim(sbi, p);
582 else if (p->alloc_mode == AT_SSR)
583 atssr_lookup_victim(sbi, p);
584 else
585 f2fs_bug_on(sbi, 1);
586 }
587
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org