summaryrefslogtreecommitdiffstats
path: root/include/sys/arc.h
diff options
context:
space:
mode:
authorSaso Kiselkov <[email protected]>2013-08-01 13:02:10 -0700
committerBrian Behlendorf <[email protected]>2013-08-08 13:27:21 -0700
commit3a17a7a99a1a6332d0999f9be68e2b8dc3933de1 (patch)
tree6f926bc52a8ae98a69d4b258e66bde381fa691fa /include/sys/arc.h
parentc11a12bc3b2e5ee9a6bd74e26f1a396b6025fbd4 (diff)
Illumos #3137 L2ARC compression
3137 L2ARC compression Reviewed by: George Wilson <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Approved by: Dan McDonald <[email protected]> References: illumos/illumos-gate@aad02571bc59671aa3103bb070ae365f531b0b62 https://www.illumos.org/issues/3137 http://wiki.illumos.org/display/illumos/L2ARC+Compression Notes for Linux port: A l2arc_nocompress module option was added to prevent the compression of l2arc buffers regardless of how a dataset's compression property is set. This allows the legacy behavior to be preserved. Ported by: James H <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #1379
Diffstat (limited to 'include/sys/arc.h')
-rw-r--r--include/sys/arc.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/sys/arc.h b/include/sys/arc.h
index c88c31148..67882197a 100644
--- a/include/sys/arc.h
+++ b/include/sys/arc.h
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
*/
#ifndef _SYS_ARC_H
@@ -78,6 +79,7 @@ typedef enum arc_buf_contents {
#define ARC_PREFETCH (1 << 3) /* I/O is a prefetch */
#define ARC_CACHED (1 << 4) /* I/O was already in cache */
#define ARC_L2CACHE (1 << 5) /* cache in L2ARC */
+#define ARC_L2COMPRESS (1 << 6) /* compress in L2ARC */
/*
* The following breakdows of arc_size exist for kstat only.
@@ -114,9 +116,9 @@ int arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp,
arc_done_func_t *done, void *private, int priority, int flags,
uint32_t *arc_flags, const zbookmark_t *zb);
zio_t *arc_write(zio_t *pio, spa_t *spa, uint64_t txg,
- blkptr_t *bp, arc_buf_t *buf, boolean_t l2arc, const zio_prop_t *zp,
- arc_done_func_t *ready, arc_done_func_t *done, void *private,
- int priority, int zio_flags, const zbookmark_t *zb);
+ blkptr_t *bp, arc_buf_t *buf, boolean_t l2arc, boolean_t l2arc_compress,
+ const zio_prop_t *zp, arc_done_func_t *ready, arc_done_func_t *done,
+ void *private, int priority, int zio_flags, const zbookmark_t *zb);
arc_prune_t *arc_add_prune_callback(arc_prune_func_t *func, void *private);
void arc_remove_prune_callback(arc_prune_t *p);