linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Stefan Tauner <tauner@technikum-wien.at>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-ide@vger.kernel.org
Subject: Re: Questions (and a possible bug) regarding the ata_device_blacklist and ATA_HORKAGE_ZERO_AFTER_TRIM
Date: Tue, 12 Oct 2021 23:19:18 -0400	[thread overview]
Message-ID: <yq15yu1pr9h.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20210915183518.0947de73@legacy> (Stefan Tauner's message of "Wed, 15 Sep 2021 18:35:18 +0200")


Stefan,

> This is still the case (with Linux 5.10). I would have expected that
> to be non-zero for devices with ATA_HORKAGE_ZERO_AFTER_TRIM.

The short answer is that we have split things into two distinct
operations: Deallocating a block range and zeroing a block range. And as
a result, upper layers no longer have to know whether a discard is
deterministic or not. That is all handled at the bottom of the stack
where the requested operation is translated into something suitable for
the device in question.

Because of the semantic distinction between deallocating and zeroing a
block range, discard_zeroes_data always reports 0 on modern kernels.
This is done to make applications pick the zeroing operation over
discard when they want to clear a block range.

-- 
Martin K. Petersen	Oracle Linux Engineering

      reply	other threads:[~2021-10-13  3:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-26 13:04 Questions (and a possible bug) regarding the ata_device_blacklist and ATA_HORKAGE_ZERO_AFTER_TRIM Stefan Tauner
2019-09-26 22:01 ` Martin K. Petersen
2021-09-15 16:35   ` Stefan Tauner
2021-10-13  3:19     ` Martin K. Petersen [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=yq15yu1pr9h.fsf@ca-mkp.ca.oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=tauner@technikum-wien.at \
    /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;
as well as URLs for NNTP newsgroup(s).