aboutsummaryrefslogtreecommitdiffstats
path: root/ioctl.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-06-03 16:37:50 +0200
committerDavid Sterba <dsterba@suse.cz>2015-06-03 16:38:43 +0200
commitddd8003d9474381e84b3adc0444358d67b35be06 (patch)
treef0d5fbbb76da2d42e873022dee7de679aa9ac957 /ioctl.h
parent9a6eb1f5ea4595206284a6f6fc6efb8112e03af8 (diff)
downloadbtrfs-progs-ddd8003d9474381e84b3adc0444358d67b35be06.tar.gz
btrfs-progs-ddd8003d9474381e84b3adc0444358d67b35be06.tar.xz
btrfs-progs-ddd8003d9474381e84b3adc0444358d67b35be06.zip
btrfs-progs: ioctl.h: copy commented version of scrub_progress structure
Copied from uapi/linux/btrfs.h, no-op change. Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'ioctl.h')
-rw-r--r--ioctl.h50
1 files changed, 34 insertions, 16 deletions
diff --git a/ioctl.h b/ioctl.h
index 758de2e..a1af035 100644
--- a/ioctl.h
+++ b/ioctl.h
@@ -84,23 +84,41 @@ struct btrfs_ioctl_vol_args_v2 {
char name[BTRFS_SUBVOL_NAME_MAX + 1];
};
-
+/*
+ * structure to report errors and progress to userspace, either as a
+ * result of a finished scrub, a canceled scrub or a progress inquiry
+ */
struct btrfs_scrub_progress {
- __u64 data_extents_scrubbed;
- __u64 tree_extents_scrubbed;
- __u64 data_bytes_scrubbed;
- __u64 tree_bytes_scrubbed;
- __u64 read_errors;
- __u64 csum_errors;
- __u64 verify_errors;
- __u64 no_csum;
- __u64 csum_discards;
- __u64 super_errors;
- __u64 malloc_errors;
- __u64 uncorrectable_errors;
- __u64 corrected_errors;
- __u64 last_physical;
- __u64 unverified_errors;
+ __u64 data_extents_scrubbed; /* # of data extents scrubbed */
+ __u64 tree_extents_scrubbed; /* # of tree extents scrubbed */
+ __u64 data_bytes_scrubbed; /* # of data bytes scrubbed */
+ __u64 tree_bytes_scrubbed; /* # of tree bytes scrubbed */
+ __u64 read_errors; /* # of read errors encountered (EIO) */
+ __u64 csum_errors; /* # of failed csum checks */
+ __u64 verify_errors; /* # of occurences, where the metadata
+ * of a tree block did not match the
+ * expected values, like generation or
+ * logical */
+ __u64 no_csum; /* # of 4k data block for which no csum
+ * is present, probably the result of
+ * data written with nodatasum */
+ __u64 csum_discards; /* # of csum for which no data was found
+ * in the extent tree. */
+ __u64 super_errors; /* # of bad super blocks encountered */
+ __u64 malloc_errors; /* # of internal kmalloc errors. These
+ * will likely cause an incomplete
+ * scrub */
+ __u64 uncorrectable_errors; /* # of errors where either no intact
+ * copy was found or the writeback
+ * failed */
+ __u64 corrected_errors; /* # of errors corrected */
+ __u64 last_physical; /* last physical address scrubbed. In
+ * case a scrub was aborted, this can
+ * be used to restart the scrub */
+ __u64 unverified_errors; /* # of occurences where a read for a
+ * full (64k) bio failed, but the re-
+ * check succeeded for each 4k piece.
+ * Intermittent error. */
};
#define BTRFS_SCRUB_READONLY 1