aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJan Schmidt <list.btrfs@jan-o-sch.net>2013-04-25 12:04:51 -0400
committerJosef Bacik <jbacik@fusionio.com>2013-05-06 15:55:19 -0400
commit2f2320360b0c35b86938bfc561124474f0dac6e4 (patch)
treef7b1cbec89d9c6d030f15817e77ee42e5941244a /include
parent46b665ceb1edd2ac149ff701313c115f52dc0348 (diff)
Btrfs: rescan for qgroups
If qgroup tracking is out of sync, a rescan operation can be started. It iterates the complete extent tree and recalculates all qgroup tracking data. This is an expensive operation and should not be used unless required. A filesystem under rescan can still be umounted. The rescan continues on the next mount. Status information is provided with a separate ioctl while a rescan operation is in progress. Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/btrfs.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
index 5e39e859a848..5ef0df545a2a 100644
--- a/include/uapi/linux/btrfs.h
+++ b/include/uapi/linux/btrfs.h
@@ -376,12 +376,18 @@ struct btrfs_ioctl_get_dev_stats {
376 376
377#define BTRFS_QUOTA_CTL_ENABLE 1 377#define BTRFS_QUOTA_CTL_ENABLE 1
378#define BTRFS_QUOTA_CTL_DISABLE 2 378#define BTRFS_QUOTA_CTL_DISABLE 2
379#define BTRFS_QUOTA_CTL_RESCAN 3 379#define BTRFS_QUOTA_CTL_RESCAN__NOTUSED 3
380struct btrfs_ioctl_quota_ctl_args { 380struct btrfs_ioctl_quota_ctl_args {
381 __u64 cmd; 381 __u64 cmd;
382 __u64 status; 382 __u64 status;
383}; 383};
384 384
385struct btrfs_ioctl_quota_rescan_args {
386 __u64 flags;
387 __u64 progress;
388 __u64 reserved[6];
389};
390
385struct btrfs_ioctl_qgroup_assign_args { 391struct btrfs_ioctl_qgroup_assign_args {
386 __u64 assign; 392 __u64 assign;
387 __u64 src; 393 __u64 src;
@@ -520,6 +526,10 @@ struct btrfs_ioctl_send_args {
520 struct btrfs_ioctl_qgroup_create_args) 526 struct btrfs_ioctl_qgroup_create_args)
521#define BTRFS_IOC_QGROUP_LIMIT _IOR(BTRFS_IOCTL_MAGIC, 43, \ 527#define BTRFS_IOC_QGROUP_LIMIT _IOR(BTRFS_IOCTL_MAGIC, 43, \
522 struct btrfs_ioctl_qgroup_limit_args) 528 struct btrfs_ioctl_qgroup_limit_args)
529#define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \
530 struct btrfs_ioctl_quota_rescan_args)
531#define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \
532 struct btrfs_ioctl_quota_rescan_args)
523#define BTRFS_IOC_GET_FSLABEL _IOR(BTRFS_IOCTL_MAGIC, 49, \ 533#define BTRFS_IOC_GET_FSLABEL _IOR(BTRFS_IOCTL_MAGIC, 49, \
524 char[BTRFS_LABEL_SIZE]) 534 char[BTRFS_LABEL_SIZE])
525#define BTRFS_IOC_SET_FSLABEL _IOW(BTRFS_IOCTL_MAGIC, 50, \ 535#define BTRFS_IOC_SET_FSLABEL _IOW(BTRFS_IOCTL_MAGIC, 50, \