|
From: Miklos S. <mi...@sz...> - 2006-04-13 07:28:45
|
> > > DEBUG fusermount: optbuf = fd=4,rootmode=40000,user_id=0,group_id=0
> > > unique: 1, opcode: ??? (0), nodeid: 0, insize: 56
> > > unique: 1, error: -5 (Input/output error), outsize: 16
> > > fuse: writing device: Invalid argument
> > >
> > > I assume this is the infamous ARM problem?
> >
> > Yes.
> >
> > Can you try this workaround?
>
> I tried it on 2.6.0-pre2, but I get an undefined reference to "page" in the
> flush_cache_page call. Should I use another version of fuse?
No, the patch was wrong, in more ways than one.
Here's a better one, hopefully.
Miklos
Index: linux/fs/fuse/dev.c
===================================================================
--- linux.orig/fs/fuse/dev.c 2006-04-12 19:24:43.000000000 +0200
+++ linux/fs/fuse/dev.c 2006-04-13 09:10:32.000000000 +0200
@@ -410,6 +410,7 @@ static void fuse_copy_finish(struct fuse
static int fuse_copy_fill(struct fuse_copy_state *cs)
{
unsigned long offset;
+ struct vm_area_struct *vma;
int err;
unlock_request(cs->fc, cs->req);
@@ -423,13 +424,14 @@ static int fuse_copy_fill(struct fuse_co
}
down_read(¤t->mm->mmap_sem);
err = get_user_pages(current, current->mm, cs->addr, 1, cs->write, 0,
- &cs->pg, NULL);
+ &cs->pg, &vma);
up_read(¤t->mm->mmap_sem);
if (err < 0)
return err;
BUG_ON(err != 1);
offset = cs->addr % PAGE_SIZE;
cs->mapaddr = kmap_atomic(cs->pg, KM_USER0);
+ flush_cache_page(vma, cs->addr, page_to_pfn(cs->pg));
cs->buf = cs->mapaddr + offset;
cs->len = min(PAGE_SIZE - offset, cs->seglen);
cs->seglen -= cs->len;
|