Re: [PATCH] dd: add a flag to discard cached data

2011-02-24 Thread Jim Meyering
Pádraig Brady wrote: > On 24/02/11 10:05, Jim Meyering wrote: >> That looks fine, but I'd drop the use of -F, >> since it's just an optimization in this case, and >> probably not portable to some crufty targets. >> >> Hmm.. but I see uses of grep -F in other tests and >> even in bootstrap, so maybe

Re: [PATCH] dd: add a flag to discard cached data

2011-02-24 Thread Pádraig Brady
On 24/02/11 10:05, Jim Meyering wrote: > That looks fine, but I'd drop the use of -F, > since it's just an optimization in this case, and > probably not portable to some crufty targets. > > Hmm.. but I see uses of grep -F in other tests and > even in bootstrap, so maybe it's not a problem, these d

Re: [PATCH] dd: add a flag to discard cached data

2011-02-24 Thread Jim Meyering
Pádraig Brady wrote: > On 24/02/11 07:52, Jim Meyering wrote: >> One quick question: does the test need >> something to make it skip (not fail) >> on systems that lack kernel support for the feature? > > Oops right. > Attached is latest version. ... > +# Advise to drop cache for whole file > +if !

Re: [PATCH] dd: add a flag to discard cached data

2011-02-24 Thread Pádraig Brady
On 24/02/11 07:52, Jim Meyering wrote: > One quick question: does the test need > something to make it skip (not fail) > on systems that lack kernel support for the feature? Oops right. Attached is latest version. thanks for the review, Pádraig. >From fe067f8f52defc54636ae862df03a2115ac6266f Mon

Re: [PATCH] dd: add a flag to discard cached data

2011-02-24 Thread Jim Meyering
Pádraig Brady wrote: > I noticed fadvise(DONTNEED) getting some love in the kernel recently >http://lkml.org/lkml/2011/2/17/169 > Which prompted me to implement this. With the attached one can now: > > # Advise to drop cache for whole file > dd if=ifile iflag=nocache count=0 > > # Ensure