Bug?

Igor Sysoev is at rambler-co.ru
Fri Sep 25 12:09:09 MSD 2009


On Fri, Sep 25, 2009 at 10:10:45AM +0400, Igor Sysoev wrote:

> On Fri, Sep 25, 2009 at 09:37:37AM +0400, Igor Sysoev wrote:
> 
> > On Thu, Sep 24, 2009 at 10:34:38PM +0200, Alejandro Mart??nez wrote:
> > 
> > > > pwrite() on file system should write all data at once (at least I see it
> > > > for the first time). What file system do you use ?
> > > 
> > > 
> > > Return Value
> > > value   pwrite() was successful. The value returned is the number of 
> > > bytes actually written. This number is less than or equal to nbyte.
> > > -1   pwrite() was not successful. The errno global variable is set to 
> > > indicate the error.
> > > 
> > > I don't see anywhere that the data should be written all at once. If it 
> > > was like that, then why whould it return the bytes written?
> > 
> > The partial or short write/pwrite/writev()s are usual for sockets, pipes,
> > etc.  However, they are not so usual for disk files and may be caused
> > by some limits: rlimits, qoutes, or free space.  I think that retry
> > will not be successful, but will return errno explainig the cause.
> 
> Could you try the attached patch. It retries short write.

Sorry, this patch is wrong. Try the new attached one.


-- 
Igor Sysoev
http://sysoev.ru/en/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.short.write1
Type: application/octet-stream
Size: 4770 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx/attachments/20090925/84b6b965/attachment.obj>


More information about the nginx mailing list