* CDDL HEADER END
*/
/*
- * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
*/
#ifndef _SYS_FS_ZFS_ZNODE_H
#include <sys/zfs_vfsops.h>
#include <sys/rrwlock.h>
#include <sys/zfs_sa.h>
+#include <sys/zfs_stat.h>
#endif
#include <sys/zfs_acl.h>
#include <sys/zil.h>
* Additional file level attributes, that are stored
* in the upper half of zp_flags
*/
-#define ZFS_READONLY 0x0000000100000000
-#define ZFS_HIDDEN 0x0000000200000000
-#define ZFS_SYSTEM 0x0000000400000000
-#define ZFS_ARCHIVE 0x0000000800000000
-#define ZFS_IMMUTABLE 0x0000001000000000
-#define ZFS_NOUNLINK 0x0000002000000000
-#define ZFS_APPENDONLY 0x0000004000000000
-#define ZFS_NODUMP 0x0000008000000000
-#define ZFS_OPAQUE 0x0000010000000000
-#define ZFS_AV_QUARANTINED 0x0000020000000000
-#define ZFS_AV_MODIFIED 0x0000040000000000
-#define ZFS_REPARSE 0x0000080000000000
+#define ZFS_READONLY 0x0000000100000000ull
+#define ZFS_HIDDEN 0x0000000200000000ull
+#define ZFS_SYSTEM 0x0000000400000000ull
+#define ZFS_ARCHIVE 0x0000000800000000ull
+#define ZFS_IMMUTABLE 0x0000001000000000ull
+#define ZFS_NOUNLINK 0x0000002000000000ull
+#define ZFS_APPENDONLY 0x0000004000000000ull
+#define ZFS_NODUMP 0x0000008000000000ull
+#define ZFS_OPAQUE 0x0000010000000000ull
+#define ZFS_AV_QUARANTINED 0x0000020000000000ull
+#define ZFS_AV_MODIFIED 0x0000040000000000ull
+#define ZFS_REPARSE 0x0000080000000000ull
+#define ZFS_OFFLINE 0x0000100000000000ull
+#define ZFS_SPARSE 0x0000200000000000ull
#define ZFS_ATTR_SET(zp, attr, value, pflags, tx) \
{ \
uint8_t z_unlinked; /* file has been unlinked */
uint8_t z_atime_dirty; /* atime needs to be synced */
uint8_t z_zn_prefetch; /* Prefetch znodes? */
+ uint8_t z_moved; /* Has this znode been moved? */
uint_t z_blksz; /* block size in bytes */
uint_t z_seq; /* modification sequence number */
uint64_t z_mapcnt; /* number of pages mapped to file */
- uint64_t z_last_itx; /* last ZIL itx on this znode */
uint64_t z_gen; /* generation (cached) */
uint64_t z_size; /* file size (cached) */
uint64_t z_atime[2]; /* atime (cached) */
uint64_t z_links; /* file links (cached) */
uint64_t z_pflags; /* pflags (cached) */
- uid_t z_uid; /* uid mapped (cached) */
- uid_t z_gid; /* gid mapped (cached) */
+ uint64_t z_uid; /* uid fuid (cached) */
+ uint64_t z_gid; /* gid fuid (cached) */
mode_t z_mode; /* mode (cached) */
uint32_t z_sync_cnt; /* synchronous open count */
kmutex_t z_acl_lock; /* acl data lock */
extern int zfs_log_create_txtype(zil_create_t, vsecattr_t *vsecp,
vattr_t *vap);
extern void zfs_log_remove(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
- znode_t *dzp, char *name);
+ znode_t *dzp, char *name, uint64_t foid);
+#define ZFS_NO_OBJECT 0 /* no object id */
extern void zfs_log_link(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
znode_t *dzp, znode_t *zp, char *name);
extern void zfs_log_symlink(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,