public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: "Darrick J. Wong" <djwong@kernel.org>,
	"Christoph Hellwig" <hch@lst.de>, "Jens Axboe" <axboe@kernel.dk>,
	"Ulf Hansson" <ulf.hansson@linaro.org>,
	"Jan Lübbe" <jlu@pengutronix.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	linux-block@vger.kernel.org, linux-mmc@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] block: Make MMC respect REQ_NOUNMAP?
Date: Thu, 8 May 2025 07:59:51 +0200	[thread overview]
Message-ID: <20250508055951.GA28277@lst.de> (raw)
In-Reply-To: <4e1600a7-24d4-454a-87d6-6528b1c4c88d@pengutronix.de>

On Wed, May 07, 2025 at 06:24:34PM +0200, Ahmad Fatoum wrote:
>     blk_ioctl_zeroout
>         blkdev_issue_zeroout(..., BLKDEV_ZERO_NOUNMAP)
>             __blkdev_issue_write_zeroes(..., BLKDEV_ZERO_NOUNMAP)
> 	    submit_bio_wait(bio->bi_opf = REQ_NOUNMAP)
> 
> __REQ_NOUNMAP has comment saying 'do not free blocks when zeroing',
> but as shown above, TRIM allows the card to unmap the indicated region.

__REQ_NOUNMAP is a hint.  All the storage specs are a mess in this
area as they usually get the polarity wrong and/or just have very
vague semantics.  Also actually writing zeroes and not unmapping is
totally pointless on flash storage as it just increases PE cycles
for no good reason.


      reply	other threads:[~2025-05-08  5:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-07 16:24 [RFC] block: Make MMC respect REQ_NOUNMAP? Ahmad Fatoum
2025-05-08  5:59 ` Christoph Hellwig [this message]

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=20250508055951.GA28277@lst.de \
    --to=hch@lst.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=axboe@kernel.dk \
    --cc=djwong@kernel.org \
    --cc=jlu@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.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