From: John Garry <john.g.garry@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-block@vger.kernel.org, linux-raid@vger.kernel.org,
axboe@kernel.dk, martin.petersen@oracle.com
Subject: Re: [bug report] raid0 array mkfs.xfs hang
Date: Thu, 15 Aug 2024 07:19:50 +0100 [thread overview]
Message-ID: <b7f5db41-5995-4221-b2c4-4faa48fd1fd8@oracle.com> (raw)
In-Reply-To: <20240815055221.GA13120@lst.de>
On 15/08/2024 06:52, Christoph Hellwig wrote:
> On Wed, Aug 14, 2024 at 03:00:06PM +0100, John Garry wrote:
>> - __blkdev_issue_write_zeroes(bdev, sector, nr_sects, gfp, &bio,
>> flags);
>> + __blkdev_issue_write_zeroes(bdev, sector, nr_sects, gfp, &bio,
>> flags, limit);
>
> Please fix the overly long line while touching this.
>
>> {
>> +
>> + sector_t limit = bio_write_zeroes_limit(bdev);
>> if (bdev_read_only(bdev))
>> return -EPERM;
>
> Can you add a comment explaining why the limit is read once for future
> readers?
>
Yes, I was going to do that.
> Also please keep an empty line after the variable declaration
> instead of before it.
ok
BTW, on a slightly related topic, why is bdev_write_zeroes_sectors()
seemingly the only bdev helper which checks bdev_get_queue() return value:
static inline unsigned int bdev_write_zeroes_sectors(struct block_device
*bdev)
{
struct request_queue *q = bdev_get_queue(bdev);
if (q)
return q->limits.max_write_zeroes_sectors;
return 0;
}
According to the comment in bdev_get_queue(), it never is never NULL.
next prev parent reply other threads:[~2024-08-15 6:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 17:12 [bug report] raid0 array mkfs.xfs hang John Garry
2024-08-12 14:50 ` John Garry
2024-08-14 14:00 ` John Garry
2024-08-14 14:46 ` Keith Busch
2024-08-14 14:52 ` Martin K. Petersen
2024-08-14 17:25 ` John Garry
2024-08-15 5:42 ` Christoph Hellwig
2024-08-15 5:52 ` Christoph Hellwig
2024-08-15 6:19 ` John Garry [this message]
2024-08-15 6:21 ` Christoph Hellwig
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=b7f5db41-5995-4221-b2c4-4faa48fd1fd8@oracle.com \
--to=john.g.garry@oracle.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=martin.petersen@oracle.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