[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I/O error copying file to jffs, no obvous problem in jffs log?



You mean like thus?
Seems to work.

Vipin

Index: inode-v23.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs/inode-v23.c,v
retrieving revision 1.60
diff -u -r1.60 inode-v23.c
--- inode-v23.c 2001/02/10 21:19:53     1.60
+++ inode-v23.c 2001/02/20 17:53:42
@@ -754,6 +754,10 @@
                                "Wanted to read %lu bytes but only "
                                "read %d bytes.\n", read_len, r);
                });
+       }else{
+              memset(buf, 0, PAGE_SIZE);
+              SetPageUptodate(page);
+              result = 0;
        }

        D3(printk (KERN_NOTICE "readpage(): up biglock\n"));






David Woodhouse wrote:

> vmalik@xxxxxxx.com said:
> > Ok, here it is. It seems that it fails inside "jffs_do_readpage_nolock(
> > )" (with an error of -5 (EIO, I think)) which is called from
> > jffs_prepare_write().
>
> Aha. 1qresult is set to -EIO at the beginning, and never changed because
> offset >= inode->i_size. Make it zero the page and return 0 in that situation.
>
> --
> dwmw2
>
> To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
> the body of a message to majordomo@xxxxxxx.com


To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com