cont_prepare_write fix

2000-07-24 Thread Roman Zippel
Hi, While trying to get affs working again, I noticed that the current cont_prepare_write is hardly working, if you write to a file in steps of 1024, the bytes pointer is never updated resulting in an endless loop. Below is a fixed version, that also removes the bogus tricks to the bytes ptr. I

Re: cont_prepare_write fix

2000-07-24 Thread Alexander Viro
On Mon, 24 Jul 2000, Roman Zippel wrote: Hi, While trying to get affs working again, I noticed that the current cont_prepare_write is hardly working, if you write to a file in steps of 1024, the bytes pointer is never updated resulting in an endless loop. Testcase, please? It certainly

Re: cont_prepare_write fix

2000-07-24 Thread Roman Zippel
Hi, While trying to get affs working again, I noticed that the current cont_prepare_write is hardly working, if you write to a file in steps of 1024, the bytes pointer is never updated resulting in an endless loop. Testcase, please? It certainly seems to be working on FAT and HPFS -

Re: cont_prepare_write fix

2000-07-24 Thread Alexander Viro
On Mon, 24 Jul 2000, Roman Zippel wrote: Hi, While trying to get affs working again, I noticed that the current cont_prepare_write is hardly working, if you write to a file in steps of 1024, the bytes pointer is never updated resulting in an endless loop. Testcase, please? It

Re: cont_prepare_write fix

2000-07-24 Thread Benjamin C.R. LaHaise
On Mon, 24 Jul 2000, Alexander Viro wrote: Not needed. That race is taken care of - readpage() never does access past i_size and has the page locked, while vmtruncate() starts with setting i_size (on shrinking truncate(), that is), then goes through all pages in affected area and grabs the

Re: cont_prepare_write fix

2000-07-24 Thread Roman Zippel
Hi, Because actual _allocation_ unit may have nothing to blocksize and be invisible to VFS. Check fatfs - it uses the thing to trigger allocation, but actual zero-out goes on per-sector basis. I tried vfat on a MO drive with 1KByte sectors - it doesn't work. I also don't know how you want to

Re: cont_prepare_write fix

2000-07-24 Thread Jan Harkes
On Mon, Jul 24, 2000 at 12:04:39PM -0400, Benjamin C.R. LaHaise wrote: On Mon, 24 Jul 2000, Alexander Viro wrote: Not needed. That race is taken care of - readpage() never does access past i_size and has the page locked, while vmtruncate() starts with setting i_size (on shrinking

Re: cont_prepare_write fix

2000-07-24 Thread David Gibson
On Mon, Jul 24, 2000 at 02:24:42PM -0400, Jan Harkes wrote: On Mon, Jul 24, 2000 at 12:04:39PM -0400, Benjamin C.R. LaHaise wrote: On Mon, 24 Jul 2000, Alexander Viro wrote: Not needed. That race is taken care of - readpage() never does access past i_size and has the page locked,