Map OCF error codes to errno in io path
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
parent
57a3938872
commit
d28881588d
@ -204,8 +204,9 @@ static void blkdev_complete_data_master(struct blk_data *master, int error)
|
||||
|
||||
cas_generic_end_io_acct(master->bio, master->start_time);
|
||||
|
||||
result = master->error ? -EIO : 0;
|
||||
CAS_BIO_ENDIO(master->bio, master->master_size, CAS_ERRNO_TO_BLK_STS(result));
|
||||
result = map_cas_err_to_generic(master->error);
|
||||
CAS_BIO_ENDIO(master->bio, master->master_size,
|
||||
CAS_ERRNO_TO_BLK_STS(result));
|
||||
cas_free_blk_data(master);
|
||||
}
|
||||
|
||||
@ -340,7 +341,7 @@ err:
|
||||
static void blkdev_complete_discard(struct ocf_io *io, int error)
|
||||
{
|
||||
struct bio *bio = io->priv1;
|
||||
int result = error ? -EIO : 0;
|
||||
int result = map_cas_err_to_generic(error);
|
||||
|
||||
CAS_BIO_ENDIO(bio, CAS_BIO_BISIZE(bio), CAS_ERRNO_TO_BLK_STS(result));
|
||||
ocf_io_put(io);
|
||||
@ -382,7 +383,7 @@ static void blkdev_complete_flush(struct ocf_io *io, int error)
|
||||
{
|
||||
struct bio *bio = io->priv1;
|
||||
struct bd_object *bvol = io->priv2;
|
||||
int result = error ? -EIO : 0;
|
||||
int result = map_cas_err_to_generic(error);
|
||||
|
||||
ocf_io_put(io);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user