Re: __block_prepare_write(): bug?

2000-04-06 Thread Alexander Viro
On Wed, 5 Apr 2000, Erez Zadok wrote: - if (block_start = to) - break; bh-b_end_io = end_buffer_io_sync; if (!buffer_mapped(bh)) { err = get_block(inode, block, bh, 1); And there you go: bloody thing bumps

Re: __block_prepare_write(): bug?

2000-04-06 Thread Erez Zadok
In message [EMAIL PROTECTED], Alexander Viro writes: On Wed, 5 Apr 2000, Erez Zadok wrote: - if (block_start = to) - break; bh-b_end_io = end_buffer_io_sync; if (!buffer_mapped(bh)) { err = get_block(inode,

Re: __block_prepare_write(): bug?

2000-04-05 Thread Ion Badulescu
In article cs.lists.linux-fsdevel/2405104700$[EMAIL PROTECTED] you wrote: AFAICS the memset() for new buffer blocks is wrong: memset(kaddr+to,0, block_end-to) It should be memset(kaddr+max(to,block_start),0,block_end-to) example: 1 kB block size, block 0: "old"

Re: __block_prepare_write(): bug?

2000-04-05 Thread Erez Zadok
In message [EMAIL PROTECTED], Ion Badulescu writes: [...] The current implementation will also populate the page cache with pages that are not Uptodate, but are not Locked either, which is clearly a bug. It will always happen if there is a partial write to a page, e.g. if a program creates a

Re: __block_prepare_write(): bug?

2000-04-05 Thread Ion Badulescu
On 5 Apr 2000, Eric W. Biederman wrote: Summary: a page should not be in the cache and not be up-to-date. If it is not up-to-date, then it should also probably be locked, but only b/c it is probably in transit from the disk to the cache. Nope. Oh yeah. Just think about it a little