Re: [PATCH] e2fsck: Discard free data and inode blocks.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 On 10/22/2010 01:03 PM, Martin K. Petersen wrote:
"Ric" == Ric Wheeler<ricwheeler@xxxxxxxxx>  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

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux