ref: 3fd80de784471aedfb32c3fef2690827576032b6
parent: 3cd8523e39ddd70f45bdff22696e411e018259fa
author: ngkaho1234 <[email protected]>
date: Sun Dec 20 05:35:31 EST 2015
ext4_bcache: warn on dropping any referenced buffers.
--- a/lwext4/ext4_bcache.c
+++ b/lwext4/ext4_bcache.c
@@ -149,8 +149,12 @@
void ext4_bcache_drop_buf(struct ext4_bcache *bc, struct ext4_buf *buf)
{
- /*Cannot drop any referenced buffers.*/
- ext4_assert(!buf->refctr);
+ /* Warn on dropping any referenced buffers.*/
+ if (buf->refctr) {
+ ext4_dbg(DEBUG_BCACHE, DBG_WARN "Buffer is still referenced. "
+ "lba: %" PRIu64 ", refctr: %" PRIu32 "\n",
+ buf->lba, buf->refctr);
+ }
RB_REMOVE(ext4_buf_lba, &bc->lba_root, buf);
RB_REMOVE(ext4_buf_lru, &bc->lru_root, buf);
@@ -259,6 +263,7 @@
{
return (bc->cnt <= bc->ref_blocks);
}
+
/**
* @}