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 / job / job.h < prev    next >
C/C++ Source or Header  |  2010-09-08  |  29KB  |  754 lines

  1. /*
  2.  * (C) 2001 Clemson University and The University of Chicago
  3.  *
  4.  * See COPYING in top-level directory.
  5.  */
  6.  
  7. /* this file contains prototypes for the job interface */
  8.  
  9. #ifndef __JOB_H
  10. #define __JOB_H
  11.  
  12. #include <inttypes.h>
  13.  
  14. #include "src/io/flow/flow.h"
  15. #include "bmi.h"
  16. #include "pvfs2-types.h"
  17. #include "pvfs2-storage.h"
  18. #include "pvfs2-req-proto.h"
  19. #include "pint-dev.h"
  20. #include "src/server/request-scheduler/request-scheduler.h"
  21.  
  22. typedef PVFS_id_gen_t job_id_t;
  23. typedef PVFS_context_id job_context_id;
  24. /* integer type; large enough to hold a pointer */
  25. typedef intptr_t job_aint;
  26.  
  27. #define JOB_MAX_CONTEXTS 16
  28.  
  29. /* used to report the status of jobs upon completion */
  30. typedef struct job_status
  31. {
  32.     /* the comments indicate which type of job will fill in which fields */
  33.     job_aint status_user_tag;   /* tag supplied by caller */
  34.     int error_code;        /* returned by all operations */
  35.     PVFS_size actual_size;    /* resize, bmi_recv */
  36.     PVFS_vtag *vtag;        /* most trove operations */
  37.     PVFS_ds_position position;    /* iterate, iterate_keys, iterate_handles */
  38.     PVFS_handle handle;        /* dspace_create */
  39.     PVFS_ds_type type;        /* dspace_verify */
  40.     PVFS_fs_id coll_id;        /* fs_lookup */
  41.     int count;            /* keyval_iterate, iterate_handles */
  42. }
  43. job_status_s;
  44.  
  45. enum job_flags
  46. {
  47.     JOB_NO_IMMED_COMPLETE = 1
  48. };
  49.  
  50.  
  51. #define JOB_TIMEOUT_INF (-1)
  52.  
  53. /******************************************************************
  54.  * management functions
  55.  */
  56.  
  57. int job_initialize(int flags);
  58.  
  59. int job_finalize(void);
  60.  
  61. int job_open_context(job_context_id* context_id);
  62.  
  63. void job_close_context(job_context_id context_id);
  64.  
  65. int job_reset_timeout(job_id_t id, int timeout_sec);
  66.  
  67. /******************************************************************
  68.  * job posting functions
  69.  */
  70.  
  71. /* network send */
  72. int job_bmi_send(PVFS_BMI_addr_t addr,
  73.                  void *buffer,
  74.                  bmi_size_t size,
  75.                  bmi_msg_tag_t tag,
  76.                  enum bmi_buffer_type buffer_type,
  77.                  int send_unexpected,
  78.                  void *user_ptr,
  79.                  job_aint status_user_tag,
  80.                  job_status_s * out_status_p,
  81.                  job_id_t * id,
  82.                  job_context_id context_id,
  83.                  int timeout_sec,
  84.                  PVFS_hint hints);
  85.  
  86. /* network send (list of buffers) */
  87. int job_bmi_send_list(PVFS_BMI_addr_t addr,
  88.                       void **buffer_list,
  89.                       bmi_size_t * size_list,
  90.                       int list_count,
  91.                       bmi_size_t total_size,
  92.                       bmi_msg_tag_t tag,
  93.                       enum bmi_buffer_type buffer_type,
  94.                       int send_unexpected,
  95.                       void *user_ptr,
  96.                       job_aint status_user_tag,
  97.                       job_status_s * out_status_p,
  98.                       job_id_t * id,
  99.                       job_context_id context_id,
  100.                       int timeout_sec,
  101.                       PVFS_hint hints);
  102.  
  103. /* network receive */
  104. int job_bmi_recv(PVFS_BMI_addr_t addr,
  105.                  void *buffer,
  106.                  bmi_size_t size,
  107.                  bmi_msg_tag_t tag,
  108.                  enum bmi_buffer_type buffer_type,
  109.                  void *user_ptr,
  110.                  job_aint status_user_tag,
  111.                  job_status_s * out_status_p,
  112.                  job_id_t * id,
  113.                  job_context_id context_id,
  114.                  int timeout_sec,
  115.                  PVFS_hint hints);
  116.  
  117. /* network receive (list of buffers) */
  118. int job_bmi_recv_list(PVFS_BMI_addr_t addr,
  119.                       void **buffer_list,
  120.                       bmi_size_t * size_list,
  121.                       int list_count,
  122.                       bmi_size_t total_expected_size,
  123.                       bmi_msg_tag_t tag,
  124.                       enum bmi_buffer_type buffer_type,
  125.                       void *user_ptr,
  126.                       job_aint status_user_tag,
  127.                       job_status_s * out_status_p,
  128.                       job_id_t * id,
  129.                       job_context_id context_id,
  130.                       int timeout_sec,
  131.                       PVFS_hint hints);
  132.  
  133. /* unexpected network receive */
  134. int job_bmi_unexp(struct BMI_unexpected_info *bmi_unexp_d,
  135.                   void *user_ptr,
  136.                   job_aint status_user_tag,
  137.                   job_status_s * out_status_p,
  138.                   job_id_t * id,
  139.                   enum job_flags flags,
  140.                   job_context_id context_id);
  141.  
  142. int job_bmi_unexp_cancel(job_id_t id);
  143.  
  144. int job_bmi_cancel(job_id_t id,
  145.                    job_context_id context_id);
  146.  
  147. /* unexpected device receive */
  148. int job_dev_unexp(struct PINT_dev_unexp_info* dev_unexp_d,
  149.                   void* user_ptr,
  150.                   job_aint status_user_tag,
  151.                   job_status_s * out_status_p,
  152.                   job_id_t* id,
  153.                   enum job_flags flags,
  154.                   job_context_id context_id);
  155.  
  156. /* device write */
  157. int job_dev_write(void* buffer,
  158.                   int size,
  159.                   PVFS_id_gen_t tag,
  160.                   enum PINT_dev_buffer_type buffer_type,
  161.                   void* user_ptr,
  162.                   job_aint status_user_tag,
  163.                   job_status_s * out_status_p,
  164.                   job_id_t * id,
  165.                   job_context_id context_id);
  166.  
  167. /* device write list */
  168. int job_dev_write_list(void** buffer_list,
  169.                        int* size_list,
  170.                        int list_count,
  171.                        int total_size,
  172.                        PVFS_id_gen_t tag,
  173.                        enum PINT_dev_buffer_type buffer_type,
  174.                        void* user_ptr,
  175.                        job_aint status_user_tag,
  176.                        job_status_s* out_status_p,
  177.                        job_id_t* id,
  178.                        job_context_id context_id);
  179.  
  180. /* request scheduler post */
  181. int job_req_sched_post(enum PVFS_server_op op,
  182.                        PVFS_fs_id fs_id,
  183.                        PVFS_handle handle,
  184.                        enum PINT_server_req_access_type access_type,
  185.                        enum PINT_server_sched_policy sched_policy,
  186.                void *user_ptr,
  187.                job_aint status_user_tag,
  188.                job_status_s * out_status_p,
  189.                job_id_t * id,
  190.                job_context_id context_id);
  191.  
  192. /* change the mode */
  193. int job_req_sched_change_mode(enum PVFS_server_mode mode,
  194.                               void *user_ptr,
  195.                               job_aint status_user_tag,
  196.                               job_status_s *out_status_p,
  197.                               job_id_t *id,
  198.                               job_context_id context_id);
  199.  
  200. int job_req_sched_post_timer(int msecs,
  201.                              void *user_ptr,
  202.                              job_aint status_user_tag,
  203.                              job_status_s * out_status_p,
  204.                              job_id_t * id,
  205.                              job_context_id context_id);
  206.  
  207. /* request scheduler release */
  208. int job_req_sched_release(job_id_t in_completed_id,
  209.                           void *user_ptr,
  210.                           job_aint status_user_tag,
  211.                           job_status_s * out_status_p,
  212.                           job_id_t * out_id,
  213.                           job_context_id context_id);
  214.  
  215.  
  216. /* complex I/O operation (disk, net, or mem) */
  217. int job_flow(flow_descriptor * flow_d,
  218.              void *user_ptr,
  219.              job_aint status_user_tag,
  220.              job_status_s * out_status_p,
  221.              job_id_t * id,
  222.              job_context_id context_id,
  223.              int timeout_sec,
  224.              PVFS_hint hints);
  225.  
  226. int job_flow_cancel(job_id_t id, job_context_id context_id);
  227.  
  228. /* storage byte stream write */
  229. int job_trove_bstream_write_list(PVFS_fs_id coll_id,
  230.                                  PVFS_handle handle,
  231.                                  char **mem_offset_array,
  232.                                  PVFS_size *mem_size_array,
  233.                                  int mem_count,
  234.                                  PVFS_offset *stream_offset_array,
  235.                                  PVFS_size *stream_size_array,
  236.                                  int stream_count,
  237.                                  PVFS_size *out_size_p,
  238.                                  PVFS_ds_flags flags,
  239.                                  PVFS_vtag *vtag,
  240.                                  void * user_ptr,
  241.                                  job_aint status_user_tag,
  242.                                  job_status_s * out_status_p,
  243.                                  job_id_t * id,
  244.                                  job_context_id context_id,
  245.                                  PVFS_hint hints);
  246.  
  247.  
  248. /* storage byte stream read */
  249.  
  250. int job_trove_bstream_read_list(PVFS_fs_id coll_id,
  251.                                 PVFS_handle handle,
  252.                                 char **mem_offset_array,
  253.                                 PVFS_size *mem_size_array,
  254.                                 int mem_count,
  255.                                 PVFS_offset *stream_offset_array,
  256.                                 PVFS_size *stream_size_array,
  257.                                 int stream_count,
  258.                                 PVFS_size *out_size_p,
  259.                                 PVFS_ds_flags flags,
  260.                                 PVFS_vtag *vtag,
  261.                                 void * user_ptr,
  262.                                 job_aint status_user_tag,
  263.                                 job_status_s * out_status_p,
  264.                                 job_id_t * id,
  265.                                 job_context_id context_id,
  266.                                 PVFS_hint hints);
  267.  
  268. /* byte stream flush to storage */
  269. int job_trove_bstream_flush(PVFS_fs_id coll_id,
  270.                             PVFS_handle handle,
  271.                             PVFS_ds_flags flags,
  272.                             void *user_ptr,
  273.                             job_aint status_user_tag,
  274.                             job_status_s * out_status_p,
  275.                             job_id_t * id,
  276.                             job_context_id context_id,
  277.                             PVFS_hint hints);
  278.  
  279. /* storage key/value read */
  280. int job_trove_keyval_read(PVFS_fs_id coll_id,
  281.                           PVFS_handle handle,
  282.                           PVFS_ds_keyval * key_p,
  283.                           PVFS_ds_keyval * val_p,
  284.                           PVFS_ds_flags flags,
  285.                           PVFS_vtag * vtag,
  286.                           void *user_ptr,
  287.                           job_aint status_user_tag,
  288.                           job_status_s * out_status_p,
  289.                           job_id_t * id,
  290.                           job_context_id context_id,
  291.                           PVFS_hint hints);
  292.  
  293. /* storage key/value read list */
  294. int job_trove_keyval_read_list(PVFS_fs_id coll_id,
  295.                                PVFS_handle handle,
  296.                                PVFS_ds_keyval * key_array,
  297.                                PVFS_ds_keyval * val_array,
  298.                                PVFS_error * err_array,
  299.                                int count,
  300.                                PVFS_ds_flags flags,
  301.                                PVFS_vtag * vtag,
  302.                                void *user_ptr,
  303.                                job_aint status_user_tag,
  304.                                job_status_s * out_status_p,
  305.                                job_id_t * id,
  306.                                job_context_id context_id,
  307.                                PVFS_hint hints);
  308.  
  309. /* storage key/value write */
  310. int job_trove_keyval_write(PVFS_fs_id coll_id,
  311.                            PVFS_handle handle,
  312.                            PVFS_ds_keyval * key_p,
  313.                            PVFS_ds_keyval * val_p,
  314.                            PVFS_ds_flags flags,
  315.                            PVFS_vtag * vtag,
  316.                            void *user_ptr,
  317.                            job_aint status_user_tag,
  318.                            job_status_s * out_status_p,
  319.                            job_id_t * id,
  320.                            job_context_id context_id,
  321.                            PVFS_hint hints);
  322.  
  323. /* storage key/value write list */
  324. int job_trove_keyval_write_list(PVFS_fs_id coll_id,
  325.                                 PVFS_handle handle,
  326.                                 PVFS_ds_keyval * key_array,
  327.                                 PVFS_ds_keyval * val_array,
  328.                                 int count,
  329.                                 PVFS_ds_flags flags,
  330.                                 PVFS_vtag * vtag,
  331.                                 void *user_ptr,
  332.                                 job_aint status_user_tag,
  333.                                 job_status_s * out_status_p,
  334.                                 job_id_t * id,
  335.                                 job_context_id context_id,
  336.                                 PVFS_hint hints);
  337.  
  338. /* flush keyval data to storage */
  339. int job_trove_keyval_flush(PVFS_fs_id coll_id,
  340.                            PVFS_handle handle,
  341.                            PVFS_ds_flags flags,
  342.                            void * user_ptr,
  343.                            job_aint status_user_tag,
  344.                            job_status_s * out_status_p,
  345.                            job_id_t * id,
  346.                            job_context_id context_id,
  347.                            PVFS_hint hints);
  348.  
  349. /* get handle info for a keyval */
  350. int job_trove_keyval_get_handle_info(PVFS_fs_id coll_id,
  351.                                      PVFS_handle handle,
  352.                                      PVFS_ds_flags flags,
  353.                                      PVFS_ds_keyval_handle_info *info,
  354.                                      void *user_ptr,
  355.                                      job_aint status_user_tag,
  356.                                      job_status_s * out_status_p,
  357.                                      job_id_t * id,
  358.                                      job_context_id context_id,
  359.                                      PVFS_hint hints);
  360.  
  361. /* read generic dspace attributes */
  362. int job_trove_dspace_getattr(PVFS_fs_id coll_id,
  363.                              PVFS_handle handle,
  364.                              void *user_ptr,
  365.                              PVFS_ds_attributes *out_ds_attr_ptr,
  366.                              job_aint status_user_tag,
  367.                              job_status_s * out_status_p,
  368.                              job_id_t * id,
  369.                              job_context_id context_id,
  370.                              PVFS_hint hints);
  371.  
  372. /* read generic dspace attributes for a set of handles */
  373. int job_trove_dspace_getattr_list(PVFS_fs_id coll_id,
  374.                                   int nhandles,
  375.                                   PVFS_handle *handle_array,
  376.                                   void *user_ptr,
  377.                                   PVFS_error *out_error_array,
  378.                                   PVFS_ds_attributes *out_ds_attr_ptr,
  379.                                   job_aint status_user_tag,
  380.                                   job_status_s *out_status_p,
  381.                                   job_id_t *id,
  382.                                   job_context_id context_id,
  383.                                   PVFS_hint hints);
  384.  
  385. /* write generic dspace attributes */
  386. int job_trove_dspace_setattr(PVFS_fs_id coll_id,
  387.                              PVFS_handle handle,
  388.                              PVFS_ds_attributes * ds_attr_p,
  389.                              PVFS_ds_flags flags,
  390.                              void *user_ptr,
  391.                              job_aint status_user_tag,
  392.                              job_status_s * out_status_p,
  393.                              job_id_t * id,
  394.                              job_context_id context_id,
  395.                              PVFS_hint hints);
  396.  
  397. /* resize (truncate or preallocate) a storage byte stream */
  398. int job_trove_bstream_resize(PVFS_fs_id coll_id,
  399.                              PVFS_handle handle,
  400.                              PVFS_size size,
  401.                              PVFS_ds_flags flags,
  402.                              PVFS_vtag * vtag,
  403.                              void *user_ptr,
  404.                              job_aint status_user_tag,
  405.                              job_status_s * out_status_p,
  406.                              job_id_t * id,
  407.                              job_context_id context_id,
  408.                              PVFS_hint hints);
  409.  
  410. /* check consistency of a bytestream for a given vtag */
  411. int job_trove_bstream_validate(PVFS_fs_id coll_id,
  412.                                PVFS_handle handle,
  413.                                PVFS_vtag * vtag,
  414.                                void *user_ptr,
  415.                                job_aint status_user_tag,
  416.                                job_status_s * out_status_p,
  417.                                job_id_t * id,
  418.                                job_context_id context_id,
  419.                                PVFS_hint hints);
  420.  
  421. /* remove a key/value entry */
  422. int job_trove_keyval_remove(PVFS_fs_id coll_id,
  423.                             PVFS_handle handle,
  424.                             PVFS_ds_keyval * key_p,
  425.                             PVFS_ds_keyval * val_p,
  426.                             PVFS_ds_flags flags,
  427.                             PVFS_vtag * vtag,
  428.                             void *user_ptr,
  429.                             job_aint status_user_tag,
  430.                             job_status_s * out_status_p,
  431.                             job_id_t * id,
  432.                             job_context_id context_id,
  433.                             PVFS_hint hints);
  434.  
  435. /* remove a list of key/value entries */
  436. int job_trove_keyval_remove_list(PVFS_fs_id coll_id,
  437.                                   PVFS_handle handle,
  438.                                   PVFS_ds_keyval * key_a,
  439.                                   PVFS_ds_keyval * val_a,
  440.                                   int * error_a,
  441.                                   int count,
  442.                                   PVFS_ds_flags flags,
  443.                                   PVFS_vtag * vtag,
  444.                                   void *user_ptr,
  445.                                   job_aint status_user_tag,
  446.                                   job_status_s * out_status_p,
  447.                                   job_id_t * id,
  448.                                   job_context_id context_id,
  449.                                   PVFS_hint hints);
  450.  
  451. /* check consistency of a key/value pair for a given vtag */
  452. int job_trove_keyval_validate(PVFS_fs_id coll_id,
  453.                               PVFS_handle handle,
  454.                               PVFS_vtag * vtag,
  455.                               void *user_ptr,
  456.                               job_aint status_user_tag,
  457.                               job_status_s * out_status_p,
  458.                               job_id_t * id,
  459.                               job_context_id context_id,
  460.                               PVFS_hint hints);
  461.  
  462. /* iterate through all of the key/value pairs for a data space */
  463. int job_trove_keyval_iterate(PVFS_fs_id coll_id,
  464.                              PVFS_handle handle,
  465.                              PVFS_ds_position position,
  466.                              PVFS_ds_keyval * key_array,
  467.                              PVFS_ds_keyval * val_array,
  468.                              int count,
  469.                              PVFS_ds_flags flags,
  470.                              PVFS_vtag * vtag,
  471.                              void *user_ptr,
  472.                              job_aint status_user_tag,
  473.                              job_status_s * out_status_p,
  474.                              job_id_t * id,
  475.                              job_context_id context_id,
  476.                              PVFS_hint hints);
  477.  
  478. /* iterate through all of the keys for a data space */
  479. int job_trove_keyval_iterate_keys(PVFS_fs_id coll_id,
  480.                                   PVFS_handle handle,
  481.                                   PVFS_ds_position position,
  482.                                   PVFS_ds_keyval * key_array,
  483.                                   int count,
  484.                                   PVFS_ds_flags flags,
  485.                                   PVFS_vtag * vtag,
  486.                                   void *user_ptr,
  487.                                   job_aint status_user_tag,
  488.                                   job_status_s * out_status_p,
  489.                                   job_id_t * id,
  490.                                   job_context_id context_id,
  491.                                   PVFS_hint hints);
  492.  
  493. /* iterates through all handles in a collection */
  494. int job_trove_dspace_iterate_handles(PVFS_fs_id coll_id,
  495.                                      PVFS_ds_position position,
  496.                                      PVFS_handle* handle_array,
  497.                                      int count,
  498.                                      PVFS_ds_flags flags,
  499.                                      PVFS_vtag* vtag,
  500.                                      void* user_ptr,
  501.                                      job_aint status_user_tag,
  502.                                      job_status_s* out_status_p,
  503.                                      job_id_t* id,
  504.                                      job_context_id context_id);
  505.  
  506. /* create a new data space object */
  507. int job_trove_dspace_create(PVFS_fs_id coll_id,
  508.                             PVFS_handle_extent_array *handle_extent_array,
  509.                             PVFS_ds_type type,
  510.                             void *hint,
  511.                             PVFS_ds_flags flags,
  512.                             void *user_ptr,
  513.                             job_aint status_user_tag,
  514.                             job_status_s * out_status_p,
  515.                             job_id_t * id,
  516.                             job_context_id context_id,
  517.                             PVFS_hint hints);
  518.  
  519. /* create a set of new data space objects */
  520. int job_trove_dspace_create_list(PVFS_fs_id coll_id,
  521.                 PVFS_handle_extent_array *handle_extent_array,
  522.                             PVFS_handle* out_handle_arry,
  523.                             int count,
  524.                 PVFS_ds_type type,
  525.                 void *hint,
  526.                             PVFS_ds_flags flags,
  527.                 void *user_ptr,
  528.                 job_aint status_user_tag,
  529.                 job_status_s * out_status_p,
  530.                 job_id_t * id,
  531.                 job_context_id context_id,
  532.                             PVFS_hint hints);
  533.  
  534. /* remove an entire data space object (byte stream and key/value) */
  535. int job_trove_dspace_remove(PVFS_fs_id coll_id,
  536.                             PVFS_handle handle,
  537.                             PVFS_ds_flags flags,
  538.                             void *user_ptr,
  539.                             job_aint status_user_tag,
  540.                             job_status_s * out_status_p,
  541.                             job_id_t * id,
  542.                             job_context_id context_id,
  543.                             PVFS_hint hints);
  544.  
  545. /* remove a list of data space objects (byte stream and key/value) */
  546. int job_trove_dspace_remove_list(PVFS_fs_id coll_id,
  547.                 PVFS_handle* handle_array,
  548.                             PVFS_error *out_error_array,
  549.                             int count,
  550.                             PVFS_ds_flags flags,
  551.                 void *user_ptr,
  552.                 job_aint status_user_tag,
  553.                 job_status_s * out_status_p,
  554.                 job_id_t * id,
  555.                 job_context_id context_id,
  556.                             PVFS_hint hints);
  557.  
  558. /* verify that a given dataspace exists and discover its type */
  559. int job_trove_dspace_verify(PVFS_fs_id coll_id,
  560.                             PVFS_handle handle,
  561.                             PVFS_ds_flags flags,
  562.                             void *user_ptr,
  563.                             job_aint status_user_tag,
  564.                             job_status_s * out_status_p,
  565.                             job_id_t * id,
  566.                             job_context_id context_id,
  567.                             PVFS_hint hints);
  568.  
  569. int job_trove_dspace_cancel(PVFS_fs_id coll_id,
  570.                             job_id_t id,
  571.                             job_context_id context_id);
  572.  
  573. /* create a new file system */
  574. int job_trove_fs_create(char *collname,
  575.                         PVFS_fs_id new_coll_id,
  576.                         void *user_ptr,
  577.                         job_aint status_user_tag,
  578.                         job_status_s * out_status_p,
  579.                         job_id_t * id,
  580.                         job_context_id context_id);
  581.  
  582. /* remove an existing file system */
  583. int job_trove_fs_remove(char *collname,
  584.                         void *user_ptr,
  585.                         job_aint status_user_tag,
  586.                         job_status_s * out_status_p,
  587.                         job_id_t * id,
  588.                         job_context_id context_id);
  589.  
  590. /* lookup a file system based on a string name */
  591. int job_trove_fs_lookup(char *collname,
  592.                         void *user_ptr,
  593.                         job_aint status_user_tag,
  594.                         job_status_s * out_status_p,
  595.                         job_id_t * id,
  596.                         job_context_id context_id);
  597.  
  598. /* set extended attributes for a file system */
  599. int job_trove_fs_seteattr(PVFS_fs_id coll_id,
  600.                           PVFS_ds_keyval * key_p,
  601.                           PVFS_ds_keyval * val_p,
  602.                           PVFS_ds_flags flags,
  603.                           void *user_ptr,
  604.                           job_aint status_user_tag,
  605.                           job_status_s * out_status_p,
  606.                           job_id_t * id,
  607.                           job_context_id context_id,
  608.                           PVFS_hint hints);
  609.  
  610. /* read extended attributes for a file system */
  611. int job_trove_fs_geteattr(PVFS_fs_id coll_id,
  612.                           PVFS_ds_keyval * key_p,
  613.                           PVFS_ds_keyval * val_p,
  614.                           PVFS_ds_flags flags,
  615.                           void *user_ptr,
  616.                           job_aint status_user_tag,
  617.                           job_status_s * out_status_p,
  618.                           job_id_t * id,
  619.                           job_context_id context_id,
  620.                           PVFS_hint hints);
  621.  
  622. /* delete extended attributes for a file system */
  623. int job_trove_fs_deleattr(PVFS_fs_id coll_id,
  624.                           PVFS_ds_keyval * key_p,
  625.                           PVFS_ds_flags flags,
  626.                           void *user_ptr,
  627.                           job_aint status_user_tag,
  628.                           job_status_s * out_status_p,
  629.                           job_id_t * id,
  630.                           job_context_id context_id,
  631.                           PVFS_hint hints);
  632.  
  633. int job_null(
  634.     int error_code,
  635.     void *user_ptr,
  636.     job_aint status_user_tag,
  637.     job_status_s * out_status_p,
  638.     job_id_t * id,
  639.     job_context_id context_id);
  640.  
  641. int job_precreate_pool_fill(
  642.     PVFS_handle precreate_pool,
  643.     PVFS_fs_id fsid,
  644.     PVFS_handle* precreate_handle_array,
  645.     int precreate_handle_count,
  646.     void *user_ptr,
  647.     job_aint status_user_tag,
  648.     job_status_s * out_status_p,
  649.     job_id_t * id,
  650.     job_context_id context_id,
  651.     PVFS_hint hints);
  652.  
  653. int job_precreate_pool_fill_signal_error(
  654.     PVFS_handle precreate_pool,
  655.     PVFS_fs_id fsid,
  656.     int error_code,
  657.     void *user_ptr,
  658.     job_aint status_user_tag,
  659.     job_status_s * out_status_p,
  660.     job_id_t * id,
  661.     job_context_id context_id);
  662.  
  663. int job_precreate_pool_check_level(
  664.     PVFS_handle precreate_pool,
  665.     PVFS_fs_id fsid,
  666.     int low_threshold,
  667.     void *user_ptr,
  668.     job_aint status_user_tag,
  669.     job_status_s * out_status_p,
  670.     job_id_t * id,
  671.     job_context_id context_id);
  672.  
  673. int job_precreate_pool_iterate_handles(
  674.     PVFS_fs_id fsid,
  675.     PVFS_ds_position position,
  676.     PVFS_handle* handle_array,
  677.     int count,
  678.     PVFS_ds_flags flags,
  679.     PVFS_vtag* vtag,
  680.     void* user_ptr,
  681.     job_aint status_user_tag,
  682.     job_status_s* out_status_p,
  683.     job_id_t* id,
  684.     job_context_id context_id,
  685.     PVFS_hint hints);
  686.  
  687. int job_precreate_pool_get_handles(
  688.     PVFS_fs_id fsid,
  689.     int count,
  690.     PVFS_ds_type type,
  691.     const char** servers,
  692.     PVFS_handle* handle_array,
  693.     PVFS_ds_flags flags,
  694.     void *user_ptr,
  695.     job_aint status_user_tag,
  696.     job_status_s * out_status_p,
  697.     job_id_t * id,
  698.     job_context_id context_id,
  699.     PVFS_hint hints);
  700.  
  701. int job_precreate_pool_register_server(
  702.     const char* host, 
  703.     PVFS_ds_type type,
  704.     PVFS_fs_id fsid, 
  705.     PVFS_handle pool_handle, 
  706.     int count,
  707.     uint32_t *batch_count);
  708.  
  709. int job_precreate_pool_lookup_server(
  710.     const char* host, 
  711.     PVFS_ds_type type,
  712.     PVFS_fs_id fsid, 
  713.     PVFS_handle* pool_handle);
  714.   
  715. void job_precreate_pool_set_index(
  716.     int server_index);
  717.  
  718. /******************************************************************
  719.  * job test/wait for completion functions
  720.  */
  721.  
  722. int job_test(job_id_t id,
  723.              int *out_count_p,
  724.              void **returned_user_ptr_p,
  725.              job_status_s * out_status_p,
  726.              int timeout_ms,
  727.              job_context_id context_id);
  728.  
  729. int job_testsome(job_id_t * id_array,
  730.                  int *inout_count_p,
  731.                  int *out_index_array,
  732.                  void **returned_user_ptr_array,
  733.                  job_status_s * out_status_array_p,
  734.                  int timeout_ms,
  735.                  job_context_id context_id);
  736.  
  737. int job_testcontext(job_id_t * out_id_array_p,
  738.                     int *inout_count_p,
  739.                     void **returned_user_ptr_array,
  740.                     job_status_s * out_status_array_p,
  741.                     int timeout_ms,
  742.                     job_context_id context_id);
  743.  
  744. #endif /* __JOB_H */
  745.  
  746. /*
  747.  * Local variables:
  748.  *  c-indent-level: 4
  749.  *  c-basic-offset: 4
  750.  * End:
  751.  *
  752.  * vim: ts=8 sts=4 sw=4 expandtab
  753.  */
  754.