Eric Baldeschwieler wrote:
Instead, I think we need the following two functions:

tOffset getBlockSize(dfsFs fs);

char** geHosts(dfsFs fs, char* file, tOffset pos);

** Think your suggestion is good. An addition... I'd rather not assume that block size is global. Why not require a file name in the getBlockSize call? This may prove more future proof.

Good idea.  To be fully future-proof, this could even become:

tOffset* getBlockStarts(dfsFs fs, char* file);

That would permit variable sized-blocks, which could happen, e.g., if we someday support appending to files. Is that overkill?

** Why not wait on the dfsCopy/Move type commands? These can be implemented via a systems call to a commandline tool already, right?

Sure, but applications frequently call these too, so it's nice to make them easily available to C applications. At some point they'll get written in C: better to have them in one place than in every application. But, you're right, they're not essential.

Doug

Reply via email to