This is the oft-discussed file punch/clear/freespace system call -- on a block device special file. Why doesn't linux have this yet? Other OSes do. This new ioctl class seems to be actively avoiding it.Actually, Linux already has it in one form — madvise(MADV_REMOVE) can do this for inodes with a ->truncate_range() method (which is currently only tmpfs and shmpfs, but I plan to add JFFS2).
I didn't actively avoid it — I did take a look at what it would take to hook up something similar, but it was decidedly non-trivial. I'll probably come back to it, but it doesn't live in a patch sequence of primarily block-layer modifications.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds