Turned off debug output again - also temporarily removed the file cache warning
about our block_io module not honouring the total length in read_pages(). Removed drops into the debugger when there is a block without an "original" data buffer - that's completely normal and happens when someone asks for a cleared block that is not yet in the cache. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14437 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+1
-13
@@ -30,7 +30,7 @@
|
|||||||
// 3) dirty blocks are only written back if asked for
|
// 3) dirty blocks are only written back if asked for
|
||||||
// 4) blocks are never removed yet
|
// 4) blocks are never removed yet
|
||||||
|
|
||||||
#define TRACE_BLOCK_CACHE
|
//#define TRACE_BLOCK_CACHE
|
||||||
#ifdef TRACE_BLOCK_CACHE
|
#ifdef TRACE_BLOCK_CACHE
|
||||||
# define TRACE(x) dprintf x
|
# define TRACE(x) dprintf x
|
||||||
#else
|
#else
|
||||||
@@ -793,12 +793,6 @@ cache_abort_sub_transaction(void *_cache, int32 id)
|
|||||||
for (; block != NULL; block = next) {
|
for (; block != NULL; block = next) {
|
||||||
next = block->transaction_next;
|
next = block->transaction_next;
|
||||||
|
|
||||||
if (block->original == NULL) {
|
|
||||||
// an unchanged block in the transaction?
|
|
||||||
panic("unchanged block in transaction!");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (block->parent_data != block->data) {
|
if (block->parent_data != block->data) {
|
||||||
// the block has been changed and must be restored
|
// the block has been changed and must be restored
|
||||||
TRACE(("cache_abort_sub_transaction(id = %ld): restored contents of block %Ld\n",
|
TRACE(("cache_abort_sub_transaction(id = %ld): restored contents of block %Ld\n",
|
||||||
@@ -836,12 +830,6 @@ cache_start_sub_transaction(void *_cache, int32 id)
|
|||||||
for (; block != NULL; block = next) {
|
for (; block != NULL; block = next) {
|
||||||
next = block->transaction_next;
|
next = block->transaction_next;
|
||||||
|
|
||||||
if (block->original == NULL) {
|
|
||||||
// an unchanged block in the transaction?
|
|
||||||
panic("unchanged block in transaction!");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (transaction->has_sub_transaction && block->parent_data != block->data) {
|
if (transaction->has_sub_transaction && block->parent_data != block->data) {
|
||||||
// there already is an older sub transaction - we acknowledge
|
// there already is an older sub transaction - we acknowledge
|
||||||
// its changes and move its blocks up to the parent
|
// its changes and move its blocks up to the parent
|
||||||
|
|||||||
+1
-1
@@ -323,7 +323,7 @@ pages_io(file_cache_ref *ref, off_t offset, const iovec *vecs, size_t count,
|
|||||||
// a) also use this direct I/O for writes (otherwise, it would overwrite precious data)
|
// a) also use this direct I/O for writes (otherwise, it would overwrite precious data)
|
||||||
// b) panic if the term below is true (at least for writes)
|
// b) panic if the term below is true (at least for writes)
|
||||||
if (size > fileVecs[0].length) {
|
if (size > fileVecs[0].length) {
|
||||||
dprintf("warning: device driver %p doesn't respect total length in read_pages() call!\n", ref->device);
|
//dprintf("warning: device driver %p doesn't respect total length in read_pages() call!\n", ref->device);
|
||||||
size = fileVecs[0].length;
|
size = fileVecs[0].length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user