blkdebug.c (4d1467a5683c8c91ab89d56a13c82c0a87bbbca5) | blkdebug.c (79a558664840adf502fe94907b0a680836e3e98e) |
---|---|
1/* 2 * Block protocol for I/O error injection 3 * 4 * Copyright (C) 2016-2017 Red Hat, Inc. 5 * Copyright (c) 2010 Kevin Wolf <kwolf@redhat.com> 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a copy 8 * of this software and associated documentation files (the "Software"), to deal --- 732 unchanged lines hidden (view full) --- 741 err = rule_check(bs, offset, bytes, BLKDEBUG_IO_TYPE_DISCARD); 742 if (err) { 743 return err; 744 } 745 746 return bdrv_co_pdiscard(bs->file, offset, bytes); 747} 748 | 1/* 2 * Block protocol for I/O error injection 3 * 4 * Copyright (C) 2016-2017 Red Hat, Inc. 5 * Copyright (c) 2010 Kevin Wolf <kwolf@redhat.com> 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a copy 8 * of this software and associated documentation files (the "Software"), to deal --- 732 unchanged lines hidden (view full) --- 741 err = rule_check(bs, offset, bytes, BLKDEBUG_IO_TYPE_DISCARD); 742 if (err) { 743 return err; 744 } 745 746 return bdrv_co_pdiscard(bs->file, offset, bytes); 747} 748 |
749static int coroutine_fn blkdebug_co_block_status(BlockDriverState *bs, 750 bool want_zero, 751 int64_t offset, 752 int64_t bytes, 753 int64_t *pnum, 754 int64_t *map, 755 BlockDriverState **file) | 749static int coroutine_fn GRAPH_RDLOCK 750blkdebug_co_block_status(BlockDriverState *bs, bool want_zero, int64_t offset, 751 int64_t bytes, int64_t *pnum, int64_t *map, 752 BlockDriverState **file) |
756{ 757 int err; 758 759 assert(QEMU_IS_ALIGNED(offset | bytes, bs->bl.request_alignment)); 760 761 err = rule_check(bs, offset, bytes, BLKDEBUG_IO_TYPE_BLOCK_STATUS); 762 if (err) { 763 return err; --- 204 unchanged lines hidden (view full) --- 968} 969 970static int64_t coroutine_fn GRAPH_RDLOCK 971blkdebug_co_getlength(BlockDriverState *bs) 972{ 973 return bdrv_co_getlength(bs->file->bs); 974} 975 | 753{ 754 int err; 755 756 assert(QEMU_IS_ALIGNED(offset | bytes, bs->bl.request_alignment)); 757 758 err = rule_check(bs, offset, bytes, BLKDEBUG_IO_TYPE_BLOCK_STATUS); 759 if (err) { 760 return err; --- 204 unchanged lines hidden (view full) --- 965} 966 967static int64_t coroutine_fn GRAPH_RDLOCK 968blkdebug_co_getlength(BlockDriverState *bs) 969{ 970 return bdrv_co_getlength(bs->file->bs); 971} 972 |
976static void blkdebug_refresh_filename(BlockDriverState *bs) | 973static void GRAPH_RDLOCK blkdebug_refresh_filename(BlockDriverState *bs) |
977{ 978 BDRVBlkdebugState *s = bs->opaque; 979 const QDictEntry *e; 980 int ret; 981 982 if (!bs->file->bs->exact_filename[0]) { 983 return; 984 } --- 122 unchanged lines hidden --- | 974{ 975 BDRVBlkdebugState *s = bs->opaque; 976 const QDictEntry *e; 977 int ret; 978 979 if (!bs->file->bs->exact_filename[0]) { 980 return; 981 } --- 122 unchanged lines hidden --- |