LWN.net Logo

Punching holes in files

Punching holes in files

Posted Nov 18, 2010 8:00 UTC (Thu) by stefanha (subscriber, #55072)
Parent article: Punching holes in files

Isn't there already an FITRIM ioctl that at least ext4 implements with vfs hooks for other file systems to follow?


(Log in to post comments)

Punching holes in files

Posted Nov 18, 2010 13:33 UTC (Thu) by Tomasu (subscriber, #39889) [Link]

Hole Punching has very little to do with TRIM. What Hole punching does is remove unneeded blocks from an existing file. TRIM is lower level than that and acts to tell a storage device that the blocks are free.

I could actually see the file system or vfs sending down a TRIM command after a hole is punched in a file.

Punching holes in files

Posted Nov 18, 2010 13:53 UTC (Thu) by stefanha (subscriber, #55072) [Link]

I was asking about the FITRIM ioctl in particular, which I thought might serve a similar purpose. After some more digging, the best explanation seems to be:
http://lwn.net/Articles/397538/

FITRIM will only discard freed blocks in a filesystem. It does not punch new holes in a particular file.

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