ramdisk: implement trim and icon, add to image

- B_TRIM_DEVICE on a ram disk frees all requested pages. Reading from a
  trimmed page returns all 0s. This can be used with fstrim to release
  memory for the parts not used by the filesystem, without unregistering
  then registering the device.
- Add icon and ioctl to get it.
- Add it to the image, because it works reasonably well and there is no
  reason not to include it.
This commit is contained in:
Adrien Destugues
2016-11-03 22:58:31 +01:00
parent b96788c95d
commit 96fef5d19f
3 changed files with 181 additions and 8 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ if $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 {
# drivers
AddNewDriversToPackage disk scsi : scsi_cd scsi_disk ;
AddNewDriversToPackage disk virtual : virtio_block ;
AddNewDriversToPackage disk virtual : virtio_block ram_disk ;
AddNewDriversToPackage power : $(SYSTEM_ADD_ONS_DRIVERS_POWER) ;
#AddNewDriversToPackage display : display_adapter@x86 ;