Deleted Added
full compact
spa_history.c (302408) spa_history.c (307108)
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

--- 7 unchanged lines hidden (view full) ---

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/*
23 * Copyright (c) 2006, 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

--- 7 unchanged lines hidden (view full) ---

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/*
23 * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
24 * Copyright (c) 2011, 2015 by Delphix. All rights reserved.
25 * Copyright (c) 2014 Integros [integros.com]
26 */
27
28#include <sys/spa.h>
29#include <sys/spa_impl.h>
30#include <sys/zap.h>
31#include <sys/dsl_synctask.h>
32#include <sys/dmu_tx.h>

--- 463 unchanged lines hidden (view full) ---

496 dmu_tx_commit(htx);
497}
498
499void
500spa_history_log_internal_ds(dsl_dataset_t *ds, const char *operation,
501 dmu_tx_t *tx, const char *fmt, ...)
502{
503 va_list adx;
25 * Copyright (c) 2014 Integros [integros.com]
26 */
27
28#include <sys/spa.h>
29#include <sys/spa_impl.h>
30#include <sys/zap.h>
31#include <sys/dsl_synctask.h>
32#include <sys/dmu_tx.h>

--- 463 unchanged lines hidden (view full) ---

496 dmu_tx_commit(htx);
497}
498
499void
500spa_history_log_internal_ds(dsl_dataset_t *ds, const char *operation,
501 dmu_tx_t *tx, const char *fmt, ...)
502{
503 va_list adx;
504 char namebuf[MAXNAMELEN];
504 char namebuf[ZFS_MAX_DATASET_NAME_LEN];
505 nvlist_t *nvl = fnvlist_alloc();
506
507 ASSERT(tx != NULL);
508
509 dsl_dataset_name(ds, namebuf);
510 fnvlist_add_string(nvl, ZPOOL_HIST_DSNAME, namebuf);
511 fnvlist_add_uint64(nvl, ZPOOL_HIST_DSID, ds->ds_object);
512
513 va_start(adx, fmt);
514 log_internal(nvl, operation, dsl_dataset_get_spa(ds), tx, fmt, adx);
515 va_end(adx);
516}
517
518void
519spa_history_log_internal_dd(dsl_dir_t *dd, const char *operation,
520 dmu_tx_t *tx, const char *fmt, ...)
521{
522 va_list adx;
505 nvlist_t *nvl = fnvlist_alloc();
506
507 ASSERT(tx != NULL);
508
509 dsl_dataset_name(ds, namebuf);
510 fnvlist_add_string(nvl, ZPOOL_HIST_DSNAME, namebuf);
511 fnvlist_add_uint64(nvl, ZPOOL_HIST_DSID, ds->ds_object);
512
513 va_start(adx, fmt);
514 log_internal(nvl, operation, dsl_dataset_get_spa(ds), tx, fmt, adx);
515 va_end(adx);
516}
517
518void
519spa_history_log_internal_dd(dsl_dir_t *dd, const char *operation,
520 dmu_tx_t *tx, const char *fmt, ...)
521{
522 va_list adx;
523 char namebuf[MAXNAMELEN];
523 char namebuf[ZFS_MAX_DATASET_NAME_LEN];
524 nvlist_t *nvl = fnvlist_alloc();
525
526 ASSERT(tx != NULL);
527
528 dsl_dir_name(dd, namebuf);
529 fnvlist_add_string(nvl, ZPOOL_HIST_DSNAME, namebuf);
530 fnvlist_add_uint64(nvl, ZPOOL_HIST_DSID,
531 dsl_dir_phys(dd)->dd_head_dataset_obj);

--- 15 unchanged lines hidden ---
524 nvlist_t *nvl = fnvlist_alloc();
525
526 ASSERT(tx != NULL);
527
528 dsl_dir_name(dd, namebuf);
529 fnvlist_add_string(nvl, ZPOOL_HIST_DSNAME, namebuf);
530 fnvlist_add_uint64(nvl, ZPOOL_HIST_DSID,
531 dsl_dir_phys(dd)->dd_head_dataset_obj);

--- 15 unchanged lines hidden ---