Linux block layer
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: John Garry <john.g.garry@oracle.com>
Cc: axboe@kernel.dk, hch@lst.de, martin.petersen@oracle.com,
	linux-block@vger.kernel.org, kbusch@kernel.org
Subject: Re: [PATCH v2 1/2] block: Read max write zeroes once for __blkdev_issue_write_zeroes()
Date: Thu, 15 Aug 2024 13:43:44 -0400	[thread overview]
Message-ID: <yq1a5hdsmva.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20240815163228.216051-2-john.g.garry@oracle.com> (John Garry's message of "Thu, 15 Aug 2024 16:32:27 +0000")


John,

> As reported in [0], we may get a hang when formatting a XFS FS on a RAID0
> drive.
>
> Commit 73a768d5f955 ("block: factor out a blk_write_zeroes_limit helper")
> changed __blkdev_issue_write_zeroes() to read the max write zeroes
> value in the loop. This is not safe as max write zeroes may change in
> value. Specifically for the case of [0], the value goes to 0, and we get
> an infinite loop.
>
> Lift the limit reading out of the loop.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering

  reply	other threads:[~2024-08-15 17:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-15 16:32 [PATCH v2 0/2] block: Fix __blkdev_issue_write_zeroes() limit handling John Garry
2024-08-15 16:32 ` [PATCH v2 1/2] block: Read max write zeroes once for __blkdev_issue_write_zeroes() John Garry
2024-08-15 17:43   ` Martin K. Petersen [this message]
2024-08-16 18:34   ` Nitesh Shetty
2024-08-17 15:33     ` John Garry
2024-08-19 15:15       ` Nitesh Shetty
2024-08-28  7:15   ` Shinichiro Kawasaki
2024-08-28  7:17     ` hch
2024-08-28  7:25       ` Shinichiro Kawasaki
2024-08-15 16:32 ` [PATCH v2 2/2] block: Drop NULL check in bdev_write_zeroes_sectors() John Garry
2024-08-15 17:43   ` Martin K. Petersen
2024-08-19 15:16   ` Nitesh Shetty
2024-08-19 15:49 ` [PATCH v2 0/2] block: Fix __blkdev_issue_write_zeroes() limit handling Jens Axboe

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=yq1a5hdsmva.fsf@ca-mkp.ca.oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=john.g.garry@oracle.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@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