* [djwong-xfs:vectorized-scrub 112/303] fs/xfs/xfs_xchgrange.c:267 xfs_xchg_range_grab_log_assist() warn: missing error code 'error'
@ 2021-08-17 11:22 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-17 11:22 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 5639 bytes --]
CC: kbuild-all(a)lists.01.org
CC: "Darrick J. Wong" <darrick.wong@oracle.com>
CC: linux-kernel(a)vger.kernel.org
TO: "Darrick J. Wong" <djwong@kernel.org>
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 <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
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/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32418 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-17 11:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17 11:22 [djwong-xfs:vectorized-scrub 112/303] fs/xfs/xfs_xchgrange.c:267 xfs_xchg_range_grab_log_assist() warn: missing error code 'error' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.