bpobj.c (243674) | bpobj.c (248369) |
---|---|
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) 2012 by Delphix. All rights reserved. | 23 * Copyright (c) 2013 by Delphix. All rights reserved. |
24 */ 25 26#include <sys/bpobj.h> 27#include <sys/zfs_context.h> 28#include <sys/refcount.h> 29#include <sys/dsl_pool.h> 30#include <sys/zfeature.h> 31#include <sys/zap.h> --- 377 unchanged lines hidden (view full) --- 409 410 VERIFY3U(0, ==, dmu_object_info(bpo->bpo_os, subsubobjs, &doi)); 411 if (doi.doi_max_offset == doi.doi_data_block_size) { 412 dmu_buf_t *subdb; 413 uint64_t numsubsub = subbpo.bpo_phys->bpo_num_subobjs; 414 415 VERIFY3U(0, ==, dmu_buf_hold(bpo->bpo_os, subsubobjs, 416 0, FTAG, &subdb, 0)); | 24 */ 25 26#include <sys/bpobj.h> 27#include <sys/zfs_context.h> 28#include <sys/refcount.h> 29#include <sys/dsl_pool.h> 30#include <sys/zfeature.h> 31#include <sys/zap.h> --- 377 unchanged lines hidden (view full) --- 409 410 VERIFY3U(0, ==, dmu_object_info(bpo->bpo_os, subsubobjs, &doi)); 411 if (doi.doi_max_offset == doi.doi_data_block_size) { 412 dmu_buf_t *subdb; 413 uint64_t numsubsub = subbpo.bpo_phys->bpo_num_subobjs; 414 415 VERIFY3U(0, ==, dmu_buf_hold(bpo->bpo_os, subsubobjs, 416 0, FTAG, &subdb, 0)); |
417 /* 418 * Make sure that we are not asking dmu_write() 419 * to write more data than we have in our buffer. 420 */ 421 VERIFY3U(subdb->db_size, >=, 422 numsubsub * sizeof (subobj)); |
|
417 dmu_write(bpo->bpo_os, bpo->bpo_phys->bpo_subobjs, 418 bpo->bpo_phys->bpo_num_subobjs * sizeof (subobj), 419 numsubsub * sizeof (subobj), subdb->db_data, tx); 420 dmu_buf_rele(subdb, FTAG); 421 bpo->bpo_phys->bpo_num_subobjs += numsubsub; 422 423 dmu_buf_will_dirty(subbpo.bpo_dbuf, tx); 424 subbpo.bpo_phys->bpo_subobjs = 0; --- 132 unchanged lines hidden --- | 423 dmu_write(bpo->bpo_os, bpo->bpo_phys->bpo_subobjs, 424 bpo->bpo_phys->bpo_num_subobjs * sizeof (subobj), 425 numsubsub * sizeof (subobj), subdb->db_data, tx); 426 dmu_buf_rele(subdb, FTAG); 427 bpo->bpo_phys->bpo_num_subobjs += numsubsub; 428 429 dmu_buf_will_dirty(subbpo.bpo_dbuf, tx); 430 subbpo.bpo_phys->bpo_subobjs = 0; --- 132 unchanged lines hidden --- |