Print this page
3525 Persistent L2ARC
@@ -20,10 +20,11 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2013 Saso Kiselkov. All rights reserved.
*/
#ifndef _SYS_SPA_H
#define _SYS_SPA_H
@@ -290,10 +291,21 @@
(0 == (((zc1).zc_word[0] - (zc2).zc_word[0]) | \
((zc1).zc_word[1] - (zc2).zc_word[1]) | \
((zc1).zc_word[2] - (zc2).zc_word[2]) | \
((zc1).zc_word[3] - (zc2).zc_word[3])))
+#define ZIO_CHECKSUM_BSWAP(_zc) \
+ do { \
+ zio_cksum_t *zc = (_zc); \
+ zc->zc_word[0] = BSWAP_64(zc->zc_word[0]); \
+ zc->zc_word[1] = BSWAP_64(zc->zc_word[1]); \
+ zc->zc_word[2] = BSWAP_64(zc->zc_word[2]); \
+ zc->zc_word[3] = BSWAP_64(zc->zc_word[3]); \
+ _NOTE(NOTREACHED) \
+ _NOTE(CONSTCOND) \
+ } while (0)
+
#define DVA_IS_VALID(dva) (DVA_GET_ASIZE(dva) != 0)
#define ZIO_SET_CHECKSUM(zcp, w0, w1, w2, w3) \
{ \
(zcp)->zc_word[0] = w0; \
@@ -443,10 +455,11 @@
#define SPA_ASYNC_RESILVER_DONE 0x08
#define SPA_ASYNC_RESILVER 0x10
#define SPA_ASYNC_AUTOEXPAND 0x20
#define SPA_ASYNC_REMOVE_DONE 0x40
#define SPA_ASYNC_REMOVE_STOP 0x80
+#define SPA_ASYNC_L2CACHE_REBUILD 0x100
/*
* Controls the behavior of spa_vdev_remove().
*/
#define SPA_REMOVE_UNSPARE 0x01