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

Commit

Permalink
fix compile error on DMC_DEBUG true
Browse files Browse the repository at this point in the history
Change-Id: I3f3c7ccc74a99dfa42e80650b7f04e98f26756a7
  • Loading branch information
lishuhao committed Nov 23, 2018
1 parent 437afbf commit 3e4dd30
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit 3e4dd30

Please sign in to comment.