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>
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>
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.