From: Douglas Gilbert <dgilbert@interlog.com>
To: Bart Van Assche <bvanassche@acm.org>,
Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>,
linux-block@vger.kernel.org
Cc: colyli@suse.de, linux-bcache@vger.kernel.org,
linux-scsi@vger.kernel.org, linux-btrace@vger.kernel.org,
kent.overstreet@gmail.com, jaegeuk@kernel.org,
damien.lemoal@wdc.com
Subject: Re: [PATCH 1/8] block: add a helper function to read nr_setcs
Date: Thu, 13 Jun 2019 16:07:09 +0000 [thread overview]
Message-ID: <f8ab9587-309b-79a0-e6fc-f6683176f498@interlog.com> (raw)
In-Reply-To: <9abfc2b8-4496-db7a-fcbb-b52102a67f8e@acm.org>
On 2019-06-13 11:31 a.m., Bart Van Assche wrote:
> On 6/13/19 7:59 AM, Chaitanya Kulkarni wrote:
>> 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 | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
>> index 592669bcc536..1ae65107182a 100644
>> --- a/include/linux/blkdev.h
>> +++ b/include/linux/blkdev.h
>> @@ -1475,6 +1475,18 @@ 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)
>> +{
>> + sector_t nr_sects;
>> +
>> + rcu_read_lock();
>> + nr_sects = part_nr_sects_read(bdev->bd_part);
>> + rcu_read_unlock();
>> +
>> + return nr_sects;
>> +}
>> +
>> 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);
>>
>
> Please explain what makes you think that part_nr_sects_read() must be protected
> by an RCU read lock.
Dear reviewer,
Please rephrase the above sentence without the accusative tone.
Specifically, please do not use the phrase "what makes you think"
in this or any other code review. For example: "I believe that..."
is more accurate and less provocative.
Observation: as a Canadian citizen when crossing the US border I
believe contradicting a US border official with the phrase "what
makes you think ..." could lead to a rather bad outcome :-)
Please make review comments with that in mind.
Thanks.
Doug Gilbert
P.S. Do we have any Linux code-of-conduct for reviewers?
next prev parent reply other threads:[~2019-06-13 16:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 14:59 [PATCH 0/8] block: use right accessor to read nr_sects Chaitanya Kulkarni
2019-06-13 14:59 ` [PATCH 1/8] block: add a helper function to read nr_setcs Chaitanya Kulkarni
2019-06-13 15:31 ` Bart Van Assche
2019-06-13 16:07 ` Douglas Gilbert [this message]
2019-06-13 16:28 ` James Bottomley
2019-06-13 19:26 ` Douglas Gilbert
2019-06-13 20:29 ` James Bottomley
2019-06-13 16:07 ` Chaitanya Kulkarni
2019-06-13 14:59 ` [PATCH 2/8] blk-zoned: update blkdev_nr_zones() with helper Chaitanya Kulkarni
2019-06-13 14:59 ` [PATCH 3/8] blk-zoned: update blkdev_report_zone() " Chaitanya Kulkarni
2019-06-13 14:59 ` [PATCH 4/8] blk-zoned: update blkdev_reset_zones() " Chaitanya Kulkarni
2019-06-13 14:59 ` [PATCH 5/8] bcache: update cached_dev_init() " Chaitanya Kulkarni
2019-06-13 14:59 ` [COMPILE TESTED PATCH 6/8] target/pscsi: use helper in pscsi_get_blocks() Chaitanya Kulkarni
2019-06-13 15:36 ` Bart Van Assche
2019-06-13 16:08 ` Chaitanya Kulkarni
2019-06-13 14:59 ` [COMPILE TESTED PATCH 7/8] f2fs: use helper in init_blkz_info() Chaitanya Kulkarni
2019-06-13 14:59 ` [PATCH 8/8] blktrace: use helper in blk_trace_setup_lba() 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=f8ab9587-309b-79a0-e6fc-f6683176f498@interlog.com \
--to=dgilbert@interlog.com \
--cc=bvanassche@acm.org \
--cc=chaitanya.kulkarni@wdc.com \
--cc=colyli@suse.de \
--cc=damien.lemoal@wdc.com \
--cc=jaegeuk@kernel.org \
--cc=kent.overstreet@gmail.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 \
/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