zil.c (332547) | zil.c (339105) |
---|---|
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) 2011, 2017 by Delphix. All rights reserved. | 23 * Copyright (c) 2011, 2018 by Delphix. All rights reserved. |
24 * Copyright (c) 2014 Integros [integros.com] 25 */ 26 27/* Portions Copyright 2010 Robert Milkowski */ 28 29#include <sys/zfs_context.h> 30#include <sys/spa.h> 31#include <sys/spa_impl.h> --- 628 unchanged lines hidden (view full) --- 660 dsl_dataset_dirty(dmu_objset_ds(zilog->zl_os), tx); 661 txg = dmu_tx_get_txg(tx); 662 663 if (!BP_IS_HOLE(&blk)) { 664 zio_free(zilog->zl_spa, txg, &blk); 665 BP_ZERO(&blk); 666 } 667 | 24 * Copyright (c) 2014 Integros [integros.com] 25 */ 26 27/* Portions Copyright 2010 Robert Milkowski */ 28 29#include <sys/zfs_context.h> 30#include <sys/spa.h> 31#include <sys/spa_impl.h> --- 628 unchanged lines hidden (view full) --- 660 dsl_dataset_dirty(dmu_objset_ds(zilog->zl_os), tx); 661 txg = dmu_tx_get_txg(tx); 662 663 if (!BP_IS_HOLE(&blk)) { 664 zio_free(zilog->zl_spa, txg, &blk); 665 BP_ZERO(&blk); 666 } 667 |
668 error = zio_alloc_zil(zilog->zl_spa, txg, &blk, NULL, | 668 error = zio_alloc_zil(zilog->zl_spa, 669 zilog->zl_os->os_dsl_dataset->ds_object, txg, &blk, NULL, |
669 ZIL_MIN_BLKSZ, &slog); 670 671 if (error == 0) 672 zil_init_log_chain(zilog, &blk); 673 } 674 675 /* 676 * Allocate a log write block (lwb) for the first log block. --- 660 unchanged lines hidden (view full) --- 1337 zilog->zl_prev_blks[zilog->zl_prev_rotor] = zil_blksz; 1338 for (i = 0; i < ZIL_PREV_BLKS; i++) 1339 zil_blksz = MAX(zil_blksz, zilog->zl_prev_blks[i]); 1340 zilog->zl_prev_rotor = (zilog->zl_prev_rotor + 1) & (ZIL_PREV_BLKS - 1); 1341 1342 BP_ZERO(bp); 1343 1344 /* pass the old blkptr in order to spread log blocks across devs */ | 670 ZIL_MIN_BLKSZ, &slog); 671 672 if (error == 0) 673 zil_init_log_chain(zilog, &blk); 674 } 675 676 /* 677 * Allocate a log write block (lwb) for the first log block. --- 660 unchanged lines hidden (view full) --- 1338 zilog->zl_prev_blks[zilog->zl_prev_rotor] = zil_blksz; 1339 for (i = 0; i < ZIL_PREV_BLKS; i++) 1340 zil_blksz = MAX(zil_blksz, zilog->zl_prev_blks[i]); 1341 zilog->zl_prev_rotor = (zilog->zl_prev_rotor + 1) & (ZIL_PREV_BLKS - 1); 1342 1343 BP_ZERO(bp); 1344 1345 /* pass the old blkptr in order to spread log blocks across devs */ |
1345 error = zio_alloc_zil(spa, txg, bp, &lwb->lwb_blk, zil_blksz, &slog); | 1346 error = zio_alloc_zil(spa, zilog->zl_os->os_dsl_dataset->ds_object, 1347 txg, bp, &lwb->lwb_blk, zil_blksz, &slog); |
1346 if (error == 0) { 1347 ASSERT3U(bp->blk_birth, ==, txg); 1348 bp->blk_cksum = lwb->lwb_blk.blk_cksum; 1349 bp->blk_cksum.zc_word[ZIL_ZC_SEQ]++; 1350 1351 /* 1352 * Allocate a new log write block (lwb). 1353 */ --- 1979 unchanged lines hidden --- | 1348 if (error == 0) { 1349 ASSERT3U(bp->blk_birth, ==, txg); 1350 bp->blk_cksum = lwb->lwb_blk.blk_cksum; 1351 bp->blk_cksum.zc_word[ZIL_ZC_SEQ]++; 1352 1353 /* 1354 * Allocate a new log write block (lwb). 1355 */ --- 1979 unchanged lines hidden --- |