Print this page
NEX-16625 Max amount of iSCSI targets is hard limited with doorfs core definitions
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-5164 backport illumos 6514 AS_* lock macros simplification
Reviewed by: Kevin Crowe <kevin.crowe@nexenta.com>
6514 AS_* lock macros simplification
Reviewed by: Piotr Jasiukajtis <estibi@me.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Approved by: Dan McDonald <danmcd@omniti.com>


  64 #include <vm/seg_vn.h>
  65 #include <vm/seg_kpm.h>
  66 
  67 #include <sys/modctl.h>
  68 #include <sys/syscall.h>
  69 #include <sys/pathname.h>
  70 #include <sys/rctl.h>
  71 
  72 /*
  73  * The maximum amount of data (in bytes) that will be transferred using
  74  * an intermediate kernel buffer.  For sizes greater than this we map
  75  * in the destination pages and perform a 1-copy transfer.
  76  */
  77 size_t  door_max_arg = 16 * 1024;
  78 
  79 /*
  80  * Maximum amount of data that will be transferred in a reply to a
  81  * door_upcall.  Need to guard against a process returning huge amounts
  82  * of data and getting the kernel stuck in kmem_alloc.
  83  */
  84 size_t  door_max_upcall_reply = 1024 * 1024;
  85 
  86 /*
  87  * Maximum number of descriptors allowed to be passed in a single
  88  * door_call or door_return.  We need to allocate kernel memory
  89  * for all of them at once, so we can't let it scale without limit.
  90  */
  91 uint_t door_max_desc = 1024;
  92 
  93 /*
  94  * Definition of a door handle, used by other kernel subsystems when
  95  * calling door functions.  This is really a file structure but we
  96  * want to hide that fact.
  97  */
  98 struct __door_handle {
  99         file_t dh_file;
 100 };
 101 
 102 #define DHTOF(dh) ((file_t *)(dh))
 103 #define FTODH(fp) ((door_handle_t)(fp))
 104 




  64 #include <vm/seg_vn.h>
  65 #include <vm/seg_kpm.h>
  66 
  67 #include <sys/modctl.h>
  68 #include <sys/syscall.h>
  69 #include <sys/pathname.h>
  70 #include <sys/rctl.h>
  71 
  72 /*
  73  * The maximum amount of data (in bytes) that will be transferred using
  74  * an intermediate kernel buffer.  For sizes greater than this we map
  75  * in the destination pages and perform a 1-copy transfer.
  76  */
  77 size_t  door_max_arg = 16 * 1024;
  78 
  79 /*
  80  * Maximum amount of data that will be transferred in a reply to a
  81  * door_upcall.  Need to guard against a process returning huge amounts
  82  * of data and getting the kernel stuck in kmem_alloc.
  83  */
  84 size_t  door_max_upcall_reply = 4 * 1024 * 1024;
  85 
  86 /*
  87  * Maximum number of descriptors allowed to be passed in a single
  88  * door_call or door_return.  We need to allocate kernel memory
  89  * for all of them at once, so we can't let it scale without limit.
  90  */
  91 uint_t door_max_desc = 1024;
  92 
  93 /*
  94  * Definition of a door handle, used by other kernel subsystems when
  95  * calling door functions.  This is really a file structure but we
  96  * want to hide that fact.
  97  */
  98 struct __door_handle {
  99         file_t dh_file;
 100 };
 101 
 102 #define DHTOF(dh) ((file_t *)(dh))
 103 #define FTODH(fp) ((door_handle_t)(fp))
 104