Messages in this thread | | | Date | Thu, 28 Sep 2000 14:32:16 -0400 (EDT) | From | Alexander Viro <> | Subject | Re: [CFT][PATCH] ext2 directories in pagecache |
| |
On Thu, 28 Sep 2000, Andreas Dilger wrote:
> This would also explain why the direntry offset is pointing past the > end of the first dir block, because the next block was added at the time > the new file was created, but then later lost.
Nope. Try the following: @@ -378,12 +378,13 @@ de = (struct ext2_dir_entry_2 *) ((char *) de + rec_len); } } - - if (chunk_offs == 0) { + chunk_offs += chunk_size; + if (chunk_offs == PAGE_CACHE_SIZE) { unsigned long index = page->index+1; ext2_put_page(page); page = grab_cache_page(dir->i_mapping, index); kmap(page); + chunk_offs = 0; } err = page->mapping->a_ops->prepare_write(NULL, page, chunk_offs, chunk_offs+chunk_size);
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
| |