All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
To: linux-block@vger.kernel.org
Cc: colyli@suse.de, linux-bcache@vger.kernel.org,
	linux-btrace@vger.kernel.org, xen-devel@lists.xenproject.org,
	kent.overstreet@gmail.com, yuchao0@huawei.com,
	jaegeuk@kernel.org, damien.lemoal@wdc.com,
	konrad.wilk@oracle.com, roger.pau@citrix.com, bvanassche@acm.org,
	linux-scsi@vger.kernel.org,
	Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Subject: [PATCH V3 1/9] block: add a helper function to read nr_setcs
Date: Tue,  2 Jul 2019 10:42:27 -0700	[thread overview]
Message-ID: <20190702174236.3332-2-chaitanya.kulkarni@wdc.com> (raw)
In-Reply-To: <20190702174236.3332-1-chaitanya.kulkarni@wdc.com>

This patch introduces helper function to read the number of sectors
from struct block_device->bd_part member. For more details Please refer
to the comment in the include/linux/genhd.h for part_nr_sects_read().

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 include/linux/blkdev.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 592669bcc536..be7ee5a0b0dd 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1475,6 +1475,12 @@ static inline void put_dev_sector(Sector p)
 	put_page(p.v);
 }
 
+/* Helper function to read the bdev->bd_part->nr_sects */
+static inline sector_t bdev_nr_sects(struct block_device *bdev)
+{
+	return part_nr_sects_read(bdev->bd_part);
+}
+
 int kblockd_schedule_work(struct work_struct *work);
 int kblockd_schedule_work_on(int cpu, struct work_struct *work);
 int kblockd_mod_delayed_work_on(int cpu, struct delayed_work *dwork, unsigned long delay);
-- 
2.19.1


WARNING: multiple messages have this Message-ID (diff)
From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
To: linux-block@vger.kernel.org
Cc: damien.lemoal@wdc.com, linux-btrace@vger.kernel.org,
	bvanassche@acm.org, linux-scsi@vger.kernel.org,
	konrad.wilk@oracle.com,
	Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>,
	yuchao0@huawei.com, colyli@suse.de, linux-bcache@vger.kernel.org,
	jaegeuk@kernel.org, xen-devel@lists.xenproject.org,
	kent.overstreet@gmail.com, roger.pau@citrix.com
Subject: [PATCH V3 1/9] block: add a helper function to read nr_setcs
Date: Tue,  2 Jul 2019 10:42:27 -0700	[thread overview]
Message-ID: <20190702174236.3332-2-chaitanya.kulkarni@wdc.com> (raw)
In-Reply-To: <20190702174236.3332-1-chaitanya.kulkarni@wdc.com>

This patch introduces helper function to read the number of sectors
from struct block_device->bd_part member. For more details Please refer
to the comment in the include/linux/genhd.h for part_nr_sects_read().

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 include/linux/blkdev.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 592669bcc536..be7ee5a0b0dd 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1475,6 +1475,12 @@ static inline void put_dev_sector(Sector p)
 	put_page(p.v);
 }
 
+/* Helper function to read the bdev->bd_part->nr_sects */
+static inline sector_t bdev_nr_sects(struct block_device *bdev)
+{
+	return part_nr_sects_read(bdev->bd_part);
+}
+
 int kblockd_schedule_work(struct work_struct *work);
 int kblockd_schedule_work_on(int cpu, struct work_struct *work);
 int kblockd_mod_delayed_work_on(int cpu, struct delayed_work *dwork, unsigned long delay);
-- 
2.19.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

WARNING: multiple messages have this Message-ID (diff)
From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
To: linux-block@vger.kernel.org
Cc: damien.lemoal@wdc.com, linux-btrace@vger.kernel.org,
	bvanassche@acm.org, linux-scsi@vger.kernel.org,
	konrad.wilk@oracle.com,
	Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>,
	yuchao0@huawei.com, colyli@suse.de, linux-bcache@vger.kernel.org,
	jaegeuk@kernel.org, xen-devel@lists.xenproject.org,
	kent.overstreet@gmail.com, roger.pau@citrix.com
Subject: [Xen-devel] [PATCH V3 1/9] block: add a helper function to read nr_setcs
Date: Tue,  2 Jul 2019 10:42:27 -0700	[thread overview]
Message-ID: <20190702174236.3332-2-chaitanya.kulkarni@wdc.com> (raw)
In-Reply-To: <20190702174236.3332-1-chaitanya.kulkarni@wdc.com>

This patch introduces helper function to read the number of sectors
from struct block_device->bd_part member. For more details Please refer
to the comment in the include/linux/genhd.h for part_nr_sects_read().

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 include/linux/blkdev.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 592669bcc536..be7ee5a0b0dd 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1475,6 +1475,12 @@ static inline void put_dev_sector(Sector p)
 	put_page(p.v);
 }
 
+/* Helper function to read the bdev->bd_part->nr_sects */
+static inline sector_t bdev_nr_sects(struct block_device *bdev)
+{
+	return part_nr_sects_read(bdev->bd_part);
+}
+
 int kblockd_schedule_work(struct work_struct *work);
 int kblockd_schedule_work_on(int cpu, struct work_struct *work);
 int kblockd_mod_delayed_work_on(int cpu, struct delayed_work *dwork, unsigned long delay);
-- 
2.19.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

WARNING: multiple messages have this Message-ID (diff)
From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
To: linux-block@vger.kernel.org
Cc: colyli@suse.de, linux-bcache@vger.kernel.org,
	linux-btrace@vger.kernel.org, xen-devel@lists.xenproject.org,
	kent.overstreet@gmail.com, yuchao0@huawei.com,
	jaegeuk@kernel.org, damien.lemoal@wdc.com,
	konrad.wilk@oracle.com, roger.pau@citrix.com, bvanassche@acm.org,
	linux-scsi@vger.kernel.org,
	Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Subject: [PATCH V3 1/9] block: add a helper function to read nr_setcs
Date: Tue, 02 Jul 2019 17:42:27 +0000	[thread overview]
Message-ID: <20190702174236.3332-2-chaitanya.kulkarni@wdc.com> (raw)
In-Reply-To: <20190702174236.3332-1-chaitanya.kulkarni@wdc.com>

This patch introduces helper function to read the number of sectors
from struct block_device->bd_part member. For more details Please refer
to the comment in the include/linux/genhd.h for part_nr_sects_read().

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 include/linux/blkdev.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 592669bcc536..be7ee5a0b0dd 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1475,6 +1475,12 @@ static inline void put_dev_sector(Sector p)
 	put_page(p.v);
 }
 
+/* Helper function to read the bdev->bd_part->nr_sects */
+static inline sector_t bdev_nr_sects(struct block_device *bdev)
+{
+	return part_nr_sects_read(bdev->bd_part);
+}
+
 int kblockd_schedule_work(struct work_struct *work);
 int kblockd_schedule_work_on(int cpu, struct work_struct *work);
 int kblockd_mod_delayed_work_on(int cpu, struct delayed_work *dwork, unsigned long delay);
-- 
2.19.1

  reply	other threads:[~2019-07-02 17:42 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-02 17:42 [PATCH V3 0/9] block: use right accessor to read nr_sects Chaitanya Kulkarni
2019-07-02 17:42 ` Chaitanya Kulkarni
2019-07-02 17:42 ` [Xen-devel] " Chaitanya Kulkarni
2019-07-02 17:42 ` Chaitanya Kulkarni
2019-07-02 17:42 ` Chaitanya Kulkarni [this message]
2019-07-02 17:42   ` [PATCH V3 1/9] block: add a helper function to read nr_setcs Chaitanya Kulkarni
2019-07-02 17:42   ` [Xen-devel] " Chaitanya Kulkarni
2019-07-02 17:42   ` Chaitanya Kulkarni
2019-07-03  0:19   ` Minwoo Im
2019-07-03  0:19     ` Minwoo Im
2019-07-03  0:19     ` [Xen-devel] " Minwoo Im
2019-07-03  0:19     ` Minwoo Im
2019-07-03 15:03   ` Bart Van Assche
2019-07-03 15:03     ` Bart Van Assche
2019-07-03 15:03     ` [Xen-devel] " Bart Van Assche
2019-07-03 15:03     ` Bart Van Assche
2019-07-04  0:11     ` Chaitanya Kulkarni
2019-07-04  0:11       ` [Xen-devel] " Chaitanya Kulkarni
2019-07-02 17:42 ` [PATCH V3 2/9] blk-zoned: update blkdev_nr_zones() with helper Chaitanya Kulkarni
2019-07-02 17:42   ` Chaitanya Kulkarni
2019-07-02 17:42   ` [Xen-devel] " Chaitanya Kulkarni
2019-07-02 17:42   ` Chaitanya Kulkarni
2019-07-03  0:20   ` Minwoo Im
2019-07-03  0:20     ` Minwoo Im
2019-07-03  0:20     ` [Xen-devel] " Minwoo Im
2019-07-03  0:20     ` Minwoo Im
2019-07-02 17:42 ` [PATCH V3 3/9] blk-zoned: update blkdev_report_zone() " Chaitanya Kulkarni
2019-07-02 17:42   ` Chaitanya Kulkarni
2019-07-02 17:42   ` [Xen-devel] " Chaitanya Kulkarni
2019-07-02 17:42   ` Chaitanya Kulkarni
2019-07-03  0:21   ` Minwoo Im
2019-07-03  0:21     ` Minwoo Im
2019-07-03  0:21     ` [Xen-devel] " Minwoo Im
2019-07-03  0:21     ` Minwoo Im
2019-07-02 17:42 ` [PATCH V3 4/9] blk-zoned: update blkdev_reset_zones() " Chaitanya Kulkarni
2019-07-02 17:42   ` Chaitanya Kulkarni
2019-07-02 17:42   ` [Xen-devel] " Chaitanya Kulkarni
2019-07-02 17:42   ` Chaitanya Kulkarni
2019-07-03  0:23   ` Minwoo Im
2019-07-03  0:23     ` Minwoo Im
2019-07-03  0:23     ` [Xen-devel] " Minwoo Im
2019-07-03  0:23     ` Minwoo Im
2019-07-03  2:29     ` Chaitanya Kulkarni
2019-07-03  2:29       ` Chaitanya Kulkarni
2019-07-03  2:29       ` [Xen-devel] " Chaitanya Kulkarni
2019-07-03  2:29       ` Chaitanya Kulkarni
2019-07-03  5:25       ` Minwoo Im
2019-07-03  5:25         ` Minwoo Im
2019-07-03  5:25         ` [Xen-devel] " Minwoo Im
2019-07-03  5:25         ` Minwoo Im
2019-07-02 17:42 ` [PATCH V3 5/9] bcache: update cached_dev_init() " Chaitanya Kulkarni
2019-07-02 17:42   ` Chaitanya Kulkarni
2019-07-02 17:42   ` [Xen-devel] " Chaitanya Kulkarni
2019-07-02 17:42   ` Chaitanya Kulkarni
2019-07-02 17:42 ` [PATCH V3 6/9] f2fs: use helper in init_blkz_info() Chaitanya Kulkarni
2019-07-02 17:42   ` Chaitanya Kulkarni
2019-07-02 17:42   ` [Xen-devel] " Chaitanya Kulkarni
2019-07-02 17:42   ` Chaitanya Kulkarni
2019-07-02 17:42 ` [PATCH V3 7/9] blktrace: use helper in blk_trace_setup_lba() Chaitanya Kulkarni
2019-07-02 17:42   ` Chaitanya Kulkarni
2019-07-02 17:42   ` [Xen-devel] " Chaitanya Kulkarni
2019-07-02 17:42   ` Chaitanya Kulkarni
2019-07-02 17:42 ` [COMPILE TEST ONLY PATCH V3 8/9] target/pscsi: use helper in pscsi_get_blocks() Chaitanya Kulkarni
2019-07-02 17:42   ` Chaitanya Kulkarni
2019-07-02 17:42   ` [Xen-devel] " Chaitanya Kulkarni
2019-07-02 17:42   ` Chaitanya Kulkarni
2019-07-02 17:42 ` [COMPILE TEST ONLY PATCH V3 9/9] xen/blkback: use helper in vbd_sz() Chaitanya Kulkarni
2019-07-02 17:42   ` Chaitanya Kulkarni
2019-07-02 17:42   ` [Xen-devel] " Chaitanya Kulkarni
2019-07-02 17: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=20190702174236.3332-2-chaitanya.kulkarni@wdc.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=colyli@suse.de \
    --cc=damien.lemoal@wdc.com \
    --cc=jaegeuk@kernel.org \
    --cc=kent.overstreet@gmail.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-btrace@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    --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 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.