All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
To: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Cc: hch@lst.de, sagi@grimberg.me, damien.lemoal@wdc.com,
	Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Subject: [PATCH V2 1/9] block: export __bio_iov_append_get_pages()
Date: Sun, 29 Nov 2020 19:29:01 -0800	[thread overview]
Message-ID: <20201130032909.40638-2-chaitanya.kulkarni@wdc.com> (raw)
In-Reply-To: <20201130032909.40638-1-chaitanya.kulkarni@wdc.com>

In this prep patch we exoprt the __bio_iov_append_get_pages() so that
NVMeOF target can use the core logic of building Zone Append bios for
REQ_OP_ZONE_APPEND without repeating the code.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 block/bio.c         | 3 ++-
 include/linux/bio.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/block/bio.c b/block/bio.c
index fa01bef35bb1..de356fa28315 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1033,7 +1033,7 @@ static int __bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)
 	return 0;
 }
 
-static int __bio_iov_append_get_pages(struct bio *bio, struct iov_iter *iter)
+int __bio_iov_append_get_pages(struct bio *bio, struct iov_iter *iter)
 {
 	unsigned short nr_pages = bio->bi_max_vecs - bio->bi_vcnt;
 	unsigned short entries_left = bio->bi_max_vecs - bio->bi_vcnt;
@@ -1079,6 +1079,7 @@ static int __bio_iov_append_get_pages(struct bio *bio, struct iov_iter *iter)
 	iov_iter_advance(iter, size - left);
 	return ret;
 }
+EXPORT_SYMBOL_GPL(__bio_iov_append_get_pages);
 
 /**
  * bio_iov_iter_get_pages - add user or kernel pages to a bio
diff --git a/include/linux/bio.h b/include/linux/bio.h
index c6d765382926..47247c1b0b85 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -446,6 +446,7 @@ bool __bio_try_merge_page(struct bio *bio, struct page *page,
 		unsigned int len, unsigned int off, bool *same_page);
 void __bio_add_page(struct bio *bio, struct page *page,
 		unsigned int len, unsigned int off);
+int __bio_iov_append_get_pages(struct bio *bio, struct iov_iter *iter);
 int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter);
 void bio_release_pages(struct bio *bio, bool mark_dirty);
 extern void bio_set_pages_dirty(struct bio *bio);
-- 
2.22.1


WARNING: multiple messages have this Message-ID (diff)
From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
To: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Cc: damien.lemoal@wdc.com, hch@lst.de,
	Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>,
	sagi@grimberg.me
Subject: [PATCH V2 1/9] block: export __bio_iov_append_get_pages()
Date: Sun, 29 Nov 2020 19:29:01 -0800	[thread overview]
Message-ID: <20201130032909.40638-2-chaitanya.kulkarni@wdc.com> (raw)
In-Reply-To: <20201130032909.40638-1-chaitanya.kulkarni@wdc.com>

In this prep patch we exoprt the __bio_iov_append_get_pages() so that
NVMeOF target can use the core logic of building Zone Append bios for
REQ_OP_ZONE_APPEND without repeating the code.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 block/bio.c         | 3 ++-
 include/linux/bio.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/block/bio.c b/block/bio.c
index fa01bef35bb1..de356fa28315 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1033,7 +1033,7 @@ static int __bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)
 	return 0;
 }
 
-static int __bio_iov_append_get_pages(struct bio *bio, struct iov_iter *iter)
+int __bio_iov_append_get_pages(struct bio *bio, struct iov_iter *iter)
 {
 	unsigned short nr_pages = bio->bi_max_vecs - bio->bi_vcnt;
 	unsigned short entries_left = bio->bi_max_vecs - bio->bi_vcnt;
@@ -1079,6 +1079,7 @@ static int __bio_iov_append_get_pages(struct bio *bio, struct iov_iter *iter)
 	iov_iter_advance(iter, size - left);
 	return ret;
 }
+EXPORT_SYMBOL_GPL(__bio_iov_append_get_pages);
 
 /**
  * bio_iov_iter_get_pages - add user or kernel pages to a bio
diff --git a/include/linux/bio.h b/include/linux/bio.h
index c6d765382926..47247c1b0b85 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -446,6 +446,7 @@ bool __bio_try_merge_page(struct bio *bio, struct page *page,
 		unsigned int len, unsigned int off, bool *same_page);
 void __bio_add_page(struct bio *bio, struct page *page,
 		unsigned int len, unsigned int off);
+int __bio_iov_append_get_pages(struct bio *bio, struct iov_iter *iter);
 int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter);
 void bio_release_pages(struct bio *bio, bool mark_dirty);
 extern void bio_set_pages_dirty(struct bio *bio);
-- 
2.22.1


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2020-11-30  3:30 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30  3:29 [PATCH 0/9] nvmet: add genblk ZBD backend Chaitanya Kulkarni
2020-11-30  3:29 ` Chaitanya Kulkarni
2020-11-30  3:29 ` Chaitanya Kulkarni [this message]
2020-11-30  3:29   ` [PATCH V2 1/9] block: export __bio_iov_append_get_pages() Chaitanya Kulkarni
2020-11-30  3:29 ` [PATCH V2 2/9] nvmet: add ZNS support for bdev-ns Chaitanya Kulkarni
2020-11-30  3:29   ` Chaitanya Kulkarni
2020-11-30 11:57   ` Damien Le Moal
2020-11-30 11:57     ` Damien Le Moal
2020-12-01  3:38     ` Chaitanya Kulkarni
2020-12-01  3:38       ` Chaitanya Kulkarni
2020-12-01  5:44       ` Damien Le Moal
2020-12-01  5:44         ` Damien Le Moal
2020-12-01 22:37         ` Chaitanya Kulkarni
2020-12-01 22:37           ` Chaitanya Kulkarni
2020-11-30 12:29   ` Johannes Thumshirn
2020-11-30 12:29     ` Johannes Thumshirn
2020-12-01  3:49     ` Chaitanya Kulkarni
2020-12-01  3:49       ` Chaitanya Kulkarni
2020-12-01  7:51       ` Johannes Thumshirn
2020-12-01  7:51         ` Johannes Thumshirn
2020-12-01 22:36         ` Chaitanya Kulkarni
2020-12-01 22:36           ` Chaitanya Kulkarni
2020-11-30  3:29 ` [PATCH V2 3/9] nvmet: trim down id-desclist to use req->ns Chaitanya Kulkarni
2020-11-30  3:29   ` Chaitanya Kulkarni
2020-11-30  3:29 ` [PATCH V2 4/9] nvmet: add NVME_CSI_ZNS in ns-desc for zbdev Chaitanya Kulkarni
2020-11-30  3:29   ` Chaitanya Kulkarni
2020-11-30  3:29 ` [PATCH V2 5/9] nvmet: add cns-cs-ctrl in id-ctrl for ZNS bdev Chaitanya Kulkarni
2020-11-30  3:29   ` Chaitanya Kulkarni
2020-11-30  3:29 ` [PATCH V2 6/9] nvmet: add cns-cs-ns " Chaitanya Kulkarni
2020-11-30  3:29   ` Chaitanya Kulkarni
2020-11-30  3:29 ` [PATCH V2 7/9] nvmet: add zns cmd effects to support zbdev Chaitanya Kulkarni
2020-11-30  3:29   ` Chaitanya Kulkarni
2020-11-30  3:29 ` [PATCH V2 8/9] nvmet: add zns bdev config support Chaitanya Kulkarni
2020-11-30  3:29   ` Chaitanya Kulkarni
2020-11-30 12:02   ` Damien Le Moal
2020-11-30 12:02     ` Damien Le Moal
2020-12-01  3:40     ` Chaitanya Kulkarni
2020-12-01  3:40       ` Chaitanya Kulkarni
2020-11-30  3:29 ` [PATCH V2 9/9] nvmet: add ZNS based I/O cmds handlers Chaitanya Kulkarni
2020-11-30  3:29   ` Chaitanya Kulkarni
2020-11-30  6:51 ` [PATCH 0/9] nvmet: add genblk ZBD backend Damien Le Moal
2020-11-30  6:51   ` Damien Le Moal
2020-12-01  3:42   ` Chaitanya Kulkarni
2020-12-01  3:42     ` Chaitanya Kulkarni

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=20201130032909.40638-2-chaitanya.kulkarni@wdc.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=damien.lemoal@wdc.com \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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.