This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Segfault on unaligned lseek() on /dev/sdX (was: [ITP] ddrescue 1.3)


Hi Christian,

On May 20 17:02, Christian Franke wrote:
> fhandler_dev_floppy::lseek() always clears the 60KB pre-read buffer, 
> even on lseek(fd, 0, SEEK_CUR);
> If a programm (like ddrescue) always calls lseek() before each read(), 
> performance is poor, because the same block is read several times.
> 
> With this new version of the patch, the buffer is only cleared if necessary.

Thanks for the patch.  I've checked in a simplified version of the
buffer allocation which doesn't require calling alloca.  While at it,
I also added error handling in case raw_read fails.

As for the devbuf part of the patch, it's missing a ChangeLog entry.
Can you please send one, possibly in present tense?  (Your first
ChangeLog was incorrectly written in past tense)


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]