/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * Copyright (C) International Business Machines Corp., 2000-2004
*/ #ifndef _H_JFS_TXNMGR #define _H_JFS_TXNMGR
#include"jfs_logmgr.h"
/* * Hide implementation of TxBlock and TxLock
*/ #define tid_to_tblock(tid) (&TxBlock[tid])
#define lid_to_tlock(lid) (&TxLock[lid])
/* * transaction block
*/ struct tblock { /* * tblock and jbuf_t common area: struct logsyncblk * * the following 5 fields are the same as struct logsyncblk * which is common to tblock and jbuf to form logsynclist
*/
u16 xflag; /* tx commit type */
u16 flag; /* tx commit state */
lid_t dummy; /* Must keep structures common */
s32 lsn; /* recovery lsn */ struct list_head synclist; /* logsynclist link */
/* lock management */ struct super_block *sb; /* super block */
lid_t next; /* index of first tlock of tid */
lid_t last; /* index of last tlock of tid */
wait_queue_head_t waitor; /* tids waiting on this tid */
/* commit flags: tblk->xflag */ #define COMMIT_SYNC 0x0001 /* synchronous commit */ #define COMMIT_FORCE 0x0002 /* force pageout at end of commit */ #define COMMIT_FLUSH 0x0004 /* init flush at end of commit */ #define COMMIT_MAP 0x00f0 #define COMMIT_PMAP 0x0010 /* update pmap */ #define COMMIT_WMAP 0x0020 /* update wmap */ #define COMMIT_PWMAP 0x0040 /* update pwmap */ #define COMMIT_FREE 0x0f00 #define COMMIT_DELETE 0x0100 /* inode delete */ #define COMMIT_TRUNCATE 0x0200 /* file truncation */ #define COMMIT_CREATE 0x0400 /* inode create */ #define COMMIT_LAZY 0x0800 /* lazy commit */ #define COMMIT_PAGE 0x1000 /* Identifies element as metapage */ #define COMMIT_INODE 0x2000 /* Identifies element as inode */
/* group commit flags tblk->flag: see jfs_logmgr.h */
/* * transaction lock
*/ struct tlock {
lid_t next; /* 2: index next lockword on tid locklist * next lockword on freelist
*/
tid_t tid; /* 2: transaction id holding lock */
u16 flag; /* 2: lock control */
u16 type; /* 2: log type */
struct lv header; /* 2: */ struct lv lwm; /* 2: low water mark */ struct lv hwm; /* 2: high water mark */ struct lv twm; /* 2: */ /* (16) */
s32 pxdlock[8]; /* 32: */
}; /* (48) */
/* * maplock for txUpdateMap() * * note: maplock and its variations are overlaid * at tlock.lock/linelock: watch for alignment; * N.B. next field may be set by linelock, and should not * be modified by maplock; * N.B. index of the first pxdlock specifies index of next * free maplock (i.e., number of maplock) in the tlock;
*/ struct maplock {
lid_t next; /* 2: */
u8 maxcnt; /* 2: */
u8 index; /* 2: next free maplock index */
/* * We need xdlist to be 64 bits (8 bytes), regardless of * whether void * is 32 or 64 bits
*/ union { void *_xdlist; /* pxd/xad list */
s64 pad; /* 8: Force 64-bit xdlist size */
} union64;
}; /* (16): */
#define xdlist union64._xdlist
/* * commit * * parameter to the commit manager routines
*/ struct commit {
tid_t tid; /* tid = index of tblock */ int flag; /* flags */ struct jfs_log *log; /* log */ struct super_block *sb; /* superblock */
int nip; /* number of entries in iplist */ struct inode **iplist; /* list of pointers to inodes */
/* log record descriptor on 64-bit boundary */ struct lrd lrd; /* : log record descriptor */
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.