[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?




vmalik@xxxxxxx.com said:
> You mean like thus? Seems to work.
> Vipin 

Cool. Now it works but I don't like it. There are still error cases where it
doesn't zero the rest of the page. 

We could clean it up a little by doing the "if(read_len < PAGE_SIZE) memset"
bit outside the if(offset < i_size) statement. 

 read_len = 0;
 if (offset < inode->i_size) {
	r = jffs_read_data();
 	if (r != read_len) {
		err = -EIO;
	}
 }
 if (read_len < PAGE_CACHE_SIZE)
	memset();

 if (err)
	SetPageError(page)
 else
	SetPageUptodate(page);

 /* rest of cleanup */
 return err;
	
	
--
dwmw2



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