path: root/csum-file.h
diff options
authorLinus Torvalds <>2008-05-30 15:42:16 (GMT)
committerJunio C Hamano <>2008-05-31 21:46:57 (GMT)
commit4c81b03e30d13dbc93ea7071438ef2da0acd4189 (patch)
tree73459678fa41737c15a2957215d51bde97528ddf /csum-file.h
parentd2b3691b61d516a0ad2bf700a2a5d9113ceff0b1 (diff)
Make pack creation always fsync() the result
This means that we can depend on packs always being stable on disk, simplifying a lot of the object serialization worries. And unlike loose objects, serializing pack creation IO isn't going to be a performance killer. Signed-off-by: Linus Torvalds <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'csum-file.h')
1 files changed, 5 insertions, 1 deletions
diff --git a/csum-file.h b/csum-file.h
index 1af7656..72c9487 100644
--- a/csum-file.h
+++ b/csum-file.h
@@ -16,9 +16,13 @@ struct sha1file {
unsigned char buffer[8192];
+/* sha1close flags */
+#define CSUM_CLOSE 1
+#define CSUM_FSYNC 2
extern struct sha1file *sha1fd(int fd, const char *name);
extern struct sha1file *sha1fd_throughput(int fd, const char *name, struct progress *tp);
-extern int sha1close(struct sha1file *, unsigned char *, int);
+extern int sha1close(struct sha1file *, unsigned char *, unsigned int);
extern int sha1write(struct sha1file *, void *, unsigned int);
extern void crc32_begin(struct sha1file *);
extern uint32_t crc32_end(struct sha1file *);