68 /*
69 * Private ARC flags. These flags are private ARC only flags that
70 * will show up in b_flags in the arc_hdr_buf_t. These flags should
71 * only be set by ARC code.
72 */
73 ARC_FLAG_IN_HASH_TABLE = 1 << 7, /* buffer is hashed */
74 ARC_FLAG_IO_IN_PROGRESS = 1 << 8, /* I/O in progress */
75 ARC_FLAG_IO_ERROR = 1 << 9, /* I/O failed for buf */
76 ARC_FLAG_FREED_IN_READ = 1 << 10, /* freed during read */
77 ARC_FLAG_BUF_AVAILABLE = 1 << 11, /* block not in use */
78 ARC_FLAG_INDIRECT = 1 << 12, /* indirect block */
79 ARC_FLAG_L2_WRITING = 1 << 13, /* write in progress */
80 ARC_FLAG_L2_EVICTED = 1 << 14, /* evicted during I/O */
81 ARC_FLAG_L2_WRITE_HEAD = 1 << 15, /* head of write list */
82 /* indicates that the buffer contains metadata (otherwise, data) */
83 ARC_FLAG_BUFC_METADATA = 1 << 16,
84
85 /* Flags specifying whether optional hdr struct fields are defined */
86 ARC_FLAG_HAS_L1HDR = 1 << 17,
87 ARC_FLAG_HAS_L2HDR = 1 << 18,
88
89 /*
90 * The arc buffer's compression mode is stored in the top 7 bits of the
91 * flags field, so these dummy flags are included so that MDB can
92 * interpret the enum properly.
93 */
94 ARC_FLAG_COMPRESS_0 = 1 << 24,
95 ARC_FLAG_COMPRESS_1 = 1 << 25,
96 ARC_FLAG_COMPRESS_2 = 1 << 26,
97 ARC_FLAG_COMPRESS_3 = 1 << 27,
98 ARC_FLAG_COMPRESS_4 = 1 << 28,
99 ARC_FLAG_COMPRESS_5 = 1 << 29,
100 ARC_FLAG_COMPRESS_6 = 1 << 30
101
102 } arc_flags_t;
103
104 struct arc_buf {
105 arc_buf_hdr_t *b_hdr;
106 arc_buf_t *b_next;
107 kmutex_t b_evict_lock;
108 void *b_data;
109 arc_evict_func_t *b_efunc;
110 void *b_private;
111 };
112
113 typedef enum arc_buf_contents {
114 ARC_BUFC_DATA, /* buffer contains data */
115 ARC_BUFC_METADATA, /* buffer contains metadata */
116 ARC_BUFC_NUMTYPES
117 } arc_buf_contents_t;
118
119 /*
120 * The following breakdows of arc_size exist for kstat only.
121 */
|
68 /*
69 * Private ARC flags. These flags are private ARC only flags that
70 * will show up in b_flags in the arc_hdr_buf_t. These flags should
71 * only be set by ARC code.
72 */
73 ARC_FLAG_IN_HASH_TABLE = 1 << 7, /* buffer is hashed */
74 ARC_FLAG_IO_IN_PROGRESS = 1 << 8, /* I/O in progress */
75 ARC_FLAG_IO_ERROR = 1 << 9, /* I/O failed for buf */
76 ARC_FLAG_FREED_IN_READ = 1 << 10, /* freed during read */
77 ARC_FLAG_BUF_AVAILABLE = 1 << 11, /* block not in use */
78 ARC_FLAG_INDIRECT = 1 << 12, /* indirect block */
79 ARC_FLAG_L2_WRITING = 1 << 13, /* write in progress */
80 ARC_FLAG_L2_EVICTED = 1 << 14, /* evicted during I/O */
81 ARC_FLAG_L2_WRITE_HEAD = 1 << 15, /* head of write list */
82 /* indicates that the buffer contains metadata (otherwise, data) */
83 ARC_FLAG_BUFC_METADATA = 1 << 16,
84
85 /* Flags specifying whether optional hdr struct fields are defined */
86 ARC_FLAG_HAS_L1HDR = 1 << 17,
87 ARC_FLAG_HAS_L2HDR = 1 << 18,
88 } arc_flags_t;
89
90 struct arc_buf {
91 arc_buf_hdr_t *b_hdr;
92 arc_buf_t *b_next;
93 kmutex_t b_evict_lock;
94 void *b_data;
95 arc_evict_func_t *b_efunc;
96 void *b_private;
97 };
98
99 typedef enum arc_buf_contents {
100 ARC_BUFC_DATA, /* buffer contains data */
101 ARC_BUFC_METADATA, /* buffer contains metadata */
102 ARC_BUFC_NUMTYPES
103 } arc_buf_contents_t;
104
105 /*
106 * The following breakdows of arc_size exist for kstat only.
107 */
|