mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-10 05:09:01 +00:00
dm: storage: support discard command
Support DISCARD command is meaningful when eMMC usage is high or there are lots of remove operations. For example, when Guest Android is running, there will be lots of files being created and removed. However, virtio-blk BE does not support DISCARD command, data remove operation in UOS will not trigger erase in eMMC. After period of time, the eMMC will be consumed out, and erase must be done by eMMC firmware before writing any new data. This causes the eMMC performance decrease in the whole system (SOS and UOS). To solve the problem, DISCARD should be supported in virtio-blk BE. Tracked-On: #2011 Signed-off-by: Conghui Chen <conghui.chen@intel.com> Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
@@ -69,5 +69,8 @@ int blockif_close(struct blockif_ctxt *bc);
|
||||
uint8_t blockif_get_wce(struct blockif_ctxt *bc);
|
||||
void blockif_set_wce(struct blockif_ctxt *bc, uint8_t wce);
|
||||
int blockif_flush_all(struct blockif_ctxt *bc);
|
||||
int blockif_max_discard_sectors(struct blockif_ctxt *bc);
|
||||
int blockif_max_discard_seg(struct blockif_ctxt *bc);
|
||||
int blockif_discard_sector_alignment(struct blockif_ctxt *bc);
|
||||
|
||||
#endif /* _BLOCK_IF_H_ */
|
||||
|
Reference in New Issue
Block a user