Werner Fischer
2011-Jul-03 11:00 UTC
will mkfs.btrfs do an initial pre-discard for SSDs like mke2fs does for Ext4?
Hi all, are there any plans that future versions of mkfs.btrfs will do an initial pre-discard for SSDs? (AFAIK mkfs.btrfs does not do this currently) For Ext4, mke2fs does this with the -E discard option. From the mke2fs manpage: -E discard Attempt to discard blocks at mkfs time (discarding blocks initially is useful on solid state devices and sparse / thin-provisioned storage). When the device advertises that discard also zeroes data (any subsequent read after the discard and before write returns zero), then mark all not-yet-zeroed inode tables as zeroed. This significantly speeds up filesystem initialization. This is set as default. Best regards, Werner -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Fajar A. Nugraha
2011-Jul-03 11:53 UTC
Re: will mkfs.btrfs do an initial pre-discard for SSDs like mke2fs does for Ext4?
On Sun, Jul 3, 2011 at 6:00 PM, Werner Fischer <devlists@wefi.net> wrote:> Hi all, > > are there any plans that future versions of mkfs.btrfs will do an > initial pre-discard for SSDs? (AFAIK mkfs.btrfs does not do this > currently)It should already have it. That is, if you look in the right place commit e6bd18d8938986c997c45f0ea95b221d4edec095 Author: Christoph Hellwig <hch@lst.de> Date: Thu Apr 21 16:24:07 2011 -0400 btrfs-progs: add discard support to mkfs Discard the whole device before starting to create the filesystem structures. Modelled after similar support in mkfs.xfs. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com> IIRC it''s already in tmp branch of Chris'' btrfs-progs-unstable, but not in master (yet). -- Fajar -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Reasonably Related Threads
- [PATCH] mkfs: optimization and code cleanup
- [PATCH 0/2] Fix btrfs blocksize and bind mkfs.btrfs (RHBZ#807905).
- Re: Possible bug in mkfs.ext3
- How can binaries be different when package versions are identical? (mkfs.ext3 on CentOS 5.4)
- [BUG] Cannot Mount Btrfs Volume Created By mkfs.btrfs v0.18-26-g0030f1d