From 14a925f6da442ecade7df75eb46a6edb9a1499af Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 15 Jul 2019 14:44:44 +0200 Subject: Add flags to data writer to micro manage behaviour The added flags allow controlling the following on a per file level: - forcing a file to be written uncompressed - forcing a file to not have a fragment, i.e. the last truncated block actually being written as a block - padding a file to be alligned to device block size The flags are not yet exposed to anything user controllable (such as command line flags). Signed-off-by: David Oberhollenzer --- mkfs/mkfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mkfs') diff --git a/mkfs/mkfs.c b/mkfs/mkfs.c index e72b669..f1c1f1b 100644 --- a/mkfs/mkfs.c +++ b/mkfs/mkfs.c @@ -18,7 +18,7 @@ static int process_file(data_writer_t *data, tree_node_t *n, bool quiet) return -1; } - ret = write_data_from_fd(data, n->data.file, infd); + ret = write_data_from_fd(data, n->data.file, infd, 0); close(infd); return ret; @@ -172,7 +172,7 @@ int main(int argc, char **argv) super.bytes_used += ret; } - data = data_writer_create(&super, cmp, outfd); + data = data_writer_create(&super, cmp, outfd, opt.devblksz); if (data == NULL) goto out_cmp; -- cgit v1.2.3