[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yq18w1qp3bl.fsf@sermon.lab.mkp.net>
Date: Fri, 22 Oct 2010 13:03:42 -0400
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: Ric Wheeler <ricwheeler@...il.com>
Cc: Eric Sandeen <sandeen@...hat.com>,
Lukas Czerner <lczerner@...hat.com>,
Andreas Dilger <adilger.kernel@...ger.ca>,
linux-ext4@...r.kernel.org, tytso@....edu
Subject: Re: [PATCH] e2fsck: Discard free data and inode blocks.
>>>>> "Ric" == Ric Wheeler <ricwheeler@...il.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@...t ~]# lsscsi | grep SSD | awk '{ print $7 }'
/dev/sde
[root@...t ~]# 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
--
Martin K. Petersen Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists