• Asias He's avatar
    target/file: Add UNMAP emulation support · 50642762
    Asias He authored
    This patch adds support for emulation of UNMAP within
    fd_execute_unmap() backend code.
    
    If the FILEIO backend is normal file, the emulation uses fallocate to
    punch hole to reclaim the free space used by the file. If the FILEIO
    backend is block device, the emulation uses blkdev_issue_discard().
    
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Martin K. Petersen <martin.petersen@oracle.com>
    Cc: Nicholas Bellinger <nab@linux-iscsi.org>
    Signed-off-by: default avatarAsias He <asias@redhat.com>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    50642762
target_core_file.c 21.5 KB