Commit Graph

73 Commits (master)

Author SHA1 Message Date
Alexander Block e998a46d26 Btrfs-progs: add BTRFS_IOC_SUBVOL_GET/SETFLAGS to ioctl.h
Btrfs send/receive and btrfs props needs this ioctl. This patch
requires a recent kernel with the "Btrfs: use _IOR for
BTRFS_IOC_SUBVOL_GETFLAGS" patch applied.

Signed-off-by: Alexander Block <ablock84@googlemail.com>
2012-07-26 14:51:16 -04:00
Ilya Dryomov 4f3a15d09a Btrfs-progs: add restriper headers
Add restriper headers and update print-tree.c

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2012-02-03 21:02:29 +02:00
Jan Schmidt 6055e73604 Btrfs-progs: added ioctls and commands to resolve inodes and logical addrs
two new commands that make use of the new path resolving functions
implemented for scrub, doing the resolving in-kernel. the result for both
commands is a list of files belonging to that inode / logical address.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-02 15:46:10 -04:00
Jan Schmidt eecfba1d34 btrfs-progs: scrub ioctls
- scrub structs added
- ioctls for scrub
- BTRFS_FSID_SIZE moved

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
2011-10-25 09:18:59 -04:00
Andreas Philipp 501a867d36 Added support for an additional ioctl.
Added BTRFS_IOC_SNAP_CREATE_V2 and struct btrfs_ioctl_vol_args_v2 as
defined in fs/btrfs/ioctl.h in the kernel sources.

Signed-off-by: Andreas Philipp <philipp.andreas@gmail.com>
Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
2011-10-25 09:18:57 -04:00
Li Zefan a418b24318 Update for lzo support
[Btrfs-Progs][V2] Update for lzo support

- Add incompat flag, otherwise btrfs-progs will report error
  when operating on btrfs filesystems mounted with lzo option.

- Update man page.

- Allow to turn on lzo compression for defrag operation:

  # btrfs filesystem defragment -c[zlib, lzo] <file>

  Note: "-c zlib" will fail, because that's how getopt() works
  for optional arguments.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-10-25 09:18:31 -04:00
Chris Mason 8f55b769c7 Add btrfs subvol find-new command
btrfs-subvol find-new <subvol> <id> will search through a given subvol
and print out all the files with extents newer than a given id.

Care must be taken to make sure any pending delalloc is on disk before
running this because that won't show up in the output.
2010-03-18 12:32:32 -04:00
Josef Bacik b72e4c4e19 Btrfs-progs: add btrfs filesystem df to print space info
This goes along with the new space info ioctl.  This will spit out the space
info all nice and pretty with the type, it's flags (DUP, RAID) and how much
space is in that group and how much is in use.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2010-03-14 08:34:38 -04:00
Chris Mason 06cbf62fda Add new defrag range ioctl that can also compress files on demand. 2010-03-11 09:38:52 -05:00
Josef Bacik 7b14bc0f4f Btrfs-progs: add command to set default subvol
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>
2010-02-28 19:24:25 -05:00
Chris Mason 4ff9e2af17 Add btrfs-list for listing subvolumes
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2010-02-28 15:35:38 -05:00
Yan, Zheng 45195b216d btrfsctl: add snapshot/subvolume destroy ioctl
resend Aaron Straus's patch

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2009-09-21 16:03:57 -04:00
Chris Mason f9f3fff9a4 Fix ioctl arg size (userland incompatible change!)
The structure used to send device in btrfs ioctl calls was not
properly aligned, and so 32 bit ioctls would not work properly on
64 bit kernels.

We could fix this with compat ioctls, but we're just one byte away
and it doesn't make sense at this stage to carry about the compat ioctls
forever at this stage in the project.

This patch brings the ioctl arg up to an evenly aligned 4k.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
2009-01-16 12:05:01 -05:00
Chris Mason 6c771595af Modify the subvol and snapshot creation ioctls to work anywhere in the tree
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>
2008-11-18 11:26:35 -05:00
Chris Mason 969c548acb Add sync and transaction ioctl defs
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.
2008-06-10 10:09:18 -04:00
Chris Mason bacbad41a0 Add the clone ioctl number 2008-05-02 11:05:21 -04:00
Chris Mason b327761ead Add btrfs-vol command to balance, add and (eventually) remove devices 2008-04-28 16:44:22 -04:00
Chris Mason 26afd0f31d ioctls to scan for btrfs filesystems 2008-03-24 15:04:49 -04:00
Chris Mason 7e03dadf20 Add online resizing ioctls
btrfsctl -r size mount_point
2007-12-21 16:25:35 -05:00
Chris Mason 0528b69c15 add defrag ioctl 2007-08-07 16:15:59 -04:00
Chris Mason d9f1317c7d add GPLv2 2007-06-12 09:07:11 -04:00
Chris Mason 98baacc623 add disk ioctl 2007-04-12 10:51:51 -04:00
Chris Mason 43f6ab83bf btrfsctl 2007-04-10 09:27:30 -04:00