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

2012-11-29 Thread Andrew Morton
On Thu, 29 Nov 2012 15:29:15 -0800 (PST) Hugh Dickins wrote: > On Thu, 29 Nov 2012, Andrew Morton wrote: > > On Wed, 28 Nov 2012 17:22:03 -0800 (PST) > > Hugh Dickins wrote: > > > > > +/* > > > + * llseek SEEK_DATA or SEEK_HOLE through the radix_tree. > > > + */ > > > +static pgoff_t shmem_seek

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

2012-11-29 Thread Hugh Dickins
On Thu, 29 Nov 2012, Andrew Morton wrote: > On Wed, 28 Nov 2012 17:22:03 -0800 (PST) > Hugh Dickins wrote: > > > +/* > > + * llseek SEEK_DATA or SEEK_HOLE through the radix_tree. > > + */ > > +static pgoff_t shmem_seek_hole_data(struct address_space *mapping, > > + p

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

2012-11-29 Thread Andrew Morton
On Wed, 28 Nov 2012 17:22:03 -0800 (PST) Hugh Dickins wrote: > Revert 3.5's f21f8062201f ("tmpfs: revert SEEK_DATA and SEEK_HOLE") > to reinstate 4fb5ef089b28 ("tmpfs: support SEEK_DATA and SEEK_HOLE"), > with the intervening additional arg to generic_file_llseek_size(). > > In 3.8, ext4 is expe

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

2012-11-29 Thread Jim Meyering
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

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

2012-11-29 Thread Dave Chinner
On Thu, Nov 29, 2012 at 05:15:50AM +0100, Jim Meyering wrote: > Hugh Dickins wrote: > > On Thu, 29 Nov 2012, Jaegeuk Hanse wrote: > ... > >> But this time in which scenario will use it? > > > > I was not very convinced by the grep argument from Jim and Paul: > > that seemed to be grep holding on to

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

2012-11-28 Thread Jeff Liu
On 11/29/2012 02:53 PM, Jim Meyering wrote: > Jeff Liu wrote: > >> On 11/29/2012 12:15 PM, Jim Meyering wrote: >>> Hugh Dickins wrote: On Thu, 29 Nov 2012, Jaegeuk Hanse wrote: >>> ... > But this time in which scenario will use it? I was not very convinced by the grep argument f

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

2012-11-28 Thread Jim Meyering
Jeff Liu wrote: > On 11/29/2012 12:15 PM, Jim Meyering wrote: >> Hugh Dickins wrote: >>> On Thu, 29 Nov 2012, Jaegeuk Hanse wrote: >> ... But this time in which scenario will use it? >>> >>> I was not very convinced by the grep argument from Jim and Paul: >>> that seemed to be grep holding on

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

2012-11-28 Thread Jeff Liu
On 11/29/2012 12:15 PM, Jim Meyering wrote: > Hugh Dickins wrote: >> On Thu, 29 Nov 2012, Jaegeuk Hanse wrote: > ... >>> But this time in which scenario will use it? >> >> I was not very convinced by the grep argument from Jim and Paul: >> that seemed to be grep holding on to a no-arbitrary-limits

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

2012-11-28 Thread Hugh Dickins
On Thu, 29 Nov 2012, Dave Chinner wrote: > On Wed, Nov 28, 2012 at 05:22:03PM -0800, Hugh Dickins wrote: > > Revert 3.5's f21f8062201f ("tmpfs: revert SEEK_DATA and SEEK_HOLE") > > to reinstate 4fb5ef089b28 ("tmpfs: support SEEK_DATA and SEEK_HOLE"), > > with the intervening additional arg to gener

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

2012-11-28 Thread Jim Meyering
Hugh Dickins wrote: > On Thu, 29 Nov 2012, Jaegeuk Hanse wrote: ... >> But this time in which scenario will use it? > > I was not very convinced by the grep argument from Jim and Paul: > that seemed to be grep holding on to a no-arbitrary-limits dogma, > at the expense of its users, causing an absu

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

2012-11-28 Thread Dave Chinner
On Wed, Nov 28, 2012 at 05:22:03PM -0800, Hugh Dickins wrote: > Revert 3.5's f21f8062201f ("tmpfs: revert SEEK_DATA and SEEK_HOLE") > to reinstate 4fb5ef089b28 ("tmpfs: support SEEK_DATA and SEEK_HOLE"), > with the intervening additional arg to generic_file_llseek_size(). > > In 3.8, ext4 is expec

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

2012-11-28 Thread Hugh Dickins
On Thu, 29 Nov 2012, Jaegeuk Hanse wrote: > On Wed, Nov 28, 2012 at 05:22:03PM -0800, Hugh Dickins wrote: > >Revert 3.5's f21f8062201f ("tmpfs: revert SEEK_DATA and SEEK_HOLE") > >to reinstate 4fb5ef089b28 ("tmpfs: support SEEK_DATA and SEEK_HOLE"), > >with the intervening additional arg to generic

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

2012-11-28 Thread Jaegeuk Hanse
On Wed, Nov 28, 2012 at 05:22:03PM -0800, Hugh Dickins wrote: >Revert 3.5's f21f8062201f ("tmpfs: revert SEEK_DATA and SEEK_HOLE") >to reinstate 4fb5ef089b28 ("tmpfs: support SEEK_DATA and SEEK_HOLE"), >with the intervening additional arg to generic_file_llseek_size(). > >In 3.8, ext4 is expected t

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

2012-11-28 Thread Hugh Dickins
Revert 3.5's f21f8062201f ("tmpfs: revert SEEK_DATA and SEEK_HOLE") to reinstate 4fb5ef089b28 ("tmpfs: support SEEK_DATA and SEEK_HOLE"), with the intervening additional arg to generic_file_llseek_size(). In 3.8, ext4 is expected to join btrfs, ocfs2 and xfs with proper SEEK_DATA and SEEK_HOLE sup