summaryrefslogtreecommitdiff
path: root/include/data_writer.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-14 17:57:58 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-14 18:06:04 +0200
commite165fb864fe86eda398a14713cf38924cc537adc (patch)
tree217b80d56b1d8c21f3387390db06e525b2f9f064 /include/data_writer.h
parentf57814332a69bebc40e25e6537a3c08fc9e18f97 (diff)
Remove fstree file flags
As a side effect, this requires the data writer to keep track of statistics. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/data_writer.h')
-rw-r--r--include/data_writer.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/data_writer.h b/include/data_writer.h
index 9e82d11..5987cd6 100644
--- a/include/data_writer.h
+++ b/include/data_writer.h
@@ -16,6 +16,17 @@
typedef struct data_writer_t data_writer_t;
+typedef struct {
+ size_t file_count;
+ size_t blocks_written;
+ size_t frag_blocks_written;
+ size_t duplicate_blocks;
+ size_t sparse_blocks;
+ size_t frag_count;
+ size_t frag_dup;
+ uint64_t bytes_read;
+} data_writer_stats_t;
+
enum {
/* Don't generate fragments, always write the last block to disk as a
block, even if it is incomplete. */
@@ -89,4 +100,6 @@ int write_data_from_fd(data_writer_t *data, file_info_t *fi, int infd,
int write_data_from_fd_condensed(data_writer_t *data, file_info_t *fi,
int infd, sparse_map_t *map, int flags);
+data_writer_stats_t *data_writer_get_stats(data_writer_t *data);
+
#endif /* DATA_WRITER_H */