home *** CD-ROM | disk | FTP | other *** search
/ ftp.parl.clemson.edu / 2015-02-07.ftp.parl.clemson.edu.tar / ftp.parl.clemson.edu / pub / pvfs2 / orangefs-2.8.3-20110323.tar.gz / orangefs-2.8.3-20110323.tar / orangefs / src / io / description / usage-notes.txt < prev   
Text File  |  2003-01-10  |  2KB  |  50 lines

  1.  
  2. creating requests:
  3.  
  4. requests are created using the request constructor calls
  5. and the predefined requests defined in pvfs_requests.h.
  6.  
  7. "packing" requests:
  8.  
  9. can be done two ways.  User function PVFS_Request_commit
  10. allocates new memory and packs the request into it.  internal
  11. function PINT_Request_commit packs into a buffer provided
  12. by the call.  struct PINT_Request structure has a field
  13. named num_nested_req that is the number of struct PINT_Request
  14. structures in the request below (not including) the current one.
  15. This is an upper bound assuming you don't re-pack the same
  16. subtree (which the functions shouldn't do).
  17.  
  18. encoding/decoding requests:
  19.  
  20. requests are encoded in place with PINT_Request_encode - copy
  21. first if you want to.  decode function works the same way
  22.  
  23. processing requests:
  24.  
  25. to process a request you need a request state structure (which
  26. references a request), and rfdata struct which references a
  27. distribution and has a few key metadata items (number of servers,
  28. server number, file size) plus you need arrays to receive the
  29. offset and length pairs, plus a few arguments.  You can
  30. have multiple states in use simultaneously
  31.  
  32. creating distributions
  33.  
  34. users create distributions before creating files with PVFS_Dist_create
  35. These are allocated contiguously in memory, have a private copy
  36. of the default parameters, but no pointer to the methods (users
  37. don't need 'em).  These can be passed to the create system call
  38.  
  39. encoding/decoding distributions
  40.  
  41. PINT_Dist_encode can either copy a dist into a provided buffer
  42. or encode in place to avoid a copy. same for decode.
  43.  
  44. finding methods
  45.  
  46. PINT_Dist_lookup looks up a distribution and sets up the methods
  47. in the PINT_Dist structure - this should be done before passing
  48. a dist in for processing a request (a future version could do
  49. this automatically).
  50.