block.c (ad31cd4c6945d7e0f0546d92d29dcd12325b4e4a) | block.c (2f0342efdbb0a3c5b5a6a4f4831cbe90c445510b) |
---|---|
1/* 2 * QEMU System Emulator block driver 3 * 4 * Copyright (c) 2003 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 2823 unchanged lines hidden (view full) --- 2832 2833 return false; 2834} 2835 2836bool bdrv_can_write_zeroes_with_unmap(BlockDriverState *bs) 2837{ 2838 BlockDriverInfo bdi; 2839 | 1/* 2 * QEMU System Emulator block driver 3 * 4 * Copyright (c) 2003 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 2823 unchanged lines hidden (view full) --- 2832 2833 return false; 2834} 2835 2836bool bdrv_can_write_zeroes_with_unmap(BlockDriverState *bs) 2837{ 2838 BlockDriverInfo bdi; 2839 |
2840 if (bs->backing || !(bs->open_flags & BDRV_O_UNMAP)) { | 2840 if (!(bs->open_flags & BDRV_O_UNMAP)) { |
2841 return false; 2842 } 2843 2844 if (bdrv_get_info(bs, &bdi) == 0) { 2845 return bdi.can_write_zeroes_with_unmap; 2846 } 2847 2848 return false; --- 1073 unchanged lines hidden --- | 2841 return false; 2842 } 2843 2844 if (bdrv_get_info(bs, &bdi) == 0) { 2845 return bdi.can_write_zeroes_with_unmap; 2846 } 2847 2848 return false; --- 1073 unchanged lines hidden --- |