diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-06-10 10:09:18 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2008-06-10 10:09:18 -0400 |
commit | 969c548acb71c594db31f32ff32b737fb8270a90 (patch) | |
tree | 98e694c51639a962de3e180c29852a3251f8dde8 /btrfsctl.c | |
parent | d8d4df9474ba3596532a4052bc8ad4fe37f717ce (diff) |
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.
Diffstat (limited to 'btrfsctl.c')
-rw-r--r-- | btrfsctl.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -51,6 +51,7 @@ void print_usage(void) printf("\t-r [+-]size[gkm] resize the FS\n"); printf("\t-A device scans the device for a Btrfs filesystem\n"); printf("\t-a scans all devices for Btrfs filesystems\n"); + printf("\t-c forces a single FS sync\n"); exit(1); } @@ -115,6 +116,8 @@ int main(int ac, char **av) exit(1); } command = BTRFS_IOC_RESIZE; + } else if (strcmp(av[i], "-c") == 0) { + command = BTRFS_IOC_SYNC; } } if (command == 0) { |