User: Password:
Subscribe / Log in / New account

Block layer discard requests

Block layer discard requests

Posted Aug 16, 2008 9:33 UTC (Sat) by dwmw2 (subscriber, #2063)
In reply to: Block layer discard requests by giraffedata
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.

(Log in to post comments)

Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds