Subject: Re: access to device fails after update
To: None <current-users@NetBSD.org>
From: Ed Gould <netbsd@left.wing.org>
List: current-users
Date: 06/20/2004 21:34:11
Steve Bellovin wrote:
 > I'm 90% certain that there is no guarantee of buffering strategy, and
 > never was.  Portable scripts do things like the dd strategy shown
 > above.  It worked on 1.6.2 by coincidence.

That's my understanding as well.  Buffering for pipes has always been at 
the discretion of the kernel; programs are not allowed to depend on any 
specific behavior.

 > That said, pragmatism may dictate changing -- *not* fixing -- gzip,
 > but probably not if the cost of doing so is too high.

Even if gzip is changed, it will not guarantee the behavior.  Just 
because the writer issues a 16k write does not guarantee that the reader 
will receive all the data in one read call.  Changing gzip may improve 
the probability that it will work, but to be certain, the proper 
arguments to dd should be specified.