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
  • Loading branch information
letterwuyu committed Nov 17, 2018
1 parent 437afbf commit a8fbc6c
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 @@ -1718,6 +1719,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)) {
atomic_dec(&dmc->cached_blocks);
start_dbn = dmc->cache[index].dbn;
DPRINTK("Cache invalidate (!BUSY): Block %llu %lx",
start_dbn, cacheblk->cache_state);
flashcache_hash_remove(dmc, index);
Expand Down

0 comments on commit a8fbc6c

Please sign in to comment.