lkml.org 
[lkml]   [2000]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.136 / U:2.332 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site