[Sheepdog] [PATCH] collie: allow explicit write sizes that are not a multiple of 512

Christoph Hellwig hch at infradead.org
Tue May 15 10:38:10 CEST 2012


Collie vdi write already does an internal read-modify-write cycles for
write sizes that aren't multiples of the block size, which is used when
writing data from stdin without an explicit size argument.  Also allow
using this code when an explicit size argument is given.

Signed-off-by: Christoph Hellwig <hch at lst.de>

---
 collie/vdi.c |    4 ----
 1 file changed, 4 deletions(-)

Index: sheepdog/collie/vdi.c
===================================================================
--- sheepdog.orig/collie/vdi.c	2012-05-06 20:36:32.645068731 +0200
+++ sheepdog/collie/vdi.c	2012-05-15 10:25:22.459977888 +0200
@@ -1215,10 +1215,6 @@ static int vdi_write(int argc, char **ar
 			ret = parse_option_size(argv[optind++], &total);
 			if (ret < 0)
 				return EXIT_USAGE;
-			if (total % 512 != 0) {
-				fprintf(stderr, "Write length must be block-aligned\n");
-				return EXIT_USAGE;
-			}
 		}
 	}
 



More information about the sheepdog mailing list