[OpenAFS-devel] Patches for Openafs compression support
Harald Barth
haba@pdc.kth.se
Wed, 05 Jan 2005 09:00:59 +0100 (MET)
+//return 0 on success, (-1) on fail
This is C++ style / C99. I know, there is other C99 stuff sneaking
into the code - I have submitted patches to add -qlanglvl=stdc99 for
the xlc (VAC) compiler, but I think we should keep the C99 stuff for
places where it is adding functionality. Just /* ... */, ok?
+#define VOLRESTORE_Z 65535
+#define VOLFORWARD_Z 65534
+#define VOLDUMP_Z 65533
+#define VOLFORWARDMULTIPLE_Z 65532
...
+proc RestoreZ(
+ IN afs_int32 toTrans,
+ IN afs_int32 flags,
+ IN struct restoreCookie *cookie,
+ IN afs_int32 compress,
+ IN afs_int32 level
+) split = VOLRESTORE_Z;
Do we want to implement compression as seperate calls for every thing
that we want to compress or should we be able to switch it on/off
like encryption?
Remind me: Did we write something down on how to agree on new calls?
+/* Start a dump and send it to multiple places simultaneously.
+ * If this returns an error (eg, return ENOENT), it means that
+ * none of the releases worked. If this returns 0, that means
+ * that one or more of the releases worked, and the caller has
+ * to examine the results array to see which one(s).
+ * This will only do EITHER incremental or full, not both, so it's
+ * the caller's responsibility to be sure that all the destinations
+ * need just an incremental (and from the same time), if that's
+ * what we're doing.
+ */
This may be good but not "compression" ;-)
There is a lot of func(...., compress, level). Is it possible to write
this a bit differently so we don't need to drag around two additional
arguments everywere?
+int *compress;
...
+ *compress = (0==1);
This is Pascal style. C does not have a boolean type, so it is not
necessary to construct a FALSE.
Harald.