File:  [NetBSD Developer Wiki] / wikisrc / projects / project / ffs-discard.mdwn
Revision 1.2: download - view: text, annotated - select for diffs
Fri Aug 26 19:35:19 2016 UTC (4 years, 3 months ago) by dholland
Branches: MAIN
CVS tags: HEAD
Minor improvements; note crash recovery.

[[!template id=project

title="Discard for FFS"



duration="2-3 months"

The fdiscard system call, and the file-system-level VOP_DISCARD operation
backing it, allow dropping ranges of blocks from files to create
sparse files with holes.
This is a simple generalization of truncate.

Discard is not currently implemented for FFS; implement it.
(For regular files.)
It should be possible to do so by generalizing the existing truncate
code; this should be not super-difficult, but somewhat messy.

Note that it's important (for both the WAPBL and non-WAPBL cases) to
preserve the on-disk invariants needed for successful crash recovery.



CVSweb for NetBSD wikisrc <> software: FreeBSD-CVSweb