Re: [Patch]: Truncate

2004-08-28 Thread Corinna Vinschen
Hi Pierre, On Aug 27 21:42, Pierre A. Humblet wrote: At 01:00 PM 8/23/2004 +0200, Corinna Vinschen wrote: Except for this comment, which isn't valid (see above), please check it in. Done. But here is another simple patch taking care of your concern that we can fail while zero filling,

Re: [Patch]: Truncate

2004-08-28 Thread Pierre A. Humblet
At 11:37 AM 8/28/2004 +0200, Corinna Vinschen wrote: Hi Pierre, On Aug 27 21:42, Pierre A. Humblet wrote: At 01:00 PM 8/23/2004 +0200, Corinna Vinschen wrote: Except for this comment, which isn't valid (see above), please check it in. Done. But here is another simple patch taking care of

Re: [Patch]: Truncate

2004-08-28 Thread Corinna Vinschen
On Aug 28 10:07, Pierre A. Humblet wrote: At 11:37 AM 8/28/2004 +0200, Corinna Vinschen wrote: On Aug 27 21:42, Pierre A. Humblet wrote: * fhandler.cc (fhandler_base::write): In the lseek_bug case, set EOF before zero filling. Combine similar error handling statements. the first

Re: [Patch]: Truncate

2004-08-28 Thread Corinna Vinschen
On Aug 28 17:11, Corinna Vinschen wrote: On Aug 28 10:07, Pierre A. Humblet wrote: At 11:37 AM 8/28/2004 +0200, Corinna Vinschen wrote: On Aug 27 21:42, Pierre A. Humblet wrote: * fhandler.cc (fhandler_base::write): In the lseek_bug case, set EOF before zero filling. Combine similar

Re: [Patch]: Truncate

2004-08-27 Thread Pierre A. Humblet
At 01:00 PM 8/23/2004 +0200, Corinna Vinschen wrote: Except for this comment, which isn't valid (see above), please check it in. Done. But here is another simple patch taking care of your concern that we can fail while zero filling, leaving the file system filled to capacity. 2004-08-28 Pierre

Re: [Patch]: Truncate

2004-08-23 Thread Corinna Vinschen
On Aug 22 17:09, Pierre A. Humblet wrote: In that case we can't reuse the code already present in ::write because when ::write calls GetFileSize it will get the length already updated by SetEndOfFile. That's true. The way ::write is written, it will restore the FilePointer at the beginning

Re: [Patch]: Truncate

2004-08-22 Thread Pierre A. Humblet
At 05:55 PM 8/22/2004 +0200, you wrote: Hi Pierre, Looks good to me. But wouldn't it be better to fill in the zeros only if SetEndOfFile succeeded? That would avoid a lengthy write operation if the application was, say, too optimistic about the space left on disk. In that case we can't reuse

[Patch]: Truncate

2004-08-21 Thread Pierre A. Humblet
This fixes ftruncate64 on 9x. It now passes all truncate tests in the testsuite. Pierre 2004-08-22 Pierre Humblet [EMAIL PROTECTED] * syscalls.cc (ftruncate64): On 9x, call write with a zero length to zero fill when the file is extended. Index: syscalls.cc