Skip to content

Commit

Permalink
Display request queue size > 1 on DEBUG_CACHE
Browse files Browse the repository at this point in the history
  • Loading branch information
ghaerr committed Oct 17, 2024
1 parent be66adc commit 5493f9f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions elks/arch/i86/drivers/block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@ static void add_request(struct blk_dev_struct *dev, struct request *req)
req->rq_next = tmp->rq_next;
tmp->rq_next = req;
set_irq();
#if DEBUG_CACHE
if (debug_level) {
int n = 0;
for (tmp = dev->current_request; tmp->rq_next; tmp = tmp->rq_next)
n++;
if (n > 1) printk("REQS %d ", n);
}
#endif
#else
panic("add_request"); /* non-empty request queue */
#endif
Expand Down
2 changes: 1 addition & 1 deletion elks/include/linuxmt/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#define DEBUG_LEVEL 0 /* default startup debug level*/
#define DEBUG_BIOS 0 /* BIOS driver*/
#define DEBUG_BLK 0 /* block i/o*/
#define DEBUG_CACHE 1 /* floppy track cache*/
#define DEBUG_CACHE 0 /* floppy track cache*/
#define DEBUG_ETH 0 /* ethernet*/
#define DEBUG_FAT 0 /* FAT filesystem*/
#define DEBUG_FILE 0 /* sys open and file i/o*/
Expand Down

0 comments on commit 5493f9f

Please sign in to comment.