Merge pull request #1561 from robertbaldyga/flush-as-write
Submit flush as a WRITE bio
This commit is contained in:
commit
dd992d3cd9
@ -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,
|
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)
|
int __init cas_init_disks(void)
|
||||||
@ -94,7 +94,7 @@ void cas_disk_close(struct cas_disk *dsk)
|
|||||||
|
|
||||||
CAS_DEBUG_DISK(dsk, "Destroying (%p)", 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);
|
kfree(dsk->path);
|
||||||
kmem_cache_free(cas_module.disk_cache, dsk);
|
kmem_cache_free(cas_module.disk_cache, dsk);
|
||||||
|
@ -275,7 +275,7 @@ static void block_dev_forward_flush(ocf_volume_t volume,
|
|||||||
bio->bi_private = (void *)token;
|
bio->bi_private = (void *)token;
|
||||||
bio->bi_end_io = CAS_REFER_BLOCK_CALLBACK(cas_bd_forward_end);
|
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user