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 / dev / pint-dev.h < prev   
C/C++ Source or Header  |  2010-01-29  |  2KB  |  108 lines

  1. /*
  2.  * (C) 2001 Clemson University and The University of Chicago
  3.  *
  4.  * See COPYING in top-level directory.
  5.  */
  6. #ifndef __PINT_DEV_H
  7. #define __PINT_DEV_H
  8.  
  9. #include "pvfs2-types.h"
  10. #include "pint-dev-shared.h"
  11.  
  12.  
  13. /* parameter structure used in PVFS_DEV_DEBUG ioctl command */
  14. typedef struct
  15. {
  16.   enum 
  17.   {
  18.      KERNEL_MASK,
  19.      CLIENT_MASK,
  20.   } mask_type;
  21.   uint64_t mask_value;
  22. } dev_mask_info_t;
  23.  
  24.  
  25.  
  26. enum pvfs_bufmap_type {
  27.     BM_IO = 0,
  28.     BM_READDIR = 1,
  29. };
  30.  
  31. /* describes unexpected messages coming out of the device */
  32. struct PINT_dev_unexp_info
  33. {
  34.     void *buffer;
  35.     int size;
  36.     PVFS_id_gen_t tag;
  37. };
  38.  
  39. /* types of memory buffers accepted in the write calls */
  40. enum PINT_dev_buffer_type
  41. {
  42.     PINT_DEV_PRE_ALLOC = 1,
  43.     PINT_DEV_EXT_ALLOC = 2
  44. };
  45.  
  46. struct PINT_dev_params 
  47. {
  48.     uint32_t dev_buffer_count;
  49.     uint64_t dev_buffer_size;
  50. };
  51.  
  52. int PINT_dev_initialize(
  53.     const char* dev_name,
  54.     int flags);
  55.  
  56. int PINT_dev_get_mapped_regions(
  57.     int ndesc,
  58.     struct PVFS_dev_map_desc *desc,
  59.     struct PINT_dev_params *params);
  60.  
  61. void PINT_dev_put_mapped_regions(
  62.     int ndesc,
  63.     struct PVFS_dev_map_desc *desc);
  64.  
  65. void *PINT_dev_get_mapped_buffer(
  66.     enum pvfs_bufmap_type bm_type,
  67.     struct PVFS_dev_map_desc *desc,
  68.     int buffer_index);
  69.  
  70. int PINT_dev_test_unexpected(
  71.     int incount,
  72.     int *outcount,
  73.     struct PINT_dev_unexp_info *info_array,
  74.     int max_idle_time);
  75.  
  76. int PINT_dev_release_unexpected(
  77.     struct PINT_dev_unexp_info* info);
  78.  
  79. int PINT_dev_write_list(
  80.     void **buffer_list,
  81.     int *size_list,
  82.     int list_count,
  83.     int total_size,
  84.     enum PINT_dev_buffer_type buffer_type,
  85.     PVFS_id_gen_t tag);
  86.  
  87. int PINT_dev_write(
  88.     void *buffer,
  89.     int size,
  90.     enum PINT_dev_buffer_type buffer_type,
  91.     PVFS_id_gen_t tag);
  92.  
  93. int PINT_dev_remount(void);
  94. void *PINT_dev_memalloc(int size);
  95. void PINT_dev_memfree(void* buffer, int size);
  96. void PINT_dev_finalize(void);
  97.  
  98. #endif /* __PINT_DEV_H */
  99.  
  100. /*
  101.  * Local variables:
  102.  *  c-indent-level: 4
  103.  *  c-basic-offset: 4
  104.  * End:
  105.  *
  106.  * vim: ts=8 sts=4 sw=4 expandtab
  107.  */
  108.