Messages in this thread | | | From | Jim Meyering <> | Subject | Re: [PATCH] tmpfs: support SEEK_DATA and SEEK_HOLE (reprise) | Date | Thu, 29 Nov 2012 21:17:51 +0100 |
| |
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.
| |