From 3a17a7a99a1a6332d0999f9be68e2b8dc3933de1 Mon Sep 17 00:00:00 2001 From: Saso Kiselkov Date: Thu, 1 Aug 2013 13:02:10 -0700 Subject: Illumos #3137 L2ARC compression 3137 L2ARC compression Reviewed by: George Wilson Reviewed by: Matthew Ahrens Approved by: Dan McDonald 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 Signed-off-by: Brian Behlendorf Closes #1379 --- module/zfs/dmu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'module/zfs/dmu.c') diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c index 20b9d8965..0a9033356 100644 --- a/module/zfs/dmu.c +++ b/module/zfs/dmu.c @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ #include @@ -1653,9 +1654,9 @@ dmu_sync(zio_t *pio, uint64_t txg, dmu_sync_cb_t *done, zgd_t *zgd) dsa->dsa_tx = NULL; zio_nowait(arc_write(pio, os->os_spa, txg, - bp, dr->dt.dl.dr_data, DBUF_IS_L2CACHEABLE(db), &zp, - dmu_sync_ready, dmu_sync_done, dsa, - ZIO_PRIORITY_SYNC_WRITE, ZIO_FLAG_CANFAIL | ZIO_FLAG_FASTWRITE, &zb)); + bp, dr->dt.dl.dr_data, DBUF_IS_L2CACHEABLE(db), + DBUF_IS_L2COMPRESSIBLE(db), &zp, dmu_sync_ready, dmu_sync_done, + dsa, ZIO_PRIORITY_SYNC_WRITE, ZIO_FLAG_CANFAIL | ZIO_FLAG_FASTWRITE, &zb)); return (0); } -- cgit v1.2.3