00001 #ifndef wcbdef_h 00002 #define wcbdef_h 00003 00004 #define WCB_M_READ 0x1 00005 #define WCB_M_WRITE 0x2 00006 #define WCB_M_NOTFCP 0x4 00007 #define WCB_M_SHRWCB 0x8 00008 #define WCB_M_OVERDRAWN 0x10 00009 #define WCB_M_COMPLETE 0x20 00010 #define WCB_M_CATHEDRAL 0x40 00011 #define WCB_M_EXPIRE 0x80 00012 #define WCB_M_CONTROL 0x1000 00013 #define WCB_M_NO_READ_DATA 0x2000 00014 #define WCB_K_MAP 56 00015 #define WCB_C_MAP 56 00016 #define WCB_K_LENGTH 56 00017 #define WCB_C_LENGTH 56 00018 #define WCB_S_WCBDEF 80 00019 00020 struct _wcb { 00021 struct _wcb *wcb_l_wlfl; 00022 struct _wcb *wcb_l_wlbl; 00023 unsigned short int wcb_w_size; 00024 unsigned char wcb_b_type; 00025 union { 00026 unsigned char wcb_b_access; 00027 struct { 00028 unsigned wcb_v_read : 1; 00029 unsigned wcb_v_write : 1; 00030 unsigned wcb_v_notfcp : 1; 00031 unsigned wcb_v_shrwcb : 1; 00032 unsigned wcb_v_overdrawn : 1; 00033 unsigned wcb_v_complete : 1; 00034 unsigned wcb_v_cathedral : 1; 00035 unsigned wcb_v_expire : 1; 00036 }; 00037 }; 00038 unsigned int wcb_l_pid; 00039 unsigned int wcb_l_refcnt; 00040 struct _ucb *wcb_l_orgucb; 00041 union { 00042 unsigned short wcb_w_acon; 00043 struct { 00044 unsigned wcb_v_nowrite : 1; 00045 unsigned wcb_v_dlock : 1; 00046 unsigned wcb_$_fill_1 : 2; 00047 unsigned wcb_v_spool : 1; 00048 unsigned wcb_v_writeck : 1; 00049 unsigned wcb_v_seqonly : 1; 00050 unsigned wcb_v_snapshot : 1; 00051 unsigned wcb_v_writeac : 1; 00052 unsigned wcb_v_readck : 1; 00053 unsigned wcb_v_noread : 1; 00054 unsigned wcb_v_notrunc : 1; 00055 unsigned wcb_v_control : 1; 00056 unsigned wcb_v_no_read_data : 1; 00057 unsigned wcb_v_fill_2 : 2; 00058 }; 00059 struct { 00060 unsigned wcb_$_fill_3 : 2; 00061 unsigned wcb_v_noacclock : 1; 00062 unsigned wcb_$_fill_4 : 11; 00063 unsigned wcb_v_readinit : 1; 00064 unsigned wcb_v_write_turn : 1; 00065 }; 00066 }; 00067 unsigned short wcb_w_nmap; 00068 struct _fcb *wcb_l_fcb; 00069 struct _rvt *wcb_l_rvt; 00070 void *wcb_l_link; 00071 unsigned int wcb_l_reads; 00072 unsigned int wcb_l_writes; 00073 unsigned int wcb_l_stvbn; 00074 union { 00075 struct { 00076 unsigned short int wcb_w_p1_count; 00077 char wcb_b_fill_8 [10]; 00078 }; 00079 struct { 00080 unsigned int wcb_l_p1_count; 00081 unsigned int wcb_l_p1_lbn; 00082 unsigned int wcb_l_p1_rvn; 00083 }; 00084 struct { 00085 unsigned long long wcb_q_deliq; 00086 char wcb_b_fill_7 [4]; 00087 }; 00088 }; 00089 unsigned int wcb_l_p2_count; 00090 unsigned int wcb_l_p2_lbn; 00091 unsigned int wcb_l_p2_rvn; 00092 00093 // borrowing until I understand wcb better 00094 00095 #if 0 00096 unsigned hd_seg_num; /* Header segment number */ 00097 unsigned short extcount; /* Extents in use */ 00098 unsigned phylen[20]; 00099 unsigned phyblk[20]; 00100 unsigned char rvn[20]; 00101 unsigned long loblk,hiblk; 00102 unsigned hd_basevbn; /* File blocks prior to header */ 00103 #endif 00104 }; 00105 00106 #define WCB_K_MAP_PTR_LENGTH 12 00107 #define WCB_C_MAP_PTR_LENGTH 12 00108 #define WCB_S_WCBDEF1 12 00109 00110 struct _wcb1 { 00111 unsigned int wcb_l_count; 00112 unsigned int wcb_l_lbn; 00113 unsigned int wcb_l_rvn; 00114 }; 00115 00116 #define WCB_S_WCBDEF2 13 00117 00118 struct _wcb2 { 00119 char wcb_$_fill_6; 00120 }; 00121 00122 #endif 00123 00124