summaryrefslogtreecommitdiff
path: root/btrfsctl.c
Commit message (Collapse)AuthorAge
* btrfs-progs: cast u64 to long long to avoid printf warningsAnton Blanchard2011-10-25
| | | | | | | | | | | | When building on ppc64 I hit a number of warnings in printf: btrfs-map-logical.c:69: error: format ‘%Lu’ expects type ‘long long unsigned int’, but argument 4 has type ‘u64’ Fix them. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
* 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 use safe string manipulation functionsEduardo Silva2011-10-25
| | | | | Signed-off-by: Eduardo Silva <eduardo.silva@oracle.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* fix wrong return valueMiao Xie2010-09-23
| | | | | | | btrfsctl returns 1 if it does something successfully. this patch fixes this problem. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
* check slash in deleting subvolumesTARUISI Hiroaki2010-09-23
| | | | | | | | | | | | For now, btrfsctl does not check whether subvolume name contains slash or not. If someone specify subvolume with trailing slash (in case using shell completion), ioctl returns with EINVAL and this error may confuse some careless users like me. So, this patch adds check slashes in subvolume name in deletion same as snapshot/subvolume creating. But considering shell completion, this fix allows trailing slash. Signed-off-by: TARUISI Hiroaki <taruishi.hiroak@jp.fujitsu.com>
* Btrfs-progs: add command to set default subvolJosef Bacik2010-02-28
| | | | | | | | | | | | | | | | | | This introduces a new btrfsctl option, -m, to allow you to set the default'ly mounted subvolume. You can do btrfsctl -m /your/subvolume and that will make that subvolume the subvolume that is mounted by default, or you can do btrfsctl -m <treeid> /any/subvolume and this will make the subvolume with tree id <treeid> the default'ly mounted subvolume. You can get the treeid by using the listing option. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* btrfsctl: add snapshot/subvolume destroy ioctlYan, Zheng2009-09-21
| | | | | | | resend Aaron Straus's patch Signed-off-by: Yan Zheng <zheng.yan@oracle.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* btrfs-progs: make several functions staticWang Cong2009-01-21
| | | | | | | Make several functions static, and make one argument const. Signed-off-by: WANG Cong <wangcong@zeuux.org>
* Fix misleading error message in btrfsctlCalvin Walton2009-01-21
| | | | | | This updates Peter Klotz's original patch to use perror instead of fprintf when it fails to open /dev/btrfs-control
* Modify the subvol and snapshot creation ioctls to work anywhere in the treeChris Mason2008-11-18
| | | | | | | | | | | | | | | | | | | | | | | | This changes the snapshot and subvol ioctl API and command lines so that new snapshots and subvols can be created anywhere. Subvolume creation hasn't changed much: btrfsctl -S subvol_name directory This creates a new subvolume under 'directory' Snapshot creation looks the same, but is actually different: btrfsctl -s full_path_to_new_snapshot file_or_dir For example: btrfsctl -s /mnt/new_snap /mnt/subvol Will create a new snapshot named new_snap under /mnt of the root found in /mnt/subvol. It always snapshots the entire root regardless of which file or directory inside the root you give it. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Cleanup btrfsctl help messageemail.ahmedkamal@googlemail.com2008-07-30
| | | | | | | Many options were not mentioned in the usage message, fix that and cleaning up the brackets Signed-Off-By: Ahmed Kamal <email.ahmedkamal@googlemail.com>
* Fix: btrfsctl arguments handlingAhmed2008-07-30
| | | | | | btrfsctl -A in the current -unstable branch, does not result in the error message designated for it, namely "-A requires an arg\n"
* Print the version string in a few programsChris Mason2008-07-24
|
* Add sync and transaction ioctl defsChris Mason2008-06-10
| | | | | | | | | btrfsctl -c forces a single FS sync The transaction ioctls are unsafe for general use because they can lead to deadlocks if the application is not very careful. But, ceph is experimenting with btrfs as a backing store, and these ioctls are required for testing.
* btrfsctl: print usage when called with bad argsLinda Knippers2008-06-09
|
* Add btrfs-vol command to balance, add and (eventually) remove devicesChris Mason2008-04-28
|
* Fix a few casts for 32 bit compileChris Mason2008-04-11
|
* Walk all block devices looking for btrfsChris Mason2008-03-24
|
* ioctls to scan for btrfs filesystemsChris Mason2008-03-24
|
* Add online resizing ioctlsChris Mason2007-12-21
| | | | btrfsctl -r size mount_point
* add defrag ioctlChris Mason2007-08-07
|
* add GPLv2Chris Mason2007-06-12
|
* no slashes in subvolume namesChris Mason2007-06-12
|
* printf cleanupsChris Mason2007-06-12
|
* remove device treeChris Mason2007-06-09
|
* cleanup warnings found with -O2Chris Mason2007-05-22
|
* add disk ioctlChris Mason2007-04-12
|
* btrfsctl detects dir/file of argsChris Mason2007-04-10
|
* btrfsctlChris Mason2007-04-10