Re: [CFT][PATCH] block_write_*_buffer rewrite

1999-12-03 Thread Andrea Arcangeli
On Thu, 2 Dec 1999, Martin Dalecki wrote: >+#define block_write_range(dentry, page, from, len, buf) \ >+ block_write_zero_range(dentry, page, from, from, from+len, buf) >Ehem. The #define looks lazy. Better do the embedding by an __inline__ >wrapper function. The define looks fine but it

Re: [CFT][PATCH] block_write_*_buffer rewrite

1999-12-02 Thread Martin Dalecki
I have found the following snipplett in the code: --- linux-2.3.30-pre3/include/linux/fs.hTue Nov 30 20:44:54 1999 +++ linux-bird.symlink/include/linux/fs.h Mon Nov 29 17:40:24 1999 @@ -948,6 +948,9 @@ extern int block_write_full_page (struct dentry *, struct page *); extern int b

Re: [CFT][PATCH] block_write_*_buffer rewrite

1999-12-02 Thread Alexander Viro
On Thu, 2 Dec 1999, Ingo Molnar wrote: > > On Wed, 1 Dec 1999, Alexander Viro wrote: > > > On Wed, 1 Dec 1999, Ingo Molnar wrote: > > > > > the problem is generic_file_write() locking the page while generating a > > > page fault (to the same page). > > > > OK, folks. Proposed fix: > > a

Re: [CFT][PATCH] block_write_*_buffer rewrite

1999-12-02 Thread Ingo Molnar
On Wed, 1 Dec 1999, Alexander Viro wrote: > On Wed, 1 Dec 1999, Ingo Molnar wrote: > > > the problem is generic_file_write() locking the page while generating a > > page fault (to the same page). > > OK, folks. Proposed fix: > a) new function: pin_user_page(address); finds a page, faults

Re: [CFT][PATCH] block_write_*_buffer rewrite

1999-12-01 Thread Alexander Viro
On Wed, 1 Dec 1999, Ingo Molnar wrote: > the problem is generic_file_write() locking the page while generating a > page fault (to the same page). OK, folks. Proposed fix: a) new function: pin_user_page(address); finds a page, faults it in, does get_page() and returns the struct page *.

Re: [CFT][PATCH] block_write_*_buffer rewrite

1999-12-01 Thread Alexander Viro
On Wed, 1 Dec 1999, Ingo Molnar wrote: > > On Wed, 1 Dec 1999, Alexander Viro wrote: > > > > looks good, but i think you have removed an important optimization: > > > overlapping the issuing/finishing of read requests with copying memory, on > > > 1k filesystems. This should not matter much o

Re: [CFT][PATCH] block_write_*_buffer rewrite

1999-12-01 Thread Ingo Molnar
On Wed, 1 Dec 1999, Alexander Viro wrote: > > looks good, but i think you have removed an important optimization: > > overlapping the issuing/finishing of read requests with copying memory, on > > 1k filesystems. This should not matter much on bigger boxes, but on > > smaller ones i've seen a de

Re: [CFT][PATCH] block_write_*_buffer rewrite

1999-12-01 Thread Alexander Viro
On Wed, 1 Dec 1999, Ingo Molnar wrote: > > On Tue, 30 Nov 1999, Alexander Viro wrote: > > > Patch merges most of block_write_{partial,cont}_page and fixes a > > couple of bad bugs in the latter. It should fix the problems with > > write-beyond-EOF on FAT and HPFS and it cleans the code up

Re: [CFT][PATCH] block_write_*_buffer rewrite

1999-12-01 Thread Ingo Molnar
On Tue, 30 Nov 1999, Alexander Viro wrote: > Patch merges most of block_write_{partial,cont}_page and fixes a > couple of bad bugs in the latter. It should fix the problems with > write-beyond-EOF on FAT and HPFS and it cleans the code up. [...] looks good, but i think you have removed an

[CFT][PATCH] block_write_*_buffer rewrite

1999-11-30 Thread Alexander Viro
Folks, please help to test it. WARNING: IT'S ON THE CRITICAL PATH AND IF IT'S BROKEN IT WILL EAT YOUR DATA. SILENTLY. EXTREME DANGER. USE ONLY ON SCRATCH BOXEN. Patch merges most of block_write_{partial,cont}_page and fixes a couple of bad bugs in the latter. It should fix the prob