[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 31/75: ext2fs: disable block cache debugging by default
From: |
Samuel Thibault |
Subject: |
[hurd] 31/75: ext2fs: disable block cache debugging by default |
Date: |
Thu, 14 Jan 2016 01:04:08 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch dde
in repository hurd.
commit fe9ece07747eb7281e0749a3dde7c02267af8ae6
Author: Justus Winter <address@hidden>
Date: Thu Nov 12 23:33:35 2015 +0100
ext2fs: disable block cache debugging by default
* ext2fs/ext2fs.h: Disable block cache debugging by default.
* ext2fs/pager.c: Likewise.
---
ext2fs/ext2fs.h | 4 ++--
ext2fs/pager.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h
index 42717c5..0b6b79e 100644
--- a/ext2fs/ext2fs.h
+++ b/ext2fs/ext2fs.h
@@ -244,7 +244,7 @@ extern int disk_cache_blocks;
#define DC_NO_BLOCK ((block_t) -1L)
-#ifndef NDEBUG
+#ifdef DEBUG_DISK_CACHE
#define DISK_CACHE_LAST_READ_XOR 0xDEADBEEF
#endif
@@ -254,7 +254,7 @@ struct disk_cache_info
block_t block;
uint16_t flags;
uint16_t ref_count;
-#ifndef NDEBUG
+#ifdef DEBUG_DISK_CACHE
block_t last_read, last_read_xor;
#endif
};
diff --git a/ext2fs/pager.c b/ext2fs/pager.c
index 2528856..f28bcab 100644
--- a/ext2fs/pager.c
+++ b/ext2fs/pager.c
@@ -433,7 +433,7 @@ disk_pager_read_page (vm_offset_t page, void **buf, int
*writelock)
+ offset % block_size;
disk_cache_info[index].flags |= DC_INCORE;
disk_cache_info[index].flags &=~ DC_UNTOUCHED;
-#ifndef NDEBUG
+#ifdef DEBUG_DISK_CACHE
disk_cache_info[index].last_read = disk_cache_info[index].block;
disk_cache_info[index].last_read_xor
= disk_cache_info[index].block ^ DISK_CACHE_LAST_READ_XOR;
@@ -469,7 +469,7 @@ disk_pager_write_page (vm_offset_t page, void *buf)
assert (disk_cache_info[index].block != DC_NO_BLOCK);
offset = ((store_offset_t) disk_cache_info[index].block << log2_block_size)
+ offset % block_size;
-#ifndef NDEBUG /* Not strictly needed. */
+#ifdef DEBUG_DISK_CACHE /* Not strictly needed. */
assert ((disk_cache_info[index].last_read ^ DISK_CACHE_LAST_READ_XOR)
== disk_cache_info[index].last_read_xor);
assert (disk_cache_info[index].last_read
@@ -873,7 +873,7 @@ disk_cache_init (void)
disk_cache_info[i].block = DC_NO_BLOCK;
disk_cache_info[i].flags = 0;
disk_cache_info[i].ref_count = 0;
-#ifndef NDEBUG
+#ifdef DEBUG_DISK_CACHE
disk_cache_info[i].last_read = DC_NO_BLOCK;
disk_cache_info[i].last_read_xor
= DC_NO_BLOCK ^ DISK_CACHE_LAST_READ_XOR;
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 24/75: Use -L instead of -Wl,-rpath-link, (continued)
- [hurd] 24/75: Use -L instead of -Wl,-rpath-link, Samuel Thibault, 2016/01/13
- [hurd] 26/75: libihash: fix fast insertion corner case, Samuel Thibault, 2016/01/13
- [hurd] 25/75: libihash: fix ill-devised locp lookup interface, Samuel Thibault, 2016/01/13
- [hurd] 21/75: Drop spurious debugging or outdated changes, Samuel Thibault, 2016/01/13
- [hurd] 14/75: Add devnode translator, Samuel Thibault, 2016/01/13
- [hurd] 30/75: ext2fs: improve the block cache, Samuel Thibault, 2016/01/13
- [hurd] 28/75: libihash: fix item insertion, Samuel Thibault, 2016/01/13
- [hurd] 66/75: Make private variables static, Samuel Thibault, 2016/01/13
- [hurd] 32/75: ext2fs: keep list of reusable disk cache entries, Samuel Thibault, 2016/01/13
- [hurd] 33/75: libdiskfs: use ihash for the node cache, Samuel Thibault, 2016/01/13
- [hurd] 31/75: ext2fs: disable block cache debugging by default,
Samuel Thibault <=
- [hurd] 27/75: libihash: generalize the interface to support non-integer keys, Samuel Thibault, 2016/01/13
- [hurd] 68/75: Fix build with perl >= 5.22, Samuel Thibault, 2016/01/13
- [hurd] 29/75: libihash: provide a general purpose hash algorithm, Samuel Thibault, 2016/01/13
- [hurd] 65/75: pflocal: Do not abort on too small getopt parameter, Samuel Thibault, 2016/01/13
- [hurd] 71/75: Merge branch 'dde-upstream' into dde, Samuel Thibault, 2016/01/13
- [hurd] 64/75: Add dumb SO_ERROR support to pflocal, Samuel Thibault, 2016/01/13
- [hurd] 75/75: Merge branch 'dde-upstream' into dde, Samuel Thibault, 2016/01/13
- [hurd] 67/75: Fix pfinet crash, Samuel Thibault, 2016/01/13
- [hurd] 18/75: Drop spurious debugging or outdated changes, Samuel Thibault, 2016/01/13
- [hurd] 74/75: Merge remote-tracking branch 'incubator/dde' into dde-upstream, Samuel Thibault, 2016/01/13