Hello
On Mon, 2006-07-17 at 18:10 +0400, Vladimir V. Saveliev wrote:
> Hello
>
> On Sun, 2006-07-16 at 12:44 -0500, [EMAIL PROTECTED] wrote:
> > Has my previous post
> > (http://marc.theaimsgroup.com/?l=reiserfs&m=115259665831650&w=2) been
> > overlooked, or have I not provided enough information? Do I need to
> > reproduce these issues on 2.6.18-rc1-mm2? Should I be trying any patches?
> >
>
please try the attached patch.
> your test crashes reiser4 on my test box. I hope to get a patch ready
> later today. Not sure that I got the same problem as you, though. We
> will see.
>
> > The bottom line is with 2.6.17-mm6, I've always been able to OOPs or panic
> > reiser4 on my amd64 machine (haven't tried x86 yet) by using all available
> > physical memory.
> >
> >
>
>
diff -puN fs/reiser4/plugin/file_ops_readdir.c~reiser4-fix-readdir fs/reiser4/plugin/file_ops_readdir.c
--- linux-2.6.17-mm6/fs/reiser4/plugin/file_ops_readdir.c~reiser4-fix-readdir 2006-07-17 18:43:50.000000000 +0400
+++ linux-2.6.17-mm6-vs/fs/reiser4/plugin/file_ops_readdir.c 2006-07-17 19:02:38.000000000 +0400
@@ -349,6 +349,7 @@ feed_entry(struct file *f,
*/
assert("nikita-3436", lock_stack_isclean(get_current_lock_stack()));
+ txn_restart_current();
result = filldir(dirent, name, (int)strlen(name),
/* offset of this entry */
f->f_pos,
diff -puN fs/reiser4/plugin/file/file.c~reiser4-fix-readdir fs/reiser4/plugin/file/file.c
--- linux-2.6.17-mm6/fs/reiser4/plugin/file/file.c~reiser4-fix-readdir 2006-07-17 20:39:11.000000000 +0400
+++ linux-2.6.17-mm6-vs/fs/reiser4/plugin/file/file.c 2006-07-17 21:35:31.000000000 +0400
@@ -781,9 +781,12 @@ int find_or_create_extent(struct page *p
lock_page(page);
node = jnode_of_page(page);
- unlock_page(page);
- if (IS_ERR(node))
+ if (IS_ERR(node)) {
+ unlock_page(page);
return PTR_ERR(node);
+ }
+ JF_SET(node, JNODE_WRITE_PREPARED);
+ unlock_page(page);
if (node->blocknr == 0) {
plugged_hole = 0;
@@ -791,6 +794,7 @@ int find_or_create_extent(struct page *p
(loff_t)page->index << PAGE_CACHE_SHIFT,
&plugged_hole);
if (result) {
+ JF_CLR(node, JNODE_WRITE_PREPARED);
jput(node);
warning("", "update_extent failed: %d", result);
return result;
@@ -806,6 +810,7 @@ int find_or_create_extent(struct page *p
}
BUG_ON(node->atom == NULL);
+ JF_CLR(node, JNODE_WRITE_PREPARED);
jput(node);
if (get_current_context()->entd) {
@@ -1729,7 +1734,9 @@ ssize_t read_unix_file(struct file *file
return RETERR(-EFAULT);
}
- read = read_file(hint, file, buf, left, off);
+ read = read_file(hint, file, buf,
+ left > PAGE_CACHE_SIZE ? PAGE_CACHE_SIZE : left,
+ off);
drop_nonexclusive_access(uf_info);
_