diff options
author | Miles Bader <miles@gnu.org> | 1996-07-17 21:43:55 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-07-17 21:43:55 +0000 |
commit | cb3be61cb4017ff0b26386c1a73698a3b3e58f84 (patch) | |
tree | ad9cd4dbe47b5b698bf94107628c32e571023679 | |
parent | 3c493fcce3050095b9a21380622c9590ace42718 (diff) |
(struct disknode): Add debugging info.
(RECORD_LAST): New function.
(LAST_BUFSZ): New macro.
(enum last_act): New type.
-rw-r--r-- | ext2fs/ext2fs.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h index 8a4bde9d..2b3a95a7 100644 --- a/ext2fs/ext2fs.h +++ b/ext2fs/ext2fs.h @@ -138,6 +138,10 @@ void *memscan(void *buf, unsigned char ch, unsigned len); /* ---------------------------------------------------------------- */ +/* XXX debugging */ +enum last_act { LAST_UNLOCK, LAST_TRUNCATE, LAST_READ, LAST_WRITE, LAST_GROW }; +#define LAST_BUFSZ 32 + /* ext2fs specific per-file data. */ struct disknode { @@ -163,8 +167,23 @@ struct disknode /* True if the last page of the file has been made writable, but is only partially allocated. */ int last_page_partially_writable; + + /* XXX debugging */ + enum last_act last_acts[LAST_BUFSZ]; + vm_offset_t last_addrs[LAST_BUFSZ]; + int last_offs; }; +extern inline void +RECORD_LAST (struct disknode *dn, enum last_act act, vm_offset_t addr) +{ + if (dn->last_offs == LAST_BUFSZ) + dn->last_offs = 0; + dn->last_acts[dn->last_offs] = act; + dn->last_addrs[dn->last_offs] = addr; + dn->last_offs++; +} + struct user_pager_info { enum pager_type |