/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 2013, 2014 by Delphix. All rights reserved.
*/
/*
* Print intent log header and statistics.
*/
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <sys/zfs_context.h>
#include <sys/resource.h>
#include <sys/zil_impl.h>
static void
{
}
/* ARGSUSED */
static void
{
}
if (txtype == TX_SYMLINK) {
} else if (txtype != TX_MKXATTR) {
}
}
/* ARGSUSED */
static void
{
}
/* ARGSUSED */
static void
{
(char *)(lr + 1));
}
/* ARGSUSED */
static void
{
}
/* ARGSUSED */
static void
{
int error;
return;
!BP_IS_HOLE(bp) &&
"will claim" : "won't claim");
if (BP_IS_HOLE(bp)) {
(void) printf("\t\t\tLSIZE 0x%llx\n",
return;
}
return;
}
if (error)
return;
} else {
}
else
data++;
}
(void) printf("\n");
}
/* ARGSUSED */
static void
{
}
/* ARGSUSED */
static void
{
}
}
}
}
}
}
}
/* ARGSUSED */
static void
{
}
typedef void (*zil_prt_rec_func_t)();
typedef struct zil_rec_info {
char *zri_name;
{ NULL, "Total " },
{ zil_prt_rec_create, "TX_CREATE " },
{ zil_prt_rec_create, "TX_MKDIR " },
{ zil_prt_rec_create, "TX_MKXATTR " },
{ zil_prt_rec_create, "TX_SYMLINK " },
{ zil_prt_rec_remove, "TX_REMOVE " },
{ zil_prt_rec_remove, "TX_RMDIR " },
{ zil_prt_rec_link, "TX_LINK " },
{ zil_prt_rec_rename, "TX_RENAME " },
{ zil_prt_rec_write, "TX_WRITE " },
{ zil_prt_rec_truncate, "TX_TRUNCATE " },
{ zil_prt_rec_setattr, "TX_SETATTR " },
{ zil_prt_rec_acl, "TX_ACL_V0 " },
{ zil_prt_rec_acl, "TX_ACL_ACL " },
{ zil_prt_rec_create, "TX_CREATE_ACL " },
{ zil_prt_rec_create, "TX_CREATE_ATTR " },
{ zil_prt_rec_create, "TX_CREATE_ACL_ATTR " },
{ zil_prt_rec_create, "TX_MKDIR_ACL " },
{ zil_prt_rec_create, "TX_MKDIR_ATTR " },
{ zil_prt_rec_create, "TX_MKDIR_ACL_ATTR " },
{ zil_prt_rec_write, "TX_WRITE2 " },
};
/* ARGSUSED */
static int
{
int txtype;
/* reduce size of txtype to strip off TX_CI bit */
(void) printf("\t\t%s%s len %6llu, txg %llu, seq %llu\n",
zil_rec_info[0].zri_count++;
return (0);
}
/* ARGSUSED */
static int
{
char *claim;
if (verbose <= 3)
return (0);
if (verbose >= 5) {
} else {
blkbuf[0] = '\0';
}
if (claim_txg != 0)
claim = "already claimed";
claim = "will claim";
else
claim = "won't claim";
(void) printf("\tBlock seqno %llu, %s%s\n",
return (0);
}
static void
{
int i, w, p10;
if (verbose > 3)
(void) printf("\n");
if (zil_rec_info[0].zri_count == 0)
return;
w++;
for (i = 0; i < TX_MAX_TYPE; i++)
(void) printf("\t\t%s %*llu\n",
zil_rec_info[i].zri_name, w,
(void) printf("\n");
}
/* ARGSUSED */
void
{
int i;
return;
(void) printf("\n ZIL header: claim_txg %llu, "
"claim_blk_seq %llu, claim_lr_seq %llu",
(void) printf(" replay_seq %llu, flags 0x%llx\n",
for (i = 0; i < TX_MAX_TYPE; i++)
zil_rec_info[i].zri_count = 0;
if (verbose >= 2) {
(void) printf("\n");
zh->zh_claim_txg);
}
}