summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* Btrfs progs v4.5.2David Sterba2016-05-02
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: update CHANGES for 4.5.2David Sterba2016-05-02
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: handle memory allocation error in cmd_device_statsDavid Sterba2016-05-02
| | | | | Resolves-coverity-id: 1359012 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add 002-balance-full-no-filtersDavid Sterba2016-05-02
| | | | | | Coverage of new balance option --full-balance. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Restrict e2fsprogs version for convertQu Wenruo2016-05-02
| | | | | | | | We want to support version 1.41 due to longterm and enterprise distros, make the check explicit. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: add safety delay before starting full balanceDavid Sterba2016-05-02
| | | | | | | | | | | | A short delay with a warning before starting a full balance should improve usability. We have been getting reports from people who run full balance after following some random advice and then get surprised by the performance impact. The countdown is done even when run from scripts, but as the whole balance takes significanly more time, this shouldn't be an issue. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: add CHANGES 3.12 - 4.5.1David Sterba2016-05-02
| | | | | | | | | | The changes are posted to the mailinglist and to the wiki, but for packaging reasons it's good to have them locally in the git as well. The initial conversion from wiki was done by Nick, then adjusted by me. Reported-by: Nicholas D Steeves <nsteeves@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Read qgroup status for qgroup verifyQu Wenruo2016-05-02
| | | | | | | | | | | Read qgroup status for its flags like QGROUP_STATUS_FLAG_RESCAN and QGROUP_STATUS_FLAG_INCONSISTENT. This will help to avoid false alert for case like qgroup rescan is still running when un-mounted. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Fix an extent buffer leak in qgroups checkQu Wenruo2016-05-02
| | | | | | | | | | | Qgroup verify codes will read fs root to check if the subvolume exists. But it forgot to free the extent buffer read out, only freeing the memory. Fix it by also freeing the extent buffers. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Fix return value bug of qgroups checkQu Wenruo2016-05-02
| | | | | | | | | | | Before this patch, although btrfsck will check qgroups if quota is enabled, it always return 0 even qgroup numbers are corrupted. Fix it by allowing return value from report_qgroups function (formally defined as print_qgroup_difference). Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: prop: remove an unnecessary condition on parse_argsSatoru Takeuchi2016-05-02
| | | | | | | | | | >From commit c742debab11f ('btrfs-progs: fix a regression that "property" with -t option doesn't work'), the number of arguments is checked strictly. So the following condition never be satisfied. Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: "device ready" accepts just one deviceSatoru Takeuchi2016-05-02
| | | | | | | | | | | | | | | | | | | | | | | | * actual result ======================================= # ./btrfs device ready /dev/sdb foo # ======================================= * expecting result ======================================= # ./btrfs device ready /dev/sdb foo btrfs device ready: too many arguments usage: btrfs device ready <device> Check device to see if it has all of its devices in cache for mounting # ======================================= Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Check if the FSID was seen by comparing full UUIDYauhen Kharuzhy2016-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is_seen_fsid() uses simple hash to check if FS was seen before at walking on FS list in 'filesystem show' command: hash key is first byte of the UUID. This function doesn't check full UUID then, so, if there are two FS with same first byte in UUIDs exist, only one will be shown: root@test:~# btrfs fi show Label: 'System' uuid: 688cb918-7bac-4c8e-9b11-8d047eb14cf4 Total devices 2 FS bytes used 1.76GiB devid 1 size 3.46TiB used 4.01GiB path /dev/sda2 devid 2 size 6.91TiB used 4.01GiB path /dev/sdb2 Global spare root@test:~# grep btrfs /proc/mounts /dev/sda2 / btrfs rw,relatime,space_cache,subvolid=256,subvol=/root 0 0 /dev/sdc /media/688cb918-7bac-4c8e-9b11-8d047eb14cf4 btrfs rw,relatime,space_cache,subvolid=5,subvol=/ 0 0 root@test:~# btrfs fi show --all-devices Label: 'System' uuid: 688cb918-7bac-4c8e-9b11-8d047eb14cf4 Total devices 2 FS bytes used 1.76GiB devid 1 size 3.46TiB used 4.03GiB path /dev/sda2 devid 2 size 6.91TiB used 4.01GiB path /dev/sdb2 Label: 'test' uuid: 683b1a80-ca7f-4c4d-b87b-7155401a4d18 Total devices 7 FS bytes used 2.06MiB devid 1 size 7.28TiB used 1.57GiB path /dev/sdc devid 2 size 7.28TiB used 1.57GiB path /dev/sdd devid 3 size 7.28TiB used 1.57GiB path /dev/sde devid 4 size 7.28TiB used 1.57GiB path /dev/sdf devid 5 size 7.28TiB used 1.57GiB path /dev/sdg devid 6 size 7.28TiB used 1.57GiB path /dev/sdh devid 7 size 7.28TiB used 1.57GiB path /dev/sdi To resolve this collision, search for full FSID in the list of seen filesystems. Signed-off-by: Yauhen Kharuzhy <yauhen.kharuzhy@zavadatar.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: convert: fix typo in original image subvolume nameDavid Sterba2016-05-02
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: device stats: Print devid instead of nullPatrik Lundquist2016-05-02
| | | | | | | | Print e.g. "[devid:4].write_io_errs   6" instead of "[(null)].write_io_errs   6" when device is missing. Signed-off-by: Patrik Lundquist <patrik.lundquist@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fix re-declared get_device_info()Anand Jain2016-05-02
| | | | | | | The other get_device_info() is in the same file, 4 lines above. Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: check: use add_extent_rec_nolookup after lookupsDavid Sterba2016-05-02
| | | | | | The lookup was duplicated, use the helper that does not do it. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: check: refactor add_extent_rec, separate lookupDavid Sterba2016-05-02
| | | | | | | Separate the part of add_extent_rec that comes after the lookup does not succeed, there are callers interested in just this. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: check: cleanup, move structure definitions to the beginningDavid Sterba2016-05-02
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: deprecate and stop using btrfs_level_sizeDavid Sterba2016-05-02
| | | | | | Size of a b-tree node is always nodesize, regardless of the level. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: replace leafsize with nodesizeDavid Sterba2016-05-02
| | | | | | | | Nodesize is used in kernel, the values are always equal. We have to keep leafsize in headers, similarly the tree setting functions still take and set leafsize, but it's effectively a no-op. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fi sync: make it silent by defaultDavid Sterba2016-05-02
| | | | | | Report only errors returned by the ioctl. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fsck: Fix a false metadata extent warningQu Wenruo2016-05-02
| | | | | | | | | | | | | | | | | | At least 2 user from mail list reported btrfsck reported false alert of "bad metadata [XXXX,YYYY) crossing stripe boundary". While the reported number are all inside the same 64K boundary. After some check, all the false alert have the same bytenr feature, which can be divided by stripe size (64K). The result seems to be initial 'max_size' can be 0, causing 'start' + 'max_size' - 1, to cross the stripe boundary. Fix it by always update extent_record->cross_stripe when the extent_record is updated, to avoid temporary false alert to be reported. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: update docs and completion for tree-statsAlexander Fougner2016-05-02
| | | | | Signed-off-by: Alexander Fougner <fougner89@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: copy btrfs-calc-size to inspect-internal tree-statsAlexander Fougner2016-05-02
| | | | | Signed-off-by: Alexander Fougner <fougner89@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add support for command line coverage testsDavid Sterba2016-05-02
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* Btrfs progs v4.5.1David Sterba2016-03-31
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fix unknown type name 'u64' in gccgoJulio Montes2016-03-31
| | | | | Signed-off-by: Julio Montes <imc.coder@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: docs: update mkfs page for dup on multidev fsDavid Sterba2016-03-30
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: update 001-basic-profiles, dup on multidev fsDavid Sterba2016-03-30
| | | | | | | Testcase for "btrfs-progs: mkfs: fix an error when using DUP on multidev fs" Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: fix an error when using DUP on multidev fsSatoru Takeuchi2016-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To accept DUP on multidev fs, in addition to the following commit, we need to mark DUP as an allowed data/metadata profile. commit 42f1279bf8e9 ("btrfs-progs: mkfs: allow DUP on multidev fs, only warn") * actual result ============================================= # ./mkfs.btrfs -f -m DUP -d DUP /dev/sdb1 /dev/sdb2 btrfs-progs v4.5-24-ga35b7e6 See http://btrfs.wiki.kernel.org for more information. WARNING: DUP is not recommended on filesystem with multiple devices ERROR: unable to create FS with metadata profile DUP (have 2 devices but 1 devices are required) ============================================= * expected result ============================================= # ./mkfs.btrfs -f -m dup -d dup /dev/sdb1 /dev/sdb2 WARNING: DUP is not recommended on filesystem with multiple devices btrfs-progs v4.5-25-g1a10a3c See http://btrfs.wiki.kernel.org for more information. Label: (null) UUID: 010d72ff-c87c-4516-8916-5e635719d110 Node size: 16384 Sector size: 4096 Filesystem size: 28.87GiB Block group profiles: Data: DUP 1.01GiB Metadata: DUP 1.01GiB System: DUP 12.00MiB SSD detected: no Incompat features: extref, skinny-metadata Number of devices: 2 Devices: ID SIZE PATH 1 953.00MiB /dev/sdb1 2 27.94GiB /dev/sdb2 ================================================== Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fix fd leak in get_subvol_infoDavid Sterba2016-03-30
| | | | | | | A typo, introduced in "btrfs-progs: create get_subvol_info()". Resolves-coverity-id: 1357106 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: use safe copy for label buffer everywhereDavid Sterba2016-03-30
| | | | | | | | There's a mix of opencoded strncpy + null termination, strncpy, memcppy without termination etc. Unify them and use the helper. Resolves-coverity-id: 1357105 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: rename __strncpy__null to __strncpy_nullDavid Sterba2016-03-30
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: allow DUP on multidev fs, only warnDavid Sterba2016-03-30
| | | | | | | The DUP profile can work on multiple filesystems, the limitation is rather artificial. Let the user make the decision and print a warning. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: make error message from add_clone_source more genericDavid Sterba2016-03-30
| | | | | | Do not hardcode the error message. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: send: fix handling of multiple snapshotsTsutomu Itoh2016-03-30
| | | | | | | | | | | | | | | | | | | | We cannot send multiple snapshots at once. [before fix] # btrfs send ./snap[12] > snap12.data At subvol ./snap1 At subvol ./snap2 ERROR: parent determination failed for 0 # [after fix] # btrfs send ./snap[12] > snap12.data At subvol ./snap1 At subvol ./snap2 # Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add misc 014-filesystem-labelDavid Sterba2016-03-30
| | | | | | Test various label lengths on a mounted filesystem. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: introduce mustfail helperDavid Sterba2016-03-30
| | | | | | | Invalid syntax, expected failure on corrupted data etc. Failure is success. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fix build of standalone utilities after cleanDavid Sterba2016-03-30
| | | | | | | | | | | | | | $ make clean $ make btrfs-debug-tree will fail because the dependency from $(btrfs_debug_tree_objects) is missing. The variable standalone_deps magically collects all the deps and will build them in advance. The simple fix to use the existing substitution based on $@ does not work for pattern rules, as Noah found out. Reported-by: Noah Massey <noah.massey@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: cleanup block group helpers typesDavid Sterba2016-03-30
| | | | | | Use const char and remove stray prototypes. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: utils: make more arguments constDavid Sterba2016-03-30
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: rename get_subvol_name() to subvol_strip_mountpoint()Anand Jain2016-03-30
| | | | | | Signed-off-by: Anand Jain <anand.jain@oracle.com> [ renamed from subvol_minus_mnt to subvol_strip_mountpoint ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: create get_subvol_info()Anand Jain2016-03-30
| | | | | | | | | get_subvol_info() is useful as we are adding more features around subvolume. This function was inline with the function cmd_subvol_show(). Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: move get_subvol_name() to utils.cAnand Jain2016-03-30
| | | | | Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: remove duplicate function __is_subvol()Anand Jain2016-03-30
| | | | | | | | The function test_issubvolume() provides the same check, and has better logic. Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: move test_issubvolume() to utils.cAnand Jain2016-03-30
| | | | | Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: rearrange subvolume functions togetherAnand Jain2016-03-30
| | | | | Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: utils: make sure set_label_mounted uses correct length buffersPetros Angelatos2016-03-30
| | | | | | | | | | | | | | | | | | | | | | When `btrfs filesystem label /foo bar` command is invoked, it will pass the buffer allocated in the argv array directly to set_label_mounted() and then to the BTRFS_IOC_SET_FSLABEL ioctl. However, the kernel code handling the ioctl will always try to copy BTRFS_LABEL_SIZE bytes[1] from the userland pointer. Under certain conditions and when the label is small enough, the command will fail with: [root@localhost /]# btrfs filesystem label /mnt f ERROR: unable to set label Bad address Fix this by making sure we pass a BTRFS_LABEL_SIZE sized buffer to the ioctl containing the desired label. [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/btrfs/ioctl.c?id=refs/tags/v4.5#n5231 Signed-off-by: Petros Angelatos <petrosagg@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fragments: fix buildDavid Sterba2016-03-30
| | | | Signed-off-by: David Sterba <dsterba@suse.com>