none
authorLindsayTodd <LindsayTodd>
Wed, 6 Nov 2002 22:44:55 +0000 (22:44 +0000)
committerLindsayTodd <LindsayTodd>
Wed, 6 Nov 2002 22:44:55 +0000 (22:44 +0000)
AFSLore/LargeFiles.mdwn

index 0486009..ab84a0c 100644 (file)
@@ -25,3 +25,23 @@ Remember also that AFS is a wire protocol with multiple implementors. Things lik
 This client-side work is available in the [[OpenAFSCVS]] tree and is expected to become available in the next series of stable releases after the 1.2 series.
 
 -- [[DerrickBrashear]] - 24 Jan 2002
+
+I had a student working on this over the summer. [[HartmutReuter]] provided him with some further specifics:
+
+1) The 1st problem is: where to store the high order 32 bits of the file length in the vnode. My suggestion is:
+
+Since we must use the NAMEI-interface for large file support, anyway, we can use the space currently occupied by vn\_ino\_hi. This is possible because with the NAMEI-interface the high order part of the inode-number is filled with the uniquifier which is already stored in the vnode, elsewhere. You just have to change the macros VN\_SET\_INO etc. and to make sure the field is cleared. (probably you cannot upgrade exisiting servers, but have to move the volumes to new servers.)
+
+2) Use afs\_uint64 instead of afs\_uint32 for file sizes and offsets all over the code. The changes in stds.h show how to handle this on machines without the data type "long long", but I think you will use large file support only on modern systems which eather have native 64bit integers or have "long long".
+
+You must be carefull with the type conversion and casting, I had some strange experiences with it.
+
+3) All library calls for I/O must be replaced by the 64-bit ones. Some times this is just a general -D during the compilation, sometimes the routines have different names.
+
+4) Also the volserver must be able to transmit the high-order bits of the length. Instead of 'f' followed by the afs\_uint32 length of the file and the data we use 'h' followed by two afs\_uint32 numbers (the high order and low order 32 bits of the file size) followed by the data. Of course the old version must be understood for restore as well to allow the move of volumes from old servers to the new ones.
+
+5) The salvager must be changed accordingly: byteCount in viceinode.h must become afs\_uint64 etc.
+
+I've picked up where my student left off, since we are very interested in having large file support. Since the CVS tree has been changing quite a bit lately, I've been working against the unstable 1.3.2 release. I've gotten much working, but not quite all the way yet.
+
+-- [[LindsayTodd]] - 06 Nov 2002