CC: [email protected] CC: "Darrick J. Wong" <[email protected]> CC: [email protected] TO: "Darrick J. Wong" <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git vectorized-scrub head: 142ad7efefdd71fa40628c868530a9357c18ba27 commit: 2f6741323132a15eb0cb2842104b64cb8dfd89bc [112/303] xfs: add a ->xchg_file_range handler :::::: branch date: 11 hours ago :::::: commit date: 11 hours ago config: x86_64-randconfig-m001-20210816 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> smatch warnings: fs/xfs/xfs_xchgrange.c:267 xfs_xchg_range_grab_log_assist() warn: missing error code 'error' vim +/error +267 fs/xfs/xfs_xchgrange.c 2f6741323132a1 Darrick J. Wong 2021-07-09 231 2f6741323132a1 Darrick J. Wong 2021-07-09 232 /* 2f6741323132a1 Darrick J. Wong 2021-07-09 233 * Get permission to use log-assisted atomic exchange of file extents. 2f6741323132a1 Darrick J. Wong 2021-07-09 234 * 2f6741323132a1 Darrick J. Wong 2021-07-09 235 * Callers must not be running any transactions or hold any inode locks, and 2f6741323132a1 Darrick J. Wong 2021-07-09 236 * they must release the permission by calling xfs_xchg_range_rele_log_assist 2f6741323132a1 Darrick J. Wong 2021-07-09 237 * when they're done. 2f6741323132a1 Darrick J. Wong 2021-07-09 238 */ 2f6741323132a1 Darrick J. Wong 2021-07-09 239 int 2f6741323132a1 Darrick J. Wong 2021-07-09 240 xfs_xchg_range_grab_log_assist( 2f6741323132a1 Darrick J. Wong 2021-07-09 241 struct xfs_mount *mp, 2f6741323132a1 Darrick J. Wong 2021-07-09 242 bool force, 2f6741323132a1 Darrick J. Wong 2021-07-09 243 bool *enabled) 2f6741323132a1 Darrick J. Wong 2021-07-09 244 { 2f6741323132a1 Darrick J. Wong 2021-07-09 245 int error = 0; 2f6741323132a1 Darrick J. Wong 2021-07-09 246 2f6741323132a1 Darrick J. Wong 2021-07-09 247 /* 2f6741323132a1 Darrick J. Wong 2021-07-09 248 * Protect ourselves from an idle log clearing the atomic swapext 2f6741323132a1 Darrick J. Wong 2021-07-09 249 * log incompat feature bit. 2f6741323132a1 Darrick J. Wong 2021-07-09 250 */ 2f6741323132a1 Darrick J. Wong 2021-07-09 251 xlog_use_incompat_feat(mp->m_log); 2f6741323132a1 Darrick J. Wong 2021-07-09 252 *enabled = true; 2f6741323132a1 Darrick J. Wong 2021-07-09 253 2f6741323132a1 Darrick J. Wong 2021-07-09 254 /* 2f6741323132a1 Darrick J. Wong 2021-07-09 255 * If log-assisted swapping is already enabled, the caller can use the 2f6741323132a1 Darrick J. Wong 2021-07-09 256 * log assisted swap functions with the log-incompat reference we got. 2f6741323132a1 Darrick J. Wong 2021-07-09 257 */ 2f6741323132a1 Darrick J. Wong 2021-07-09 258 if (xfs_sb_version_hasatomicswap(&mp->m_sb)) 2f6741323132a1 Darrick J. Wong 2021-07-09 259 return 0; 2f6741323132a1 Darrick J. Wong 2021-07-09 260 2f6741323132a1 Darrick J. Wong 2021-07-09 261 /* 2f6741323132a1 Darrick J. Wong 2021-07-09 262 * If the caller doesn't /require/ log-assisted swapping, drop the 2f6741323132a1 Darrick J. Wong 2021-07-09 263 * log-incompat feature protection and exit. The caller cannot use 2f6741323132a1 Darrick J. Wong 2021-07-09 264 * log assisted swapping. 2f6741323132a1 Darrick J. Wong 2021-07-09 265 */ 2f6741323132a1 Darrick J. Wong 2021-07-09 266 if (!force) 2f6741323132a1 Darrick J. Wong 2021-07-09 @267 goto drop_incompat; 2f6741323132a1 Darrick J. Wong 2021-07-09 268 2f6741323132a1 Darrick J. Wong 2021-07-09 269 /* 2f6741323132a1 Darrick J. Wong 2021-07-09 270 * Caller requires log-assisted swapping but the fs feature set isn't 2f6741323132a1 Darrick J. Wong 2021-07-09 271 * rich enough to support it. Bail out. 2f6741323132a1 Darrick J. Wong 2021-07-09 272 */ 2f6741323132a1 Darrick J. Wong 2021-07-09 273 if (!xfs_sb_version_canatomicswap(&mp->m_sb)) { 2f6741323132a1 Darrick J. Wong 2021-07-09 274 error = -EOPNOTSUPP; 2f6741323132a1 Darrick J. Wong 2021-07-09 275 goto drop_incompat; 2f6741323132a1 Darrick J. Wong 2021-07-09 276 } 2f6741323132a1 Darrick J. Wong 2021-07-09 277 2f6741323132a1 Darrick J. Wong 2021-07-09 278 /* Enable log-assisted extent swapping. */ 2f6741323132a1 Darrick J. Wong 2021-07-09 279 error = xfs_add_incompat_log_feature(mp, 2f6741323132a1 Darrick J. Wong 2021-07-09 280 XFS_SB_FEAT_INCOMPAT_LOG_ATOMIC_SWAP); 2f6741323132a1 Darrick J. Wong 2021-07-09 281 if (error) 2f6741323132a1 Darrick J. Wong 2021-07-09 282 goto drop_incompat; 2f6741323132a1 Darrick J. Wong 2021-07-09 283 2f6741323132a1 Darrick J. Wong 2021-07-09 284 xfs_warn(mp, 2f6741323132a1 Darrick J. Wong 2021-07-09 285 "EXPERIMENTAL atomic file range swap feature added. Use at your own risk!"); 2f6741323132a1 Darrick J. Wong 2021-07-09 286 2f6741323132a1 Darrick J. Wong 2021-07-09 287 return 0; 2f6741323132a1 Darrick J. Wong 2021-07-09 288 drop_incompat: 2f6741323132a1 Darrick J. Wong 2021-07-09 289 xlog_drop_incompat_feat(mp->m_log); 2f6741323132a1 Darrick J. Wong 2021-07-09 290 *enabled = false; 2f6741323132a1 Darrick J. Wong 2021-07-09 291 return error; 2f6741323132a1 Darrick J. Wong 2021-07-09 292 } 2f6741323132a1 Darrick J. Wong 2021-07-09 293 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
