From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Chris Zankel <chris@zankel.net>,
Max Filippov <jcmvbkbc@gmail.com>,
Justin Sanders <justin@coraid.com>,
Philipp Reisner <philipp.reisner@linbit.com>,
Lars Ellenberg <lars.ellenberg@linbit.com>,
Denis Efremov <efremov@linux.com>,
Minchan Kim <minchan@kernel.org>, Nitin Gupta <ngupta@vflare.org>,
Coly Li <colyli@suse.de>, Dan Williams <dan.j.williams@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
linux-xtensa@linux-xtensa.org, linux-block@vger.kernel.org,
drbd-dev@lists.linbit.com, linux-bcache@vger.kernel.org,
nvdimm@lists.linux.dev
Subject: [PATCH 01/10] iss-simdisk: use bvec_kmap_local in simdisk_submit_bio
Date: Thu, 3 Mar 2022 14:18:56 +0300 [thread overview]
Message-ID: <20220303111905.321089-2-hch@lst.de> (raw)
In-Reply-To: <20220303111905.321089-1-hch@lst.de>
Using local kmaps slightly reduces the chances to stray writes, and
the bvec interface cleans up the code a little bit.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
---
arch/xtensa/platforms/iss/simdisk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/xtensa/platforms/iss/simdisk.c b/arch/xtensa/platforms/iss/simdisk.c
index 8eb6ad1a3a1de..0f0e0724397f4 100644
--- a/arch/xtensa/platforms/iss/simdisk.c
+++ b/arch/xtensa/platforms/iss/simdisk.c
@@ -108,13 +108,13 @@ static void simdisk_submit_bio(struct bio *bio)
sector_t sector = bio->bi_iter.bi_sector;
bio_for_each_segment(bvec, bio, iter) {
- char *buffer = kmap_atomic(bvec.bv_page) + bvec.bv_offset;
+ char *buffer = bvec_kmap_local(&bvec);
unsigned len = bvec.bv_len >> SECTOR_SHIFT;
simdisk_transfer(dev, sector, len, buffer,
bio_data_dir(bio) == WRITE);
sector += len;
- kunmap_atomic(buffer);
+ kunmap_local(buffer);
}
bio_endio(bio);
--
2.30.2
next prev parent reply other threads:[~2022-03-03 11:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 11:18 remove opencoded kmap of bio_vecs v2 Christoph Hellwig
2022-03-03 11:18 ` Christoph Hellwig [this message]
2022-03-03 14:48 ` [PATCH 01/10] iss-simdisk: use bvec_kmap_local in simdisk_submit_bio Max Filippov
2022-03-04 19:29 ` Jens Axboe
2022-03-03 11:18 ` [PATCH 02/10] aoe: use bvec_kmap_local in bvcpy Christoph Hellwig
2022-03-03 11:18 ` [PATCH 03/10] zram: use memcpy_to_bvec in zram_bvec_read Christoph Hellwig
2022-03-03 11:18 ` [PATCH 04/10] zram: use memcpy_from_bvec in zram_bvec_write Christoph Hellwig
2022-03-03 11:19 ` [PATCH 05/10] nvdimm-blk: use bvec_kmap_local in nd_blk_rw_integrity Christoph Hellwig
2022-03-03 11:19 ` [PATCH 06/10] nvdimm-btt: use bvec_kmap_local in btt_rw_integrity Christoph Hellwig
2022-03-04 3:05 ` Ira Weiny
2022-03-03 11:19 ` [PATCH 07/10] bcache: use bvec_kmap_local in bio_csum Christoph Hellwig
2022-03-04 3:06 ` Ira Weiny
2022-03-05 14:02 ` Coly Li
2022-03-03 11:19 ` [PATCH 08/10] drbd: use bvec_kmap_local in drbd_csum_bio Christoph Hellwig
2022-03-03 11:19 ` [PATCH 09/10] drbd: use bvec_kmap_local in recv_dless_read Christoph Hellwig
2022-03-03 11:19 ` [PATCH 10/10] floppy: use memcpy_{to,from}_bvec Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2022-02-22 15:51 remove opencoded kmap of bio_vecs Christoph Hellwig
2022-02-22 15:51 ` [PATCH 01/10] iss-simdisk: use bvec_kmap_local in simdisk_submit_bio Christoph Hellwig
2022-03-01 0:30 ` Ira Weiny
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=20220303111905.321089-2-hch@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=chris@zankel.net \
--cc=colyli@suse.de \
--cc=dan.j.williams@intel.com \
--cc=drbd-dev@lists.linbit.com \
--cc=efremov@linux.com \
--cc=ira.weiny@intel.com \
--cc=jcmvbkbc@gmail.com \
--cc=justin@coraid.com \
--cc=lars.ellenberg@linbit.com \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-xtensa@linux-xtensa.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=nvdimm@lists.linux.dev \
--cc=philipp.reisner@linbit.com \
--cc=vishal.l.verma@intel.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