Changeset 38876 in vbox for trunk/include/VBox
- Timestamp:
- Sep 27, 2011 9:03:15 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 74198
- Location:
- trunk/include/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vd-plugin.h
r38621 r38876 601 601 unsigned fDiscard)); 602 602 603 /** 604 * Discards the given amount of bytes decreasing the size of the image if possible 605 * callback version for asynchronous I/O. 606 * 607 * @returns VBox status code. 608 * @retval VERR_VD_DISCARD_ALIGNMENT_NOT_MET if the range doesn't meet the required alignment 609 * for the discard. 610 * @param pBackendData Opaque state data for this image. 611 * @param pIoCtx I/O context associated with this request. 612 * @param uOffset The offset of the first byte to discard. 613 * @param cbDiscard How many bytes to discard. 614 * @param pcbPreAllocated Pointer to the returned amount of bytes that must 615 * be discarded before the range to perform a full 616 * block discard. 617 * @param pcbPostAllocated Pointer to the returned amount of bytes that must 618 * be discarded after the range to perform a full 619 * block discard. 620 * @param pcbActuallyDiscarded Pointer to the returned amount of bytes which 621 * could be actually discarded. 622 * @param ppbmAllocationBitmap Where to store the pointer to the allocation bitmap 623 * if VERR_VD_DISCARD_ALIGNMENT_NOT_MET is returned or NULL 624 * if the allocation bitmap should be returned. 625 * @param fDiscard Flags which affect discard behavior. Combination 626 * of the VD_DISCARD_* flags. 627 */ 628 DECLR3CALLBACKMEMBER(int, pfnAsyncDiscard, (void *pBackendData, PVDIOCTX pIoCtx, 629 uint64_t uOffset, size_t cbDiscard, 630 size_t *pcbPreAllocated, 631 size_t *pcbPostAllocated, 632 size_t *pcbActuallyDiscarded, 633 void **ppbmAllocationBitmap, 634 unsigned fDiscard)); 635 603 636 } VBOXHDDBACKEND; 604 637 -
trunk/include/VBox/vd.h
r38621 r38876 398 398 399 399 /** 400 * VD range descriptor.401 */402 typedef struct VDRANGE403 {404 /** Start offset in bytes, multiple of 512. */405 uint64_t offStart;406 /** Amount of bytes described by this range, multiple of 512. */407 size_t cbRange;408 } VDRANGE;409 410 /** Pointer to a range descriptor. */411 typedef VDRANGE *PVDRANGE;412 /** Pointer to a constant range descriptor. */413 typedef const VDRANGE *PCVDRANGE;414 415 /**416 400 * VBox HDD Container main structure. 417 401 */ … … 1122 1106 * appear to contain data. This method is mainly used to implement TRIM support. 1123 1107 */ 1124 VBOXDDU_DECL(int) VDDiscardRanges(PVBOXHDD pDisk, PC VDRANGE paRanges, unsigned cRanges);1108 VBOXDDU_DECL(int) VDDiscardRanges(PVBOXHDD pDisk, PCRTRANGE paRanges, unsigned cRanges); 1125 1109 1126 1110 … … 1170 1154 PFNVDASYNCTRANSFERCOMPLETE pfnComplete, 1171 1155 void *pvUser1, void *pvUser2); 1156 1157 /** 1158 * Start an asynchronous discard request. 1159 * 1160 * @return VBox status code. 1161 * @param pDisk Pointer to HDD container. 1162 * @param paRanges The array of ranges to discard. 1163 * @param cRanges Number of entries in the array. 1164 * @param pfnComplete Completion callback. 1165 * @param pvUser1 User data which is passed on completion. 1166 * @param pvUser2 User data which is passed on completion. 1167 */ 1168 VBOXDDU_DECL(int) VDAsyncDiscardRanges(PVBOXHDD pDisk, PCRTRANGE paRanges, unsigned cRanges, 1169 PFNVDASYNCTRANSFERCOMPLETE pfnComplete, 1170 void *pvUser1, void *pvUser); 1171 1172 1172 RT_C_DECLS_END 1173 1173 -
trunk/include/VBox/vddbg.h
r38632 r38876 175 175 * @param phIoLogEntry Where to store the I/O log entry handle on success. 176 176 */ 177 VBOXDDU_DECL(int) VDDbgIoLogStartDiscard(VDIOLOGGER hIoLogger, bool fAsync, P VDRANGE paRanges, unsigned cRanges,177 VBOXDDU_DECL(int) VDDbgIoLogStartDiscard(VDIOLOGGER hIoLogger, bool fAsync, PCRTRANGE paRanges, unsigned cRanges, 178 178 PVDIOLOGENT phIoLogEntry); 179 179 … … 239 239 */ 240 240 VBOXDDU_DECL(int) VDDbgIoLogEventGetStartDiscard(VDIOLOGGER hIoLogger, uint64_t *pidEvent, bool *pfAsync, 241 P VDRANGE *ppaRanges, unsigned *pcRanges);241 PRTRANGE *ppaRanges, unsigned *pcRanges); 242 242 243 243 /**
Note:
See TracChangeset
for help on using the changeset viewer.