Block layer discard requests
Posted Aug 16, 2008 9:33 UTC (Sat) by dwmw2
In reply to: Block layer discard requests
Parent article: Block layer discard requests
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.
to post comments)