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-fsdevel" in
the body of a message to [EMAIL PROTECTED]

Reply via email to