Re: [PATCH] tmpfs: support SEEK_DATA and SEEK_HOLE (reprise)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]