From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: fs/xfs/xfs_log_recover.c:173:5-23: opportunity for str_write_read(op == REQ_OP_WRITE)
Date: Thu, 28 Nov 2024 16:32:25 +0800 [thread overview]
Message-ID: <202411281626.NpBKMKT8-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Christoph Hellwig <hch@lst.de>
CC: "Darrick J. Wong" <darrick.wong@oracle.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b86545e02e8c22fb89218f29d381fa8e8b91d815
commit: 6ad5b3255b9e3d6d94154738aacd5119bf9c8f6e xfs: use bios directly to read and write the log recovery buffers
date: 5 years ago
:::::: branch date: 10 hours ago
:::::: commit date: 5 years ago
config: x86_64-randconfig-104-20241115 (https://download.01.org/0day-ci/archive/20241128/202411281626.NpBKMKT8-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
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>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202411281626.NpBKMKT8-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> fs/xfs/xfs_log_recover.c:173:5-23: opportunity for str_write_read(op == REQ_OP_WRITE)
vim +173 fs/xfs/xfs_log_recover.c
076e6acb8f0d95 Christoph Hellwig 2009-03-16 145
6ad5b3255b9e3d Christoph Hellwig 2019-06-28 146 static int
6ad5b3255b9e3d Christoph Hellwig 2019-06-28 147 xlog_do_io(
9a8d2fdbb47aaa Mark Tinguely 2012-06-14 148 struct xlog *log,
^1da177e4c3f41 Linus Torvalds 2005-04-16 149 xfs_daddr_t blk_no,
6ad5b3255b9e3d Christoph Hellwig 2019-06-28 150 unsigned int nbblks,
6ad5b3255b9e3d Christoph Hellwig 2019-06-28 151 char *data,
6ad5b3255b9e3d Christoph Hellwig 2019-06-28 152 unsigned int op)
^1da177e4c3f41 Linus Torvalds 2005-04-16 153 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 154 int error;
^1da177e4c3f41 Linus Torvalds 2005-04-16 155
99c265950b55f1 Brian Foster 2017-10-26 156 if (!xlog_verify_bp(log, blk_no, nbblks)) {
99c265950b55f1 Brian Foster 2017-10-26 157 xfs_warn(log->l_mp,
99c265950b55f1 Brian Foster 2017-10-26 158 "Invalid log block/length (0x%llx, 0x%x) for buffer",
99c265950b55f1 Brian Foster 2017-10-26 159 blk_no, nbblks);
ff30a6221d95b6 Alex Elder 2010-04-13 160 XFS_ERROR_REPORT(__func__, XFS_ERRLEVEL_HIGH, log->l_mp);
2451337dd04390 Dave Chinner 2014-06-25 161 return -EFSCORRUPTED;
3228149ceb8b04 Dave Chinner 2009-01-22 162 }
3228149ceb8b04 Dave Chinner 2009-01-22 163
69ce58f08a3c45 Alex Elder 2010-04-20 164 blk_no = round_down(blk_no, log->l_sectBBsize);
69ce58f08a3c45 Alex Elder 2010-04-20 165 nbblks = round_up(nbblks, log->l_sectBBsize);
^1da177e4c3f41 Linus Torvalds 2005-04-16 166 ASSERT(nbblks > 0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 167
6ad5b3255b9e3d Christoph Hellwig 2019-06-28 168 error = xfs_rw_bdev(log->l_targ->bt_bdev, log->l_logBBstart + blk_no,
6ad5b3255b9e3d Christoph Hellwig 2019-06-28 169 BBTOB(nbblks), data, op);
6ad5b3255b9e3d Christoph Hellwig 2019-06-28 170 if (error && !XFS_FORCED_SHUTDOWN(log->l_mp)) {
6ad5b3255b9e3d Christoph Hellwig 2019-06-28 171 xfs_alert(log->l_mp,
6ad5b3255b9e3d Christoph Hellwig 2019-06-28 172 "log recovery %s I/O error at daddr 0x%llx len %d error %d",
6ad5b3255b9e3d Christoph Hellwig 2019-06-28 @173 op == REQ_OP_WRITE ? "write" : "read",
6ad5b3255b9e3d Christoph Hellwig 2019-06-28 174 blk_no, nbblks, error);
6ad5b3255b9e3d Christoph Hellwig 2019-06-28 175 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 176 return error;
^1da177e4c3f41 Linus Torvalds 2005-04-16 177 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 178
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-11-28 8:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-28 8:32 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-12-02 14:33 fs/xfs/xfs_log_recover.c:173:5-23: opportunity for str_write_read(op == REQ_OP_WRITE) kernel test robot
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=202411281626.NpBKMKT8-lkp@intel.com \
--to=lkp@intel.com \
--cc=julia.lawall@inria.fr \
--cc=oe-kbuild@lists.linux.dev \
/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 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.