block.c (3b555b51156279f8dd9184c85b7af920b9f4cb9e) block.c (160a29e2f8b2d100246ab446813409f72d1e0767)
1/*
2 * QEMU System Emulator block driver
3 *
4 * Copyright (c) 2003 Fabrice Bellard
5 * Copyright (c) 2020 Virtuozzo International GmbH.
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

--- 5835 unchanged lines hidden (view full) ---

5844{
5845 BlockDriver *drv = bs->drv;
5846 IO_CODE();
5847 assert_bdrv_graph_readable();
5848
5849 if (!drv)
5850 return -ENOMEDIUM;
5851
1/*
2 * QEMU System Emulator block driver
3 *
4 * Copyright (c) 2003 Fabrice Bellard
5 * Copyright (c) 2020 Virtuozzo International GmbH.
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

--- 5835 unchanged lines hidden (view full) ---

5844{
5845 BlockDriver *drv = bs->drv;
5846 IO_CODE();
5847 assert_bdrv_graph_readable();
5848
5849 if (!drv)
5850 return -ENOMEDIUM;
5851
5852 if (drv->has_variable_length) {
5852 if (bs->bl.has_variable_length) {
5853 int ret = bdrv_co_refresh_total_sectors(bs, bs->total_sectors);
5854 if (ret < 0) {
5855 return ret;
5856 }
5857 }
5858 return bs->total_sectors;
5859}
5860

--- 2391 unchanged lines hidden ---
5853 int ret = bdrv_co_refresh_total_sectors(bs, bs->total_sectors);
5854 if (ret < 0) {
5855 return ret;
5856 }
5857 }
5858 return bs->total_sectors;
5859}
5860

--- 2391 unchanged lines hidden ---