Btrfs-progs: detect if the disk we are formatting is a ssd
authorJosef Bacik <jbacik@fusionio.com>
Sat, 19 Jan 2013 18:06:21 +0000 (13:06 -0500)
committerDavid Sterba <dsterba@suse.cz>
Wed, 23 Jan 2013 18:32:30 +0000 (19:32 +0100)
commit124053b1d9f7425b8a2dac02907222d99927e779
treedefb9f1c8409112bbdc82392f430115ffa0c57fe
parent5cdc0913dd2e7db37b948464e8cb22fd2982a65e
Btrfs-progs: detect if the disk we are formatting is a ssd

Patch rebased because of changes in mkfs.c but otherwise the same
as created by Josef Bacik

SSD's do not gain anything by having metadata DUP turned on.  The underlying
file system that is a part of all SSD's could easily map duplicate metadat
blocks into the same erase block which effectively eliminates the benefit of
duplicating the metadata on disk.  So detect if we are formatting a single
SSD drive and if we are do not use DUP.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Gene Czarcinski <gene@czarc.net>
Makefile
man/mkfs.btrfs.8.in
mkfs.c