summaryrefslogtreecommitdiff
path: root/btrfs-vol.c
Commit message (Collapse)AuthorAge
* btrfs-progs: fix overflows of ioctl name argsEric Sandeen2013-02-05
| | | | | | | | | 3 places where we copy pathnames into ioctl arguments were not limited to the destination name size, and could overflow. Use the new strncpy_null() macro to make this safe. Signed-off-by: Eric Sandeen <sandeen@redhat.com>
* Btrfs-progs: only enforce a maximum size if we specify oneJosef Bacik2012-10-02
| | | | | | | | | | | | | | My patch 04609add88ef8428d725de6ef60f46a3ff0dbc8e introduced a regression where if you mkfs'ed a group of disks with different sizes it limited the disks to the size of the first one that is specified. This was not the intent of my patch, I only want it to limit the size based on the -b option, so I've reworked the code to pass in a max block count and that fixes the issue. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com>
* Deprecate btrfsctl, btrfs-show, btrfs-volGoffredo Baroncelli2011-10-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi all, the patch below deprecates the following programs * btrfsctl * btrfs-vol * btrfs-show the reason is simple, these programs are superseded by the btrfs utility, both in terms of documentation, usability and bug. The goal is to avoid to duplicate codes and avoid update two programs. The patch adds a warning in the man pages, in the INSTALL file and in the programs. $ ./btrfsctl ** ** WARNING: this program is considered deprecated ** Please consider to switch to the btrfs utility ** no valid commands given usage: btrfsctl [ -d file|dir] [ -s snap_name subvol|tree ] [-r size] [-A device] [-a] [-c] [-D dir .] -d filename: defragments one file -d directory: defragments the entire Btree -s snap_name dir: creates a new snapshot of dir -S subvol_name dir: creates a new subvolume -r [+-]size[gkm]: resize the FS by size amount -A device: scans the device file for a Btrfs filesystem -a: scans all devices for Btrfs filesystems -c: forces a single FS sync -D: delete snapshot -m [tree id] directory: set the default mounted subvolume to the [tree id] or the directory Below the patch, but it is possible to pull the changes from: http://cassiopea.homelinux.net/git/btrfs-progs-unstable.git branch btrfs-deprecated Comments are welcome. G.Baroncelli INSTALL | 5 +++++ btrfs-show.c | 5 +++++ btrfs-vol.c | 5 +++++ btrfsctl.c | 5 +++++ man/btrfs-show.8.in | 3 +++ man/btrfsctl.8.in | 3 +++ 6 files changed, 26 insertions(+), 0 deletions(-) the tool to create a new snapshot for the filesystem. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs-progs: add support for mixed data+metadata block groupsJosef Bacik2011-10-25
| | | | | | | | | | | | So alot of crazy people (I'm looking at you Meego) want to use btrfs on phones and such with small devices. Unfortunately the way we split out metadata/data chunks it makes space usage inefficient for volumes that are smaller than 1gigabyte. So add a -M option for mixing metadata+data, and default to this mixed mode if the filesystem is less than or equal to 1 gigabyte. I've tested this with xfstests on a 100mb filesystem and everything is a-ok. Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* add mounted-checking for btrfs-volMiao Xie2010-09-23
| | | | | | | Adding a mounted device is dangerous because it will destroy the filesystem on that mounted device. So we add mounted-checking for btrfs-vol. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
* Verify parent generation number on btree readsChris Mason2008-05-13
|
* Fix uninitialized variables, and use -O so gcc starts checking for themChris Mason2008-05-01
| | | | | | | | Gcc only sends warnings for uninitialized variables when you compile with -O, and there were a couple of bugs sprinkled in the code. The biggest was the alloc_start variable for mkfs, which can cause strange things to happen. (thanks to Gabor Micsko for helping to find this)
* Add btrfs-vol command to balance, add and (eventually) remove devicesChris Mason2008-04-28