linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ric Wheeler <ricwheeler@gmail.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Eric Sandeen <sandeen@redhat.com>,
	Lukas Czerner <lczerner@redhat.com>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH] e2fsck: Discard free data and inode blocks.
Date: Fri, 22 Oct 2010 13:14:12 -0400	[thread overview]
Message-ID: <4CC1C664.90109@gmail.com> (raw)
In-Reply-To: <yq18w1qp3bl.fsf@sermon.lab.mkp.net>

  On 10/22/2010 01:03 PM, Martin K. Petersen wrote:
>>>>>> "Ric" == Ric Wheeler<ricwheeler@gmail.com>  writes:
>>> so we're not depending on it zeroing blocks, we're just depending on
>>> it advertising correctly whether or not it -does- zero.
> If the relevant bits are set (ATA: DRAT and RZAT, SCSI: TPRZ) we'll set
> the bdev's discard_zeroes_data flag.
>
> [root@test ~]# lsscsi | grep SSD | awk '{ print $7 }'
> /dev/sde
> [root@test ~]# grep . /sys/block/sde/queue/discard_zeroes_data
> 1
>
> The relevant ioctl is BLKDISCARDZEROES.
>
>
> Ric>  I think that ATA devices have historically not done this correctly,
>
> I'm only aware of one drive that advertised RZAT and got it wrong. I
> believe a firmware update fixed it.
>
> Generally we assume that if the firmware writers go through the effort
> of reporting things correctly then they have also implemented the
> feature. We have quite a few sanity checks in place in libata so we
> won't trigger if the firmware guys just put all ones in a word, for
> instance. There are several things that need to line up for us to
> actually set the discard flags.
>
>
> PS. http://oss.oracle.com/~mkp/docs/linux-advanced-storage.pdf
>

Hi Martin,

I think that the T13 people are still reworking (or have just finished?) the 
spec. For example,

http://www.t13.org/documents/UploadedDocuments/docs2010/e09158r2-Trim_Clarifications.pdf

has more detail on how to interpret those bits.  I certainly cannot claim to 
have followed all of this recently, but do recall that early on the ATA devices 
specifically had various behaviors that caused concern.

Ric


  reply	other threads:[~2010-10-22 17:14 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21 14:15 [PATCH] e2fsck: Discard free data and inode blocks Lukas Czerner
2010-10-21 18:07 ` Andreas Dilger
2010-10-22  9:12   ` Lukas Czerner
2010-10-22 11:30     ` Ric Wheeler
2010-10-22 11:43       ` Lukas Czerner
2010-10-22 14:12         ` Ric Wheeler
2010-10-22 14:32           ` Lukas Czerner
2010-10-22 14:46             ` Ric Wheeler
2010-10-22 15:37               ` Eric Sandeen
2010-10-22 15:41                 ` Ric Wheeler
2010-10-22 17:03                   ` Martin K. Petersen
2010-10-22 17:14                     ` Ric Wheeler [this message]
2010-10-22 17:29                       ` Martin K. Petersen
2010-10-22 18:23                     ` Eric Sandeen
2010-10-22 17:50               ` Andreas Dilger
2010-10-22 18:01                 ` Lukas Czerner
2010-10-22 18:17                   ` Andreas Dilger
2010-10-22 18:23                     ` Ric Wheeler
2010-10-22 21:19                       ` Martin K. Petersen
2010-10-22 18:29                 ` Eric Sandeen
2010-10-22 21:01                 ` Martin K. Petersen
2010-10-22 18:00             ` Andreas Dilger
2010-10-22 18:27               ` Eric Sandeen
2010-10-22 18:31                 ` Lukas Czerner
  -- strict thread matches above, loose matches on Subject: below --
2010-10-11 10:37 Lukas Czerner

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=4CC1C664.90109@gmail.com \
    --to=ricwheeler@gmail.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sandeen@redhat.com \
    --cc=tytso@mit.edu \
    /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).