Commit Graph

193 Commits (e9b5ff23eafffa37c1d7bab979f97b1a285556cb)

Author SHA1 Message Date
David Sterba 08f9acadab btrfs-progs: getopt, use symbolic name for argument requirements
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-04-08 17:39:51 +02:00
David Sterba 4074ae5f2b btrfs-progs: cleanup option index argument from getopt_long
We're not using it anywhere. The best practice is to add enums with
values > 255 for the long options, option index counting is error prone.

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-04-08 17:33:55 +02:00
David Sterba 39b3d7c77a btrfs-progs: print fs features filtered by a mask
mkfs and convert will not support the same features, -O will print only
the list according to the given mask.

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-04-07 19:25:16 +02:00
David Sterba 7ea86ad282 btrfs-progs: move feature parsing from mkfs to utils
We'll use them in convert as well. Move defines and the interface
functions to utils.*.

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-04-07 19:24:35 +02:00
David Sterba a297698edc btrfs-progs: mkfs, deprecate leafsize and clean up the code
Using the --leafsize will issue a warning. Replace leafsize with
nodesize in the mkfs-related code.

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-04-07 19:20:17 +02:00
David Sterba 45f9cf5001 btrfs-progs: mkfs, add required arguments to help strings
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-03-24 19:15:08 +01:00
David Sterba 3f312d500b btrfs-progs: mkfs, align help strings
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-03-24 19:14:06 +01:00
Sebastian Thorarensen 50580171cb btrfs-progs: mkfs: Move out some nodesize code
Move the constant DEFAULT_MKFS_LEAF_SIZE to utils.h and rename it to
BTRFS_MKFS_DEFAULT_NODE_SIZE for consistency. Move the function
check_leaf_or_node_size to utils.c and rename it to
btrfs_check_node_or_leaf_size.

Signed-off-by: Sebastian Thorarensen <sebth@naju.se>
[added btrfs_ prefix]
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-03-23 16:53:15 +01:00
Karel Zak 33f2d6b84d btrfs-progs: autoconf: use standard PACKAGE_* macros
- use standard PACKAGE_{NAME,VERSION,STRING,URL,...} autoconf macros
  rather than homemade BTRFS_BUILD_VERSION

- don't #include version.h, now the file is necessary for library API only

Note that "btrfs version" returns "btrfs-progs <version>" instead of
the original confusing "btrfs <version>".

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-01-28 18:00:58 +01:00
Dimitri John Ledkov e69e015634 btrfs-progs: drop feature defines from C files, in favour of CFLAGS defines
glibc 2.10+ (5+ years old) enables all the desired features:
_XOPEN_SOURCE 700, __XOPEN2K8, POSIX_C_SOURCE, DEFAULT_SOURCE; with a
single _GNU_SOURCE define in the makefile alone. For portability to
other libc implementations (e.g. dietlibc) _XOPEN_SOURCE=700 is also
defined.

This also resolves Debian bug report filed by Michael Tautschnig -
"Inconsistent use of _XOPEN_SOURCE results in conflicting
declarations". Whilst I was not able to reproduce the results, the
reported fact is that _XOPEN_SOURCE set to 500 in one set of files
(e.g. cmds-filesystem.c) generates/defines different struct stat from
other files (cmds-replace.c).

This patch thus cleans up all feature defines, and sets them at a
consistent level.

Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747969
Signed-off-by: Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-01-27 14:45:59 +01:00
David Sterba 2b7cdab425 btrfs-progs: make getopt tables static const
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-01-19 13:44:49 +01:00
David Sterba ecbf1339a6 btrfs-progs: cleanup, move getop long options close to their use
Move long_option defintions just before getopt_long everywhere.

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-01-19 13:30:06 +01:00
Merlijn Wajer c69854247b btrfs-progs: include headers required for musl-libc
This fixes various compilation errors where PATH_MAX and XATTR_SIZE_MAX
were missing. To my knowledge, this should have no bad side effects.

Signed-off-by: Merlijn Wajer <merlijn@wizzup.org>
Signed-off-by: David Sterba <dsterba@suse.cz>
2014-12-18 18:22:06 +01:00
David Sterba 6715de04d9 btrfs-progs: mkfs: make skinny-metadata default
According to public poll, this is desired and deemed to be safe. Feature
introduced in kernel 3.10 (Jun 2013).

Signed-off-by: David Sterba <dsterba@suse.cz>
2014-12-10 15:00:03 +01:00
Anand Jain 6345bbd5b4 btrfs-progs: mkfs should be consistent in calling register device
When we have one device we don't call register device.
(in fact not mandatory, but to make it consistent)
And when we have more than one we call register device.

reproducer:
Nothing in the kernel device list
cat /proc/fs/btrfs/devlist | egrep fsid | wc -l
0

mkfs.btrfs will automatically call register device when devices
is more than 1.

mkfs.btrfs -f /dev/sdb /dev/sdc
cat /proc/fs/btrfs/devlist | egrep fsid | wc -l
1

But it does not when there is only one device

mkfs.btrfs -f /dev/sdb
cat /proc/fs/btrfs/devlist | egrep fsid | wc -l
0

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2014-10-16 12:02:00 +02:00
David Sterba 9f2ff27df8 btrfs-progs: mkfs make --uuid require an argument
$ mkfs.btrfs --uuid 1234... /dev/sdx
Error: error checking 1234...  status: No such file or directory

Signed-off-by: David Sterba <dsterba@suse.cz>
2014-08-22 16:09:56 +02:00
David Sterba 515f8fa14a btrfs-progs: mkfs: remove experimental tag
Make it consistent with kernel status and documentation.

Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2014-08-22 15:07:03 +02:00
Anand Jain fcdd44470d btrfs-progs: define BTRFS_MKFS_SMALL_VOLUME_SIZE for small volume
mkfs cut of size '1024 * 1024 * 1024' to mark dev as small volume so to
force mixed group. Use a define for that.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2014-08-22 15:07:01 +02:00
Anand Jain 27d61fbcab btrfs-progs: dont break the string
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2014-08-22 15:07:00 +02:00
Qu Wenruo 18e2663db3 btrfs-progs: Add minimum device size check
Btrfs has global block reservation, so even mkfs.btrfs can execute
without problem, there is still a possibility that the filesystem can't
be mounted.
For example when mkfs.btrfs on a 8M file on x86_64 platform, kernel will
refuse to mount due to ENOSPC, since system block group takes 4M and
mixed block group takes 4M, and global block reservation will takes all
the 4M from mixed block group, which makes btrfs unable to create uuid
tree.

This patch will add minimum device size check before actually mkfs.
The minimum size calculation uses a simplified one:
minimum_size_for_each_dev = 2 * (system block group + global block rsv)
and global block rsv = leafsize << 10

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2014-08-22 14:43:11 +02:00
Eric Sandeen 85691ebeac btrfs-progs: mkfs: allow UUID specification at mkfs time
Allow the specification of the filesystem UUID at mkfs time.

Non-unique unique IDs are rejected.  This includes attempting
to re-mkfs with the same UUID; if you really want to do that,
you can mkfs with a new UUID, then re-mkfs with the one you
wanted.

(Implemented only for mkfs.btrfs, not btrfs-convert).

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
[converted help to asciidoc]
Signed-off-by: David Sterba <dsterba@suse.cz>
2014-08-22 14:39:32 +02:00
Holger Hoffstätte af0d2f8895 btrfs-progs: fix mkfs.btrfs segfault with --features option
The mkfs.btrfs --features long option takes an argument but does not
declare it. Consequently getopt does not allocate an argument, which
makes an unconditional strdup() crash during options parsing.
Fix by declaring the argument in the options alias array.

Signed-off-by: Holger Hoffstätte <holger.hoffstaette@googlemail.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2014-05-02 17:05:47 +02:00
Rakesh Pandit 091ba6ad98 Btrfs-progs: mkfs: remove ununsed parameters
Remove ununsed parameters since 71d6bd3c in create_raid_groups.

Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2014-05-02 17:05:43 +02:00
Li Yang dae7456c7f Btrfs-progs: mkfs: Remove 'zero_end =1' since it has been set to a value
In utils.c, zero_end is used as a parameter, should not force it to 1.
In mkfs.c, zero_end is set to 1 or 0(-b) at the beginning, should not
force it to 1 unconditionally.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2014-05-02 17:03:56 +02:00
Gui Hecheng 64200e4453 btrfs-progs: skip erroneous free before initialization
If the list is not initialized, don't try to free it.
Otherwise it will cause segmentfault.

Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
2014-03-21 09:51:31 -07:00
Gui Hecheng c543daa68b btrfs-progs: fix bug on mkfs with relative path specified
The bug accurs when exec:
	# mkfs.btrfs -r <a relative path> <device>
	(note: the path should be 'valid' correspond to your `pwd`)
error msg:
	$ scandir for <a relative path> failed: No such file...

o Replace strdup() with realpath() to get the correct scan path.
o fix memory leaks and adopt the "single return + goto out" pattern

Reported-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
2014-03-21 09:51:31 -07:00
Wang Shilong a2524a784d Btrfs-progs: mkfs: make sure we can deal with hard links with -r option
Steps to reproduce:
 # mkdir -p /tmp/test
 # touch /tmp/test/file
 # ln /tmp/test/file /tmp/test/hardlinks
 # mkfs.btrfs -f /dev/sda13 -r /tmp/test
 # btrfs check /dev/sda13

To deal with hard link, we must deal with inode with same inode id rather
than increase inode id by ourselves.

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
2014-03-21 09:51:31 -07:00
Wang Shilong 3bb703dcae Btrfs-progs: mkfs: don't create extent for an empty file
Steps to reproduce:
 # mkdir -p /tmp/test
 # touch /tmp/test/file
 # mkfs.btrfs -f /dev/sda13 -r /tmp/test
 # btrfs check /dev/sda13

For an empty file, don't create extent data for it.

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
2014-03-21 09:51:31 -07:00
Christophe Vu-Brugier b5fe148715 btrfs-progs: include <sys/xattr.h> instead of <attr/xattr.h>
The `btrfs` and `mkfs.btrfs` binaries are not linked against libattr
so the correct header to include is <sys/xattr.h>.

This fixes the build when attr header files are not installed.

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
2014-03-21 06:23:31 -07:00
Josef Bacik 147114581d Btrfs-progs: add support for the no holes incompat flag
This adds the flag to ctree.h, adds the feature option to mkfs to turn it on and
fixes fsck so it doesn't complain about missing hole extents in files when this
flag is set.

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
2014-01-31 08:22:23 -08:00
Anand Jain d894378932 btrfs-progs: handle error in the btrfs_prepare_device
this patch will handle the strerror reporting of the error instead of
printing errno,  and also replaced the BUG_ON with the error handling

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
2014-01-31 08:22:21 -08:00
Gui Hecheng 3cae13ee93 btrfs-progs: remove NULL-ptr judge before free for btrfs-progs
free(3) already checks the pointer for NULL, no need to do it
on your own. This patch make the change globally.

Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
2014-01-31 08:22:17 -08:00
Anand Jain 4956a16711 btrfs-progs: Turning ON incompat isn't an error
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
2014-01-31 08:22:10 -08:00
Liu Bo 53ee1bccf9 Btrfs-progs: fix the mismatch of extent buffer's space
Now we set @refs to 2 on creating a new extent buffer, meanwhile we
allocate the needed free space, but we don't give enough free_extent_buffer()
to reduce the eb's references to zero so that the eb can finally be freed,
so the problem is we has decrease the referene count of backrefs to zero, which
ends up releasing the space occupied by the eb, and this space can be allocated
again for something else(another eb or disk), usually a crash(core dump) will
occur, I've hit a crash in rb_insert() because another eb re-use the space while
the original one is floating around.

We should do the same thing as the kernel code does, it's necessary to initialize
@refs to 1 instead of 2, this helps us get rid of the above problem.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
2014-01-31 08:22:06 -08:00
Anand Jain e9ac73b441 btrfs-progs: for mixed group check opt before default raid profile is enforced
This fixes the regression introduced with the patch

    btrfs-progs: avoid write to the disk before sure to create fs

what happened with this patch is it missed the check to see if the
user has the option set before pushing the defaults.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-11-15 12:30:13 -05:00
David Sterba 9f0c53f574 btrfs-progs: mkfs: enable extended refs by default
The feature has been introduced in kernel 3.7 and enabling it by
default is desired.

All features enabled by default are marked as such in
'mkfs.btrfs -O list-all' output.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-11-14 12:21:17 -05:00
David Sterba 492fc44828 btrfs-progs: mkfs: extend -O syntax to disable features
A way of disabling features that are on by default in case it's not
wanted, eg. due to lack of support in the used kernel.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-11-14 12:21:17 -05:00
Chris Mason c652e4efb8 mkfs: change default metadata blocksize to 16KB
16KB is faster and leads to less metadata fragmentation in almost all
workloads.  It does slightly increase lock contention on the root nodes
in some workloads, but that is best dealt with by adding more subvolumes
(for now).

This uses 16KB or the page size, whichever is bigger.  If you're doing a
mixed block group mkfs, it uses the sectorsize instead.

Since the kernel refuses to mount a mixed block group FS where the
metadata leaf size doesn't match the data sectorsize, this also adds a
similar check during mkfs.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-11-08 13:51:52 -05:00
Eric Sandeen 249b93b5ef btrfs-progs: don't leak buffer on add_file_items() error
add_file_items() leaked "buffer" on this error return.
Free it first.

Resolves-Coverity-CID: 1125937
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-11-07 16:10:41 -05:00
Josef Bacik 4735d0bb82 Btrfs-progs: rework open_ctree to take flags, add a new one V2
So I needed to add a flag to not try to read block groups when doing
--init-extent-tree since we could hang there, but that meant adding a whole
other 0/1 type flag to open_ctree_fs_info.  So instead I've converted it all
over to using a flags setting and added the flag that I needed.  This has been
tested with xfstests and make test.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-11-07 16:10:40 -05:00
Chris Mason d1570a0618 mkfs: fix mkfs -r to properly allocate space
mkfs -r wasn't creating chunks properly, making it very difficult to
allocate space for anything except tiny filesystems.

This changes it around to use more of the generic infrastructure, and
to do actual logical->physical block number translation.

It also allocates space to the files in smaller extents (max 1MB), which
keeps the allocator from trying to allocate an extent bigger than a
single chunk.

It doesn't quite support multi-device mkfs -r yet, but is much closer.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-10-16 10:42:53 -04:00
David Sterba 15ac848f8a btrfs-progs: use better name for nodiscard variable and flip the logic
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-10-16 08:20:43 -04:00
Chris West (Faux) cddbab982d btrfs-progs: fix -Wmissing-noreturn
Signed-off-by: "Chris West (Faux)" <git@goeswhere.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-10-16 08:20:43 -04:00
Hidetoshi Seto 49fef6fc53 btrfs-progs: error if device have no space to make primary chunks
The previous patch works fine if the size of specified volume to mkfs
is less than 4MB. However usually btrfs requires more than 4MB to work,
and the minimum preferred size is depending on the raid setting etc.

This patch let mkfs print error message if it cannot allocate one of
chunks should be there at first.

 [before]
  # truncate --size=4500K testfile
  # ./mkfs.btrfs -f testfile
   :
  SMALL VOLUME: forcing mixed metadata/data groups
  mkfs.btrfs: mkfs.c:84: make_root_dir: Assertion `!(ret)' failed.
  Aborted (core dumped)

 [After]
  # truncate --size=4500K testfile
  # ./mkfs.btrfs -f testfile
   :
  SMALL VOLUME: forcing mixed metadata/data groups
  no space to alloc data/metadata chunk
  failed to setup the root directory

TBD is calculate minimum size for setting and put it in the error
message to let user know how large amount of volume is required.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-10-16 08:20:42 -04:00
Hidetoshi Seto f9d102efdc btrfs-progs: error if device for mkfs is too small
Eric pointed out that mkfs abort if specified volume is too small:

  # truncate --size=2m testfile
  # ./mkfs.btrfs testfile
   :
  SMALL VOLUME: forcing mixed metadata/data groups
  mkfs.btrfs: volumes.c:852: btrfs_alloc_chunk: Assertion `!(ret)' failed.
  Aborted (core dumped)

As the first step to fix problems around there, let mkfs to report
error if the size of target volume is less than the size of the first
system block group, BTRFS_MKFS_SYSTEM_GROUP_SIZE (= 4MB).

Reported-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-10-16 08:20:42 -04:00
Gui Hecheng 28abed7b0f btrfs-progs: local variable memory freed
The local probe variable in is_ssd() freed upon unsuccessful return;
The local dir_head list in make_image() freed upon unsuccessful return.

Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-10-16 08:20:42 -04:00
Wang Shilong 36dcac288e Btrfs-progs: fix compile warning in is_ssd()
mkfs.c: In function ‘is_ssd’:
mkfs.c:1168:26: warning: ignoring return value of ‘blkid_devno_to_wholedisk’,
declared with attribute warn_unused_result [-Wunused-result]
  blkid_devno_to_wholedisk(devno, wholedisk, sizeof(wholedisk), NULL);

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-10-16 08:20:03 -04:00
Anand Jain cdbc107292 btrfs-progs: mkfs should check for small vol well before
This fix the regression introduced by 830427d
that it no more creates the FS if disk is small
and if no mixed option is provided.
This patch will bring it to the original design
which will force mixed profile when disk is small
and go ahead to create the FS.

Which also means that before we open the device
for the write we should also check if disk is small.

v2: fixes the checkpatch.pl warnings

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-10-16 08:20:03 -04:00
Anand Jain 71d6bd3c8d btrfs-progs: avoid write to the disk before sure to create fs
This patch provides fix for the following bug,

When mkfs.btrfs fails the disks shouldn't be written.
------------
btrfs fi show /dev/sdb
Label: none  uuid: 60fb76f4-3b4d-4632-a7da-6a44dea5573d
        Total devices 1 FS bytes used 24.00KiB
        devid    1 size 2.00GiB used 20.00MiB path /dev/sdb

mkfs.btrfs -dsingle -mraid1 /dev/sdb -f
::
unable to create FS with metadata profile 16 (have 1 devices)

btrfs fi show /dev/sdb
Label: none  uuid: 2da2179d-ecb1-4a4e-a44d-e7613a08c18d
        Total devices 1 FS bytes used 24.00KiB
        devid    1 size 2.00GiB used 20.00MiB path /dev/sdb
-------------

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-10-16 08:20:03 -04:00
Filipe David Borba Manana d608d404c3 Btrfs-progs: mkfs can now create fs with skinny extents
Before this change, passing -O skinny-metadata to mkfs.btrfs would
only set the skinny metadata incompat flag in the super block after
the filesystem was created. This change makes mkfs.btrfs directly
create a filesystem with only skinny extents for metadata.

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:41:13 +02:00