From: kernel test robot <lkp@intel.com>
To: Satya Tangirala <satyat@google.com>,
"Theodore Y . Ts'o" <tytso@mit.edu>,
Jaegeuk Kim <jaegeuk@kernel.org>,
Eric Biggers <ebiggers@kernel.org>, Chao Yu <yuchao0@huawei.com>,
Chao Yu <chao@kernel.org>, Jens Axboe <axboe@kernel.dk>,
"Darrick J . Wong" <darrick.wong@oracle.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
linux-fscrypt@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-xfs@vger.kernel.org
Subject: Re: [PATCH v9 5/9] block: Make bio_iov_iter_get_pages() respect bio_required_sector_alignment()
Date: Sat, 5 Jun 2021 06:51:44 +0800 [thread overview]
Message-ID: <202106050654.2dIHanZf-lkp@intel.com> (raw)
In-Reply-To: <20210604210908.2105870-6-satyat@google.com>
[-- Attachment #1: Type: text/plain, Size: 5290 bytes --]
Hi Satya,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on block/for-next]
[also build test ERROR on ext4/dev f2fs/dev-test linus/master v5.13-rc4 next-20210604]
[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]
url: https://github.com/0day-ci/linux/commits/Satya-Tangirala/add-support-for-direct-I-O-with-fscrypt-using-blk-crypto/20210605-051023
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/eea1225f680da16dce01bfb2914b9e8b78de298d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Satya-Tangirala/add-support-for-direct-I-O-with-fscrypt-using-blk-crypto/20210605-051023
git checkout eea1225f680da16dce01bfb2914b9e8b78de298d
# save the attached .config to linux build tree
make W=1 ARCH=um SUBARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:14,
from include/asm-generic/bug.h:20,
from ./arch/um/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from block/bio.c:5:
block/bio.c: In function 'bio_iov_iter_get_pages':
>> block/bio.c:1131:10: error: implicit declaration of function 'bio_required_sector_alignment' [-Werror=implicit-function-declaration]
1131 | bio_required_sector_alignment(bio));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/math.h:14:46: note: in definition of macro '__round_mask'
14 | #define __round_mask(x, y) ((__typeof__(x))((y)-1))
| ^
block/bio.c:1130:20: note: in expansion of macro 'round_down'
1130 | aligned_sectors = round_down(bio_sectors(bio),
| ^~~~~~~~~~
cc1: some warnings being treated as errors
vim +/bio_required_sector_alignment +1131 block/bio.c
1083
1084 /**
1085 * bio_iov_iter_get_pages - add user or kernel pages to a bio
1086 * @bio: bio to add pages to
1087 * @iter: iov iterator describing the region to be added
1088 *
1089 * This takes either an iterator pointing to user memory, or one pointing to
1090 * kernel pages (BVEC iterator). If we're adding user pages, we pin them and
1091 * map them into the kernel. On IO completion, the caller should put those
1092 * pages. For bvec based iterators bio_iov_iter_get_pages() uses the provided
1093 * bvecs rather than copying them. Hence anyone issuing kiocb based IO needs
1094 * to ensure the bvecs and pages stay referenced until the submitted I/O is
1095 * completed by a call to ->ki_complete() or returns with an error other than
1096 * -EIOCBQUEUED. The caller needs to check if the bio is flagged BIO_NO_PAGE_REF
1097 * on IO completion. If it isn't, then pages should be released.
1098 *
1099 * The function tries, but does not guarantee, to pin as many pages as
1100 * fit into the bio, or are requested in @iter, whatever is smaller. If
1101 * MM encounters an error pinning the requested pages, it stops. Error
1102 * is returned only if 0 pages could be pinned. It also ensures that the number
1103 * of sectors added to the bio is aligned to bio_required_sector_alignment().
1104 *
1105 * It's intended for direct IO, so doesn't do PSI tracking, the caller is
1106 * responsible for setting BIO_WORKINGSET if necessary.
1107 */
1108 int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)
1109 {
1110 int ret = 0;
1111 unsigned int aligned_sectors;
1112
1113 if (iov_iter_is_bvec(iter)) {
1114 if (bio_op(bio) == REQ_OP_ZONE_APPEND)
1115 return bio_iov_bvec_set_append(bio, iter);
1116 return bio_iov_bvec_set(bio, iter);
1117 }
1118
1119 do {
1120 if (bio_op(bio) == REQ_OP_ZONE_APPEND)
1121 ret = __bio_iov_append_get_pages(bio, iter);
1122 else
1123 ret = __bio_iov_iter_get_pages(bio, iter);
1124 } while (!ret && iov_iter_count(iter) && !bio_full(bio, 0));
1125
1126 /*
1127 * Ensure that number of sectors in bio is aligned to
1128 * bio_required_sector_align()
1129 */
1130 aligned_sectors = round_down(bio_sectors(bio),
> 1131 bio_required_sector_alignment(bio));
1132 iov_iter_revert(iter, (bio_sectors(bio) - aligned_sectors) << SECTOR_SHIFT);
1133 bio_truncate(bio, aligned_sectors << SECTOR_SHIFT);
1134
1135 /* don't account direct I/O as memory stall */
1136 bio_clear_flag(bio, BIO_WORKINGSET);
1137 return bio->bi_vcnt ? 0 : ret;
1138 }
1139 EXPORT_SYMBOL_GPL(bio_iov_iter_get_pages);
1140
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 8635 bytes --]
next prev parent reply other threads:[~2021-06-04 22:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-04 21:08 [PATCH v9 0/9] add support for direct I/O with fscrypt using blk-crypto Satya Tangirala
2021-06-04 21:09 ` [PATCH v9 1/9] block: blk-crypto-fallback: handle data unit split across multiple bvecs Satya Tangirala
2021-06-04 21:09 ` [PATCH v9 2/9] block: blk-crypto: relax alignment requirements for bvecs in bios Satya Tangirala
2021-06-04 21:09 ` [PATCH v9 3/9] fscrypt: add functions for direct I/O support Satya Tangirala
2021-07-23 20:42 ` Eric Biggers
2021-06-04 21:09 ` [PATCH v9 4/9] direct-io: add support for fscrypt using blk-crypto Satya Tangirala
2021-06-04 21:09 ` [PATCH v9 5/9] block: Make bio_iov_iter_get_pages() respect bio_required_sector_alignment() Satya Tangirala
2021-06-04 22:51 ` kernel test robot [this message]
2021-06-05 2:55 ` kernel test robot
2021-07-23 21:33 ` Eric Biggers
2021-07-24 7:19 ` Christoph Hellwig
2021-06-04 21:09 ` [PATCH v9 6/9] iomap: support direct I/O with fscrypt using blk-crypto Satya Tangirala
2021-07-22 19:04 ` Darrick J. Wong
2021-06-04 21:09 ` [PATCH v9 7/9] ext4: " Satya Tangirala
2021-06-04 21:09 ` [PATCH v9 8/9] f2fs: " Satya Tangirala
2021-06-04 21:09 ` [PATCH v9 9/9] fscrypt: update documentation for direct I/O support Satya Tangirala
[not found] ` <CAF2Aj3h-Gt3bOxH4wXB7aeQ3jVzR3TEqd3uLsh4T9Q=e6W6iqQ@mail.gmail.com>
2021-07-22 14:48 ` [PATCH v9 0/9] add support for direct I/O with fscrypt using blk-crypto Eric Biggers
2021-08-04 8:26 ` Lee Jones
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=202106050654.2dIHanZf-lkp@intel.com \
--to=lkp@intel.com \
--cc=axboe@kernel.dk \
--cc=chao@kernel.org \
--cc=darrick.wong@oracle.com \
--cc=ebiggers@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=satyat@google.com \
--cc=tytso@mit.edu \
--cc=yuchao0@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).