-
Notifications
You must be signed in to change notification settings - Fork 233
Description
Dear FEMU,
Currently, I am working on implementing deallocation via DSM commands for trim/discard operations. However, I have encountered an issue with the slba values in DSM commands.
When printing the slba for each DSM command, I noticed that it is always 0. For instance:
Deleting a 2GB file results in multiple DSM requests, each intended to deallocate a total of 4,194,312 blocks. These requests successfully propagate to the nvme_dsm function in nvme-io.c, but every DSM command shows slba = 0.
Similarly, when deleting two distinct 2GB files, the deallocated slba ranges for both files are reported as the same, starting at slba = 0.
It seems that the slba values in DSM commands are incorrectly recorded. I am uncertain whether this issue lies with FEMU itself or stems from Linux or the file system layer. I have tested this with both ext4 and xfs file systems, and the behavior is consistent across both.
Resolving the slba issue would make supporting trim and discard operations straightforward. Could you please advise whether this might be an issue with FEMU or if I should investigate further into the Linux kernel or file system behavior?
Thank you for your time and support.