Commit Graph

973 Commits (1eb159a295261c56d14b962eb3d4763f8ce38807)
 

Author SHA1 Message Date
Zach Brown 1eb159a295 btrfs-progs: fix unaligned compat endian warnings
The _una_ struct's entire job is to pass an argument to le*_to_cpu.  So
it's a little embarassing that it uses a native cpu types and generates
endian warnings.

ctree.h:1616:1: warning: incorrect type in assignment (different base types)
ctree.h:1616:1:    expected unsigned long long [unsigned] [usertype] x
ctree.h:1616:1:    got restricted __le64 [usertype] <noident>

Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:41:09 +02:00
Zach Brown d1dc091980 btrfs-progs: make many private symbols static
Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:41:08 +02:00
Zach Brown 66253a8183 btrfs-progs: fix qgroup realloc inheritance
qgroup.c:82:23: warning: memcpy with byte count of 0
qgroup.c:83:23: warning: memcpy with byte count of 0

The inheritance wasn't copying qgroups[] because a confused sizeof()
gave 0 byte memcpy()s.  It's been like this for the year since it was
merged, so I guess this isn't a very important thing to do :).

Signed-off-by: Zach Brown <zab@redhat.com>
Reviewed-by: Arne Jansen <sensille@gmx.net>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:41:07 +02:00
Zach Brown 73043664dc btrfs-progs: fix in-place byte swapping
Storing fixed-endian values in native cpu types defeats the purpose of
using sparse endian types to find endian conversion bugs.

Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:41:06 +02:00
Zach Brown 47c072c2d8 btrfs-progs: fix extent key endian bug in repair
Extents rebuilt from backrefs can have their objectid mangled.  The code
tried to build a disk_key by hand and got the swabbing backwards.

Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:41:06 +02:00
Zach Brown 2cd95f945a btrfs-progs: fix endian bugs in chunk rebuilding
A disk_key was set by hand instead of using the endian helpers.

I *think* the second one is just a typo.  The chunk's num_stripes was
already initialized from the record, but it's le16.  So we'll set the
item's size based on the record's native num_stripes.

Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:41:05 +02:00
Zach Brown 51c5811583 btrfs-print: define void function args
This silences (reasonable) sparse warnings of the form:

	warning: non-ANSI function declaration of ..

Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:41:04 +02:00
Zach Brown fd074864c4 btrfs-progs: remove variable length stack arrays
sparse hates variable length array definitions on the stack:

 btrfs-show-super.c:155:21: warning: Variable length array is used.

And it's right to.  They're a fragile construct that doesn't handle bad
input well at all.

Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:41:03 +02:00
Zach Brown 19a2e1f461 btrfs-progs: fix shadow symbols
This fixes all the instances of warnings that symbols declared in blocks
shadow symbols with the same name in surrounding scopes:

 cmds-device.c:341:22: warning: symbol 'path' shadows an earlier one
 cmds-device.c:285:14: originally declared here

I just renamed or removed the risky shadow symbols instead of pulling
their blocks out into functions.

Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:41:02 +02:00
Zach Brown 323bf8c587 btrfs-progs: add ULL to u64 constant
This silences a sparse warning:

	warning: constant 0x4D5F53665248425F is so big it is long

from

  commit 52162700bb
  Author: Zach Brown <zab@redhat.com>
  Date:   Thu Jan 17 11:54:47 2013 -0800

      btrfs-progs: treat super.magic as an le64

High fives, past me!

Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:41:01 +02:00
Zach Brown 7eab7f2a9c btrfs-progs: remove __CHECKER__ from main code
__CHECKER__ is only for the type juggling used to tell sparse which
types need conversion between address spaces.  It is not OK to use to
change the code that gets checked to avoid bugs elsewhere in the build
infrastructure.  We want to check the code that builds when the checker
isn't enabled.

Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:41:01 +02:00
Wang Shilong dfc66e3c93 Btrfs-progs: add missing man page for btrfs-map-logical
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:41:00 +02:00
Wang Shilong e7b0ec3665 Btrfs-progs: add missing man page information for btrfs-zero-log
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:40:59 +02:00
Wang Shilong f5c890dcc8 Btrfs-progs: add missing man page for btrfstune
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:40:58 +02:00
Wang Shilong 0da13e4317 Btrfs-progs: add man page information for btrfs-convert
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:40:58 +02:00
Wang Shilong 14898abe91 Btrfs-progs: add man page information for btrfs-find-root
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:40:57 +02:00
Wang Shilong af129354c0 Btrfs-progs: add missing man page for btrfs-show-super
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:40:56 +02:00
Wang Shilong e48aac0913 Btrfs-progs: add missing man information for btrfs-debug-tree
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:40:56 +02:00
Wang Shilong e9c0fe428e Btrfs-progs: add missing man page information for btrfsck
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:40:55 +02:00
Eric Sandeen fa25b35dcc btrfs-progs: mark static & remove unused from non-kernel code
Mark many functions as static, and remove any resulting dead code.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:40:54 +02:00
Stefan Behrens 116123c5f2 Btrfs-progs: fix a regression in mkfs.btrfs
Commit 55061a98 adds a cut & paste error that makes mkfs.btrfs fail
if leafsize != sectorsize.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Reviewed-by: Filipe 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:40:53 +02:00
Eric Sandeen 989ca65a11 btrfs-progs: mark static & remove unused from shared kernel code
In files copied from the kernel, mark many functions as static,
and remove any resulting dead code.

Some functions are left unmarked if they aren't static in the
kernel tree.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:40:53 +02:00
Zach Brown 6a0af4e57b btrfs-progs: don't overrun "answer" array in cmds-chunk.c
Eric noticed the trivial stack overflow bug in ask_user().  I went to
see the context for that fix and found that ask_user() was a bit much.

This fixes the overflow bug that Eric found, endless spinning on scanf()
errors, removes dead code, and leaves us with a trivial helper.

Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:40:52 +02:00
Anand Jain 689ad3e362 btrfs-progs: cmd_start_replace() to use test_dev_for_mkfs()
test_dev_for_mkfs() is a common place where
we check if a device is fit for the btrfs use.
cmd_start_replace() should make use of test_dev_for_mkfs(),
and here the test_dev_for_mkfs() is further enhanced
to fit the cmd_start_replace() needs.

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-09-03 19:40:51 +02:00
Anand Jain bbe9df154b btrfs-progs: let user know that devid can be used if path is missing
When the device disappear the path goes missing,
and that will be the one of the reason that user
will replace the device.

The devid of the missing btrfs device can be
obtained using the new cli option
 btrfs fi show --kernel

And which can be used in the replace command.
---
btrfs replace start /dev/sdc /dev/sde /btrfs
Error: Unable to open device '/dev/sdc'
        Try using the devid instead of the path
---

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-09-03 19:40:51 +02:00
Qu Wenruo 7ea01da9c8 btrfs-progs: Fix the return value of btrfs-map-logical
The ret variant in the main function is not changed so even problems
happen, return value is still 0.
The patch fixs the minor bug and return 1 if any problems happen.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:40:50 +02:00
Jan Schmidt eda2178b99 Btrfs-progs: added "btrfs quota rescan" -w switch (wait)
With -w one can wait for a rescan operation to finish. It can be used when
starting a rescan operation or later to wait for the currently running
rescan operation to finish. Waiting is interruptible.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:40:50 +02:00
Koen De Wit b9b1fc4f0d btrfs-progs: mkfs.btrfs documentation: clarify current restrictions of sectorsize, nodesize and leafsize
Commit 8d082fb727ac11930ea20bf1612e334ea7c2b697 (Btrfs: do not mount when
we have a sectorsize unequal to PAGE_SIZE) requires the sectorsize to be
equal to the pagesize for the filesystem to be mountable.

The nodesize and leafsize should be equal, and not larger than 65536.

Adding this information to the manpage and usage instructions of mkfs.btrfs.

Signed-off-by: Koen De Wit <koen.de.wit@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:40:49 +02:00
Eric Sandeen 560f071313 btrfs-progs: make set/get functions for the super compat_ro flags use compat_ro
Port of commit 12534832 to userspace:

 commit 12534832cb7b0abc7369298246e8b7af03b863ca
 Author: Josef Bacik <josef@redhat.com>
 Date:   Thu Dec 17 21:32:27 2009 +0000

    Btrfs: make set/get functions for the super compat_ro flags use compat_ro

    Our set/get functions for compat_ro_flags actually look at compat_flags.  This
    will mess any attempt to use compat flags up.  The fix is obvious.  Thanks,

    Signed-off-by: Josef Bacik <josef@redhat.com>
    Signed-off-by: Chris Mason <chris.mason@oracle.com>

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:40:48 +02:00
Eric Sandeen c82ded6dbb btrfs-progs: fix definition of struct btrfs_extent_inline_ref
Port kernel commit 1bec1aed to userspace.

use __le64 instead of u64 in on-disk structure definition.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:40:48 +02:00
Eric Sandeen 514aa5d8f1 btrfs-progs: drop weird indirections & dead code from send/receive
cmds-recieve.c & cmds-send.c seem to have weird wrappers and
indirections, and "groups" of commands which have only
one member, which are never referenced in the code.

I think these can be removed.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:40:47 +02:00
Eric Sandeen 4e8c4d4ba7 btrfs-progs: drop unused parameter from btrfs_release_path
Port of commit b3b4aa7 to userspace.

parameter tree root it's not used since commit
5f39d397dfbe140a14edecd4e73c34ce23c4f9ee ("Btrfs: Create extent_buffer
interface for large blocksizes")

This gets userspace a tad closer to kernelspace by removing
this unused parameter that was all over the codebase...

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-03 19:40:46 +02:00
Josef Bacik 9db49418b3 Btrfs-progs: sanitize xattrs when we specify sanitization
Alexandre pointed out that his xattrs have sensitive information in them as
well, so fix btrfs-image to zero out the data part of xattrs that we find.
Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Reviewed-by: Filipe 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:40:45 +02:00
Filipe David Borba Manana 02e778b278 Btrfs-progs: return immediately on tree search failure
If the chunk tree search failed in volumes.c:btrfs_read_chunk_tree()
return immediately, rather than looping and use the invalid contents
of the path structure, causing weird errors/crash at run time.

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:40:45 +02:00
Anand Jain 1c1725a07b btrfs-progs: don't have to report ENOMEDIUM error during open
when we scan /proc/partitions the cdrom is scanned
as well, and we don't have to report ENOMEDIUM errors
against it.

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-09-03 19:40:44 +02:00
Qu Wenruo a2fc3b5113 btrfs-progs: Update the man page of btrfs
Update the man page of "btrfs" command to keep up with new commands.

Now the updated btrfs man page should have all the commands,
and better description sequence, which is the same with "btrfs --help".
Also the paragraph and italic style is unified to improve the readability.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-08-09 14:32:37 +02:00
Qu Wenruo 3ca706a6ee btrfs-progs: Update the usage strings of some cmds
Update the usage strings of some cmds to keep the them consistent with
the source.

Also some minor changes are done to fit the man page syntax.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-08-09 14:32:37 +02:00
Filipe David Borba Manana 2b2201bd09 Btrfs-progs: add missing path alloc return value check
Also remove unused path in extent-tree.c:finish_current_insert().

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-08-09 14:32:37 +02:00
Wang Shilong af6c1650cf Btrfs-progs: make btrfs-map-logical handle error gracefully
If an overflow logical address is passed(for example),the original
code will cause segmentation, this is unfriendly to users,fix it.

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-08-09 14:32:37 +02:00
Wang Shilong 44aa9dce55 Btrfs-progs: fix wrong arg sb_bytenr for btrfs_scan_fs_devices()
For most time, In open_ctree_*(), we use the first superblock
(BTRFS_SUPER_INFO_OFFSET). However, for btrfs-convert, we don't,
we should pass the correct sb_bytenr to btrfs_scan_fs_devices() rather
than always use BTRFS_SUPER_INFO_OFFSET.This patch fix the following
regression:

mkfs.ext2 <dev>
btrfs-convert <dev>

warning, device 1 is missing
Check tree block failed, want=2670592, have=0
read block failed check_tree_block
Couldn't read chunk root
Segmentation fault (core dumped)

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-08-09 14:32:37 +02:00
Anand Jain b3a9a3c94a btrfs-progs: get_label_mounted to return label instead of print
This would help to reuse the function

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-08-09 14:32:37 +02:00
Anand Jain b8e23d4fb2 btrfs-progs: device delete to get errors from the kernel
when user runs command btrfs dev del the raid requisite error if any
goes to the /var/log/messages, its not good idea to clutter messages
with these user (knowledge) errors, further user don't have to review
the system messages to know problem with the cli it should be dropped
to the user as part of the cli return.

to bring this feature created a set of the ERROR defined
BTRFS_ERROR_DEV* error codes and created their error string.

I expect this enum to be added with other error which we might
want to communicate to the user land

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-08-09 14:32:36 +02:00
Anand Jain 5333445574 btrfs-progs: congregate dev scan
the dev scan to find btrfs is performed at two locations
all most the same way one at filesystem show and another
at device scan. They both follow the same steps. This
patch does not alter anything except that it brings these
two same logic into the function scan_for_btrfs so that
we can play tweaking it.

the patch which recommends to use /dev/mapper
will also need it

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-08-09 14:32:36 +02:00
Anand Jain 8f7c5897e9 btrfs-progs: update device scan usage
the btrfs device scan usage didnt publish --all-devices
option so add it

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-08-09 14:32:36 +02:00
Anand Jain 7d1478b91a btrfs-progs: label option in btrfs filesystem show is not coded
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-08-09 14:32:36 +02:00
Anand Jain 65ed88d472 btrfs-progs: btrfs_scan_for_fsid doesn't need all the arguments
btrfs_scan_for_fsid uses only one argument run_ioctl out of 3
so remove the rest two of them

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-08-09 14:32:36 +02:00
Wang Shilong c125b7cf43 Btrfs-progs: fix closing of opendir()
valgrind complains open_file_or_dir() causes a memory leak.That is because
if we open a directoy by opendir(), and then we should call closedir()
to free memory.

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-08-09 14:32:36 +02:00
Qu Wenruo c118c21b3e btrfs-progs: Add chunk corrupt funtion to btrfs-corrupt-block
Add chunk corrupt function to btrfs-corrupt-block.
This funtion can be used to delete or corrupt a given chunk or the whole
chunk tree.

This funtion is useful to test the coming chunk recover funtion.

BTW, since the chunk recover funtion is based on whole partion scanning,
so the COW should be disabled and edit leaf without changing generation.
Which makes btrfs_commit_transation giving some ignorable warning.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-08-09 14:32:35 +02:00
Wang Shilong 936d520a48 Btrfs-progs: listing subvols and getting default subvol don't need a subv path
Listing subvolumes and getting default subvol in the filesystem don't need a
subv path,Any valid path related to Btrfs filesystem is ok to finish the work.

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-08-09 14:32:35 +02:00
Filipe David Borba Manana 610166d0db Btrfs-progs: restore can now recover file xattrs
This change adds a new option to the restore command, named -x,
that makes it restore file extented attributes too. This is an
optional behaviour and it's disabled by default.

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-08-09 14:32:35 +02:00