zfs_log.c revision 6ce0521ac291be36119f359237066c4fb8088683
/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/sysmacros.h>
#include <sys/zfs_znode.h>
#include <sys/zil_impl.h>
#include <sys/byteorder.h>
/*
* All the functions in this file are used to construct the log entries
* to record transactions. They allocate * a intent log transaction
* structure (itx_t) and save within it all the information necessary to
* possibly replay the transaction. The itx is then assigned a sequence
* number and inserted in the in-memory list anchored in the zilog.
*/
/*
* zfs_log_create() is used to handle TX_CREATE, TX_MKDIR and TX_MKXATTR
* transactions.
*/
void
{
return;
}
/*
* zfs_log_remove() handles both TX_REMOVE and TX_RMDIR transactions.
*/
void
{
return;
}
/*
* zfs_log_link() handles TX_LINK transactions.
*/
void
{
return;
}
/*
* zfs_log_symlink() handles TX_SYMLINK transactions.
*/
void
{
return;
}
/*
* zfs_log_rename() handles TX_RENAME transactions.
*/
void
{
return;
}
/*
* zfs_log_write() handles TX_WRITE transactions.
*/
sizeof (lr_write_t))
void
{
return;
/*
* Writes are handled in three different ways:
*
* WR_INDIRECT:
* If the write is greater than zfs_immediate_write_sz and there are
* no separate logs in this pool then later *if* we need to log the
* write then dmu_sync() is used to immediately write the block and
* its block pointer is put in the log record.
* WR_COPIED:
* If we know we'll immediately be committing the
* transaction (FDSYNC (O_DSYNC)), the we allocate a larger
* log record here for the data and copy the data in.
* WR_NEED_COPY:
* Otherwise we don't allocate a buffer, and *if* we need to
* flush the write later then a buffer is allocated and
* we retrieve the data using the dmu.
*/
else
while (resid) {
lr_write_t *lr;
/*
* If there are slogs and the write would overflow the largest
* block, then because we don't want to use the main pool
* to dmu_sync, we have to split the write.
*/
else
}
}
}
/*
* zfs_log_truncate() handles TX_TRUNCATE transactions.
*/
void
{
return;
}
/*
* zfs_log_setattr() handles TX_SETATTR transactions.
*/
void
{
return;
}
/*
* zfs_log_acl() handles TX_ACL transactions.
*/
void
{
return;
}