Date: Sat, 18 Jan 2014 01:40:36 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r260834 - vendor-sys/illumos/dist/uts/common/fs/zfs Message-ID: <201401180140.s0I1eagn094099@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Sat Jan 18 01:40:36 2014 New Revision: 260834 URL: http://svnweb.freebsd.org/changeset/base/260834 Log: 3995 Memory leak of compressed buffers in l2arc_write_done illumos/illumos-gate@71cb1b742ca23532b844b6538d8f0997a900c62e Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Fri Jan 17 21:45:25 2014 (r260833) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Sat Jan 18 01:40:36 2014 (r260834) @@ -22,7 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. - * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright (c) 2014 by Saso Kiselkov. All rights reserved. * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ @@ -4236,6 +4236,13 @@ l2arc_write_done(zio_t *zio) */ for (ab = list_prev(buflist, head); ab; ab = ab_prev) { ab_prev = list_prev(buflist, ab); + abl2 = ab->b_l2hdr; + + /* + * Release the temporary compressed buffer as soon as possible. + */ + if (abl2->b_compress != ZIO_COMPRESS_OFF) + l2arc_release_cdata_buf(ab); hash_lock = HDR_LOCK(ab); if (!mutex_tryenter(hash_lock)) { @@ -4248,14 +4255,6 @@ l2arc_write_done(zio_t *zio) continue; } - abl2 = ab->b_l2hdr; - - /* - * Release the temporary compressed buffer as soon as possible. - */ - if (abl2->b_compress != ZIO_COMPRESS_OFF) - l2arc_release_cdata_buf(ab); - if (zio->io_error != 0) { /* * Error - drop L2ARC entry.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401180140.s0I1eagn094099>