Dave Chinner wrote: ... >> So, yes, GNU cp will soon use this feature. > > It would be nice if utilities like grep used it, too, because having > grep burn gigabytes of memory scanning holes in large files and > then going OOM is, well, kind of nasty: > > $ xfs_io -f -c "truncate 1t" blah > $ ls -l > total 0 > -rw-r--r-- 1 dave dave 1.0T Nov 30 06:42 blah > $ grep foo blah > grep: memory exhausted > $ $ grep -V > grep (GNU grep) 2.12
Hi Dave, Yes, adapting grep is also on the road map. That precise case was one of my arguments for making SEEK_DATA/SEEK_HOLE support more widespread. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/