Changeset 42039 in vbox
- Timestamp:
- Jul 6, 2012 1:29:33 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 78939
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/err.h
r41976 r42039 1541 1541 * This usually indicates that there is a minor corruption in the image meta data. */ 1542 1542 #define VERR_VD_READ_OUT_OF_RANGE (-3282) 1543 /** Block read was marked as free in the image and returned as a zero block. */ 1544 #define VINF_VD_NEW_ZEROED_BLOCK 3283 1543 1545 /** @} */ 1544 1546 -
trunk/include/VBox/vd.h
r41576 r42039 210 210 */ 211 211 #define VD_OPEN_FLAGS_IGNORE_FLUSH RT_BIT(8) 212 /** 213 * Return VINF_VD_NEW_ZEROED_BLOCK for reads from unallocated blocks. 214 * The caller who uses the flag has to make sure that the read doesn't cross 215 * a block boundary. Because the block size can differ between images reading one 216 * sector at a time is the safest solution. 217 */ 218 #define VD_OPEN_FLAGS_INFORM_ABOUT_ZERO_BLOCKS RT_BIT(9) 212 219 /** Mask of valid flags. */ 213 #define VD_OPEN_FLAGS_MASK (VD_OPEN_FLAGS_NORMAL | VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_HONOR_ZEROES | VD_OPEN_FLAGS_HONOR_SAME | VD_OPEN_FLAGS_INFO | VD_OPEN_FLAGS_ASYNC_IO | VD_OPEN_FLAGS_SHAREABLE | VD_OPEN_FLAGS_SEQUENTIAL | VD_OPEN_FLAGS_DISCARD | VD_OPEN_FLAGS_IGNORE_FLUSH )220 #define VD_OPEN_FLAGS_MASK (VD_OPEN_FLAGS_NORMAL | VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_HONOR_ZEROES | VD_OPEN_FLAGS_HONOR_SAME | VD_OPEN_FLAGS_INFO | VD_OPEN_FLAGS_ASYNC_IO | VD_OPEN_FLAGS_SHAREABLE | VD_OPEN_FLAGS_SEQUENTIAL | VD_OPEN_FLAGS_DISCARD | VD_OPEN_FLAGS_IGNORE_FLUSH | VD_OPEN_FLAGS_INFORM_ABOUT_ZERO_BLOCKS) 214 221 /** @}*/ 215 222 -
trunk/src/VBox/Storage/VD.cpp
r41785 r42039 990 990 cbBufClear += cbThisRead; 991 991 992 rc = VINF_SUCCESS; 992 if (pImage->uOpenFlags & VD_OPEN_FLAGS_INFORM_ABOUT_ZERO_BLOCKS) 993 rc = VINF_VD_NEW_ZEROED_BLOCK; 994 else 995 rc = VINF_SUCCESS; 993 996 } 994 997 else if (RT_SUCCESS(rc))
Note:
See TracChangeset
for help on using the changeset viewer.