aboutsummaryrefslogtreecommitdiffstats
path: root/resize/resize2fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'resize/resize2fs.h')
-rw-r--r--resize/resize2fs.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/resize/resize2fs.h b/resize/resize2fs.h
index 21847593..d425491d 100644
--- a/resize/resize2fs.h
+++ b/resize/resize2fs.h
@@ -76,11 +76,26 @@ typedef struct ext2_sim_progress *ext2_sim_progmeter;
#define RESIZE_DEBUG_BMOVE 0x0002
#define RESIZE_DEBUG_INODEMAP 0x0004
#define RESIZE_DEBUG_ITABLEMOVE 0x0008
+#define RESIZE_DEBUG_RTRACK 0x0010
#define RESIZE_PERCENT_COMPLETE 0x0100
#define RESIZE_VERBOSE 0x0200
/*
+ * This structure is used for keeping track of how much resources have
+ * been used for a particular resize2fs pass.
+ */
+struct resource_track {
+ const char *desc;
+ struct timeval time_start;
+ struct timeval user_start;
+ struct timeval system_start;
+ void *brk_start;
+ unsigned long long bytes_read;
+ unsigned long long bytes_written;
+};
+
+/*
* The core state structure for the ext2 resizer
*/
typedef struct ext2_resize_struct *ext2_resize_t;
@@ -148,6 +163,13 @@ extern errcode_t ext2fs_iterate_extent(ext2_extent extent, __u64 *old_loc,
extern errcode_t online_resize_fs(ext2_filsys fs, const char *mtpt,
blk64_t *new_size, int flags);
+/* resource_track.c */
+extern void init_resource_track(struct resource_track *track, const char *desc,
+ io_channel channel);
+extern void print_resource_track(ext2_resize_t rfs,
+ struct resource_track *track,
+ io_channel channel);
+
/* sim_progress.c */
extern errcode_t ext2fs_progress_init(ext2_sim_progmeter *ret_prog,
const char *label,