File tree Expand file tree Collapse file tree 4 files changed +216
-58
lines changed Expand file tree Collapse file tree 4 files changed +216
-58
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,15 @@ extern "C" {
63
63
(hdr)->b_psize = ((x) >> SPA_MINBLOCKSHIFT); \
64
64
} while (0)
65
65
66
+ /* The asize in the header is only used by L2 cache */
67
+ #define HDR_SET_ASIZE (hdr , x ) do { \
68
+ ASSERT(IS_P2ALIGNED((x), 1U << SPA_MINBLOCKSHIFT)); \
69
+ (hdr)->b_asize = ((x) >> SPA_MINBLOCKSHIFT); \
70
+ } while (0)
71
+
66
72
#define HDR_GET_LSIZE (hdr ) ((hdr)->b_lsize << SPA_MINBLOCKSHIFT)
67
73
#define HDR_GET_PSIZE (hdr ) ((hdr)->b_psize << SPA_MINBLOCKSHIFT)
74
+ #define HDR_GET_ASIZE (hdr ) ((hdr)->b_asize << SPA_MINBLOCKSHIFT)
68
75
69
76
typedef struct arc_buf_hdr arc_buf_hdr_t ;
70
77
typedef struct arc_buf arc_buf_t ;
@@ -312,6 +319,7 @@ void arc_remove_prune_callback(arc_prune_t *p);
312
319
void arc_freed (spa_t * spa , const blkptr_t * bp );
313
320
314
321
void arc_flush (spa_t * spa , boolean_t retry );
322
+ void arc_flush_async (spa_t * spa );
315
323
void arc_tempreserve_clear (uint64_t reserve );
316
324
int arc_tempreserve_space (spa_t * spa , uint64_t reserve , uint64_t txg );
317
325
Original file line number Diff line number Diff line change @@ -378,8 +378,8 @@ typedef struct l2arc_lb_ptr_buf {
378
378
* L2ARC Internals
379
379
*/
380
380
typedef struct l2arc_dev {
381
- vdev_t * l2ad_vdev ; /* vdev */
382
- spa_t * l2ad_spa ; /* spa */
381
+ vdev_t * l2ad_vdev ; /* can be NULL during remove */
382
+ spa_t * l2ad_spa ; /* can be NULL during remove */
383
383
uint64_t l2ad_hand ; /* next write location */
384
384
uint64_t l2ad_start ; /* first addr on device */
385
385
uint64_t l2ad_end ; /* last addr on device */
@@ -475,8 +475,8 @@ struct arc_buf_hdr {
475
475
476
476
arc_buf_contents_t b_type ;
477
477
uint8_t b_complevel ;
478
- uint8_t b_reserved1 ; /* used for 4 byte alignment */
479
- uint16_t b_reserved2 ; /* used for 4 byte alignment */
478
+ uint8_t b_reserved1 ; /* used for 4 byte alignment */
479
+ uint16_t b_asize ; /* alignment or L2-only asize */
480
480
arc_buf_hdr_t * b_hash_next ;
481
481
arc_flags_t b_flags ;
482
482
You can’t perform that action at this time.
0 commit comments