Skip to content

Commit

Permalink
Merge pull request #1561 from robertbaldyga/flush-as-write
Browse files Browse the repository at this point in the history
Submit flush as a WRITE bio
  • Loading branch information
robertbaldyga authored Oct 8, 2024
2 parents 08c7a71 + c889254 commit dd992d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions modules/cas_cache/disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ static inline cas_bdev_handle_t open_bdev_exclusive(const char *path,
}

static inline void close_bdev_exclusive(cas_bdev_handle_t handle,
CAS_BLK_MODE mode)
CAS_BLK_MODE mode, void *holder)
{
cas_bdev_release(handle, mode | CAS_BLK_MODE_EXCL, NULL);
cas_bdev_release(handle, mode | CAS_BLK_MODE_EXCL, holder);
}

int __init cas_init_disks(void)
Expand Down Expand Up @@ -94,7 +94,7 @@ void cas_disk_close(struct cas_disk *dsk)

CAS_DEBUG_DISK(dsk, "Destroying (%p)", dsk);

close_bdev_exclusive(dsk->bdev_handle, CAS_DISK_OPEN_MODE);
close_bdev_exclusive(dsk->bdev_handle, CAS_DISK_OPEN_MODE, dsk);

kfree(dsk->path);
kmem_cache_free(cas_module.disk_cache, dsk);
Expand Down
2 changes: 1 addition & 1 deletion modules/cas_cache/volume/vol_block_dev_bottom.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ static void block_dev_forward_flush(ocf_volume_t volume,
bio->bi_private = (void *)token;
bio->bi_end_io = CAS_REFER_BLOCK_CALLBACK(cas_bd_forward_end);

cas_submit_bio(CAS_SET_FLUSH(0), bio);
cas_submit_bio(CAS_SET_FLUSH(WRITE), bio);

}

Expand Down

0 comments on commit dd992d3

Please sign in to comment.