zil.c (268075) | zil.c (268123) |
---|---|
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 --- 6 unchanged lines hidden (view full) --- 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* 22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. | 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 --- 6 unchanged lines hidden (view full) --- 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* 22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
23 * Copyright (c) 2013 by Delphix. All rights reserved. | 23 * Copyright (c) 2011, 2014 by Delphix. All rights reserved. |
24 */ 25 26/* Portions Copyright 2010 Robert Milkowski */ 27 28#include <sys/zfs_context.h> 29#include <sys/spa.h> 30#include <sys/dmu.h> 31#include <sys/zap.h> --- 155 unchanged lines hidden (view full) --- 187 */ 188static int 189zil_read_log_block(zilog_t *zilog, const blkptr_t *bp, blkptr_t *nbp, void *dst, 190 char **end) 191{ 192 enum zio_flag zio_flags = ZIO_FLAG_CANFAIL; 193 uint32_t aflags = ARC_WAIT; 194 arc_buf_t *abuf = NULL; | 24 */ 25 26/* Portions Copyright 2010 Robert Milkowski */ 27 28#include <sys/zfs_context.h> 29#include <sys/spa.h> 30#include <sys/dmu.h> 31#include <sys/zap.h> --- 155 unchanged lines hidden (view full) --- 187 */ 188static int 189zil_read_log_block(zilog_t *zilog, const blkptr_t *bp, blkptr_t *nbp, void *dst, 190 char **end) 191{ 192 enum zio_flag zio_flags = ZIO_FLAG_CANFAIL; 193 uint32_t aflags = ARC_WAIT; 194 arc_buf_t *abuf = NULL; |
195 zbookmark_t zb; | 195 zbookmark_phys_t zb; |
196 int error; 197 198 if (zilog->zl_header->zh_claim_txg == 0) 199 zio_flags |= ZIO_FLAG_SPECULATIVE | ZIO_FLAG_SCRUB; 200 201 if (!(zilog->zl_header->zh_flags & ZIL_CLAIM_LR_SEQ_VALID)) 202 zio_flags |= ZIO_FLAG_SPECULATIVE; 203 --- 56 unchanged lines hidden (view full) --- 260 */ 261static int 262zil_read_log_data(zilog_t *zilog, const lr_write_t *lr, void *wbuf) 263{ 264 enum zio_flag zio_flags = ZIO_FLAG_CANFAIL; 265 const blkptr_t *bp = &lr->lr_blkptr; 266 uint32_t aflags = ARC_WAIT; 267 arc_buf_t *abuf = NULL; | 196 int error; 197 198 if (zilog->zl_header->zh_claim_txg == 0) 199 zio_flags |= ZIO_FLAG_SPECULATIVE | ZIO_FLAG_SCRUB; 200 201 if (!(zilog->zl_header->zh_flags & ZIL_CLAIM_LR_SEQ_VALID)) 202 zio_flags |= ZIO_FLAG_SPECULATIVE; 203 --- 56 unchanged lines hidden (view full) --- 260 */ 261static int 262zil_read_log_data(zilog_t *zilog, const lr_write_t *lr, void *wbuf) 263{ 264 enum zio_flag zio_flags = ZIO_FLAG_CANFAIL; 265 const blkptr_t *bp = &lr->lr_blkptr; 266 uint32_t aflags = ARC_WAIT; 267 arc_buf_t *abuf = NULL; |
268 zbookmark_t zb; | 268 zbookmark_phys_t zb; |
269 int error; 270 271 if (BP_IS_HOLE(bp)) { 272 if (wbuf != NULL) 273 bzero(wbuf, MAX(BP_GET_LSIZE(bp), lr->lr_length)); 274 return (0); 275 } 276 --- 593 unchanged lines hidden (view full) --- 870} 871 872/* 873 * Initialize the io for a log block. 874 */ 875static void 876zil_lwb_write_init(zilog_t *zilog, lwb_t *lwb) 877{ | 269 int error; 270 271 if (BP_IS_HOLE(bp)) { 272 if (wbuf != NULL) 273 bzero(wbuf, MAX(BP_GET_LSIZE(bp), lr->lr_length)); 274 return (0); 275 } 276 --- 593 unchanged lines hidden (view full) --- 870} 871 872/* 873 * Initialize the io for a log block. 874 */ 875static void 876zil_lwb_write_init(zilog_t *zilog, lwb_t *lwb) 877{ |
878 zbookmark_t zb; | 878 zbookmark_phys_t zb; |
879 880 SET_BOOKMARK(&zb, lwb->lwb_blk.blk_cksum.zc_word[ZIL_ZC_OBJSET], 881 ZB_ZIL_OBJECT, ZB_ZIL_LEVEL, 882 lwb->lwb_blk.blk_cksum.zc_word[ZIL_ZC_SEQ]); 883 884 if (zilog->zl_root_zio == NULL) { 885 zilog->zl_root_zio = zio_root(zilog->zl_spa, NULL, NULL, 886 ZIO_FLAG_CANFAIL); --- 1248 unchanged lines hidden --- | 879 880 SET_BOOKMARK(&zb, lwb->lwb_blk.blk_cksum.zc_word[ZIL_ZC_OBJSET], 881 ZB_ZIL_OBJECT, ZB_ZIL_LEVEL, 882 lwb->lwb_blk.blk_cksum.zc_word[ZIL_ZC_SEQ]); 883 884 if (zilog->zl_root_zio == NULL) { 885 zilog->zl_root_zio = zio_root(zilog->zl_spa, NULL, NULL, 886 ZIO_FLAG_CANFAIL); --- 1248 unchanged lines hidden --- |