Hi All, Here is the patch to support madvise(MADV_FREE) - which frees up the given range of pages and truncates the underlying backing store. This basically provides "punch hole into file" functionality. Currently it supports ONLY shmfs/tmpfs - where we have short term need. Other filesystems return -ENOSYS. Yes. This is a *crazy* interface to do it. But this is what we exactly need for now. Here is the discussion on linux-mm (for all the fun discussion and the naming): http://marc.theaimsgroup.com/?l=linux-mm&m=113078625426989&w=2 Andrew, could you include this in your next -mm release ? BTW, for completeness - this patch includes reiser4-truncate-inode- pages-range patch from your -mm series. If you want me to re-work my patch without that, please let me know. http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.14- rc5/2.6.14-rc5-mm1/broken-out/reiser4-truncate_inode_pages_range.patch I tested with my test cases and Jeff Dike was kind enough to provide a test case with UML - which found more bugs. I thank Andrea & Hugh for helping me out heavily :) Comments ? Thanks, Badari