arc.c (321563) | arc.c (321573) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 5923 unchanged lines hidden (view full) --- 5932 boolean_t l2arc, const zio_prop_t *zp, arc_done_func_t *ready, 5933 arc_done_func_t *children_ready, arc_done_func_t *physdone, 5934 arc_done_func_t *done, void *private, zio_priority_t priority, 5935 int zio_flags, const zbookmark_phys_t *zb) 5936{ 5937 arc_buf_hdr_t *hdr = buf->b_hdr; 5938 arc_write_callback_t *callback; 5939 zio_t *zio; | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 5923 unchanged lines hidden (view full) --- 5932 boolean_t l2arc, const zio_prop_t *zp, arc_done_func_t *ready, 5933 arc_done_func_t *children_ready, arc_done_func_t *physdone, 5934 arc_done_func_t *done, void *private, zio_priority_t priority, 5935 int zio_flags, const zbookmark_phys_t *zb) 5936{ 5937 arc_buf_hdr_t *hdr = buf->b_hdr; 5938 arc_write_callback_t *callback; 5939 zio_t *zio; |
5940 zio_prop_t localprop = *zp; |
|
5940 5941 ASSERT3P(ready, !=, NULL); 5942 ASSERT3P(done, !=, NULL); 5943 ASSERT(!HDR_IO_ERROR(hdr)); 5944 ASSERT(!HDR_IO_IN_PROGRESS(hdr)); 5945 ASSERT3P(hdr->b_l1hdr.b_acb, ==, NULL); 5946 ASSERT3U(hdr->b_l1hdr.b_bufcnt, >, 0); 5947 if (l2arc) 5948 arc_hdr_set_flags(hdr, ARC_FLAG_L2CACHE); 5949 if (ARC_BUF_COMPRESSED(buf)) { | 5941 5942 ASSERT3P(ready, !=, NULL); 5943 ASSERT3P(done, !=, NULL); 5944 ASSERT(!HDR_IO_ERROR(hdr)); 5945 ASSERT(!HDR_IO_IN_PROGRESS(hdr)); 5946 ASSERT3P(hdr->b_l1hdr.b_acb, ==, NULL); 5947 ASSERT3U(hdr->b_l1hdr.b_bufcnt, >, 0); 5948 if (l2arc) 5949 arc_hdr_set_flags(hdr, ARC_FLAG_L2CACHE); 5950 if (ARC_BUF_COMPRESSED(buf)) { |
5950 ASSERT3U(zp->zp_compress, !=, ZIO_COMPRESS_OFF); | 5951 /* 5952 * We're writing a pre-compressed buffer. Make the 5953 * compression algorithm requested by the zio_prop_t match 5954 * the pre-compressed buffer's compression algorithm. 5955 */ 5956 localprop.zp_compress = HDR_GET_COMPRESS(hdr); 5957 |
5951 ASSERT3U(HDR_GET_LSIZE(hdr), !=, arc_buf_size(buf)); 5952 zio_flags |= ZIO_FLAG_RAW; 5953 } 5954 callback = kmem_zalloc(sizeof (arc_write_callback_t), KM_SLEEP); 5955 callback->awcb_ready = ready; 5956 callback->awcb_children_ready = children_ready; 5957 callback->awcb_physdone = physdone; 5958 callback->awcb_done = done; --- 18 unchanged lines hidden (view full) --- 5977 } 5978 VERIFY3P(buf->b_data, !=, NULL); 5979 arc_hdr_set_compress(hdr, ZIO_COMPRESS_OFF); 5980 } 5981 ASSERT(!arc_buf_is_shared(buf)); 5982 ASSERT3P(hdr->b_l1hdr.b_pdata, ==, NULL); 5983 5984 zio = zio_write(pio, spa, txg, bp, buf->b_data, | 5958 ASSERT3U(HDR_GET_LSIZE(hdr), !=, arc_buf_size(buf)); 5959 zio_flags |= ZIO_FLAG_RAW; 5960 } 5961 callback = kmem_zalloc(sizeof (arc_write_callback_t), KM_SLEEP); 5962 callback->awcb_ready = ready; 5963 callback->awcb_children_ready = children_ready; 5964 callback->awcb_physdone = physdone; 5965 callback->awcb_done = done; --- 18 unchanged lines hidden (view full) --- 5984 } 5985 VERIFY3P(buf->b_data, !=, NULL); 5986 arc_hdr_set_compress(hdr, ZIO_COMPRESS_OFF); 5987 } 5988 ASSERT(!arc_buf_is_shared(buf)); 5989 ASSERT3P(hdr->b_l1hdr.b_pdata, ==, NULL); 5990 5991 zio = zio_write(pio, spa, txg, bp, buf->b_data, |
5985 HDR_GET_LSIZE(hdr), arc_buf_size(buf), zp, arc_write_ready, | 5992 HDR_GET_LSIZE(hdr), arc_buf_size(buf), &localprop, arc_write_ready, |
5986 (children_ready != NULL) ? arc_write_children_ready : NULL, 5987 arc_write_physdone, arc_write_done, callback, 5988 priority, zio_flags, zb); 5989 5990 return (zio); 5991} 5992 5993static int --- 1739 unchanged lines hidden --- | 5993 (children_ready != NULL) ? arc_write_children_ready : NULL, 5994 arc_write_physdone, arc_write_done, callback, 5995 priority, zio_flags, zb); 5996 5997 return (zio); 5998} 5999 6000static int --- 1739 unchanged lines hidden --- |