Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

fix compile error on DMC_DEBUG true #235

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/flashcache_main.c
Expand Up @@ -514,7 +514,7 @@ flashcache_do_pending_noerror(struct kcached_job *job)
cacheblk->nr_queued--;
if (pending_job->action == INVALIDATE) {
DPRINTK("flashcache_do_pending: INVALIDATE %llu",
next_job->bio->bi_sector);
pending_job->bio->bi_sector);
VERIFY(pending_job->bio != NULL);
queued = flashcache_inval_blocks(dmc, pending_job->bio);
if (queued) {
Expand Down Expand Up @@ -1683,6 +1683,7 @@ flashcache_inval_block_set_v3(struct cache_c *dmc, int set, struct bio *bio,
int rw = bio_data_dir(bio);
sector_t io_start;
sector_t mask;
sector_t start_dbn;

mask = ~((1 << dmc->block_shift) - 1);
io_start = bio->bi_sector & mask;
Expand Down Expand Up @@ -1717,6 +1718,7 @@ flashcache_inval_block_set_v3(struct cache_c *dmc, int set, struct bio *bio,
}
if (!(cacheblk->cache_state & (BLOCK_IO_INPROG | DIRTY)) &&
(cacheblk->nr_queued == 0)) {
start_dbn = dmc->cache[index].dbn;
atomic_dec(&dmc->cached_blocks);
DPRINTK("Cache invalidate (!BUSY): Block %llu %lx",
start_dbn, cacheblk->cache_state);
Expand Down