lkml.org 
[lkml]   [2012]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] tmpfs: support SEEK_DATA and SEEK_HOLE (reprise)
Date
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.


\
 
 \ /
  Last update: 2012-11-29 21:41    [W:0.046 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site