diff options
-rw-r--r-- | btrfsctl.c | 3 | ||||
-rw-r--r-- | ioctl.h | 9 |
2 files changed, 12 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) { @@ -36,6 +36,14 @@ struct btrfs_ioctl_vol_args { struct btrfs_ioctl_vol_args) #define BTRFS_IOC_SCAN_DEV _IOW(BTRFS_IOCTL_MAGIC, 4, \ struct btrfs_ioctl_vol_args) +/* trans start and trans end are dangerous, and only for + * use by applications that know how to avoid the + * resulting deadlocks + */ +#define BTRFS_IOC_TRANS_START _IO(BTRFS_IOCTL_MAGIC, 6) +#define BTRFS_IOC_TRANS_END _IO(BTRFS_IOCTL_MAGIC, 7) +#define BTRFS_IOC_SYNC _IO(BTRFS_IOCTL_MAGIC, 8) + #define BTRFS_IOC_CLONE _IOW(BTRFS_IOCTL_MAGIC, 9, int) #define BTRFS_IOC_ADD_DEV _IOW(BTRFS_IOCTL_MAGIC, 10, \ struct btrfs_ioctl_vol_args) @@ -43,4 +51,5 @@ struct btrfs_ioctl_vol_args { struct btrfs_ioctl_vol_args) #define BTRFS_IOC_BALANCE _IOW(BTRFS_IOCTL_MAGIC, 12, \ struct btrfs_ioctl_vol_args) + #endif |