Hi Matt, Matt Waddel wrote:
I've been working on the m68knommu port of the 2.6.23 kernel and have found a problem that wasn't in the 2.6.22 release.When I copy a 0 length file from a read-only filesystem I get the following warning: # cp exports /tmp cp: Read error: Input/output error This is really only a warning because the file is copied correctly. Also, when I copy a file with data or copy a 0 length file within a writable fs it passes. I've traced the source of the error message to romfs_readpage() in fs/romfs/inode.c. The "if (offset < i_size_read(inode))" check fails and returns the "return -EIO" which causes the message above. As far as I can tell the sequence seems to start falling off the tracks in mm/filemap.c. The do_generic_mapping_read() routine has this test that fails: ... if (!PageUptodate(page)) goto page_not_up_to_date; ... If I change the romfs_readpage() with the following patch it fixes the problem, but this seems more like a "fixing the symptom" solution. diff --git a/fs/romfs/inode.c b/fs/romfs/inode.c index dae7945..ed04d73 100644 --- a/fs/romfs/inode.c +++ b/fs/romfs/inode.c @@ -430,7 +430,7 @@ romfs_readpage(struct file *file, struct page * page) /* 32 bit warning -- but not for us :) */ offset = page_offset(page); - if (offset < i_size_read(inode)) { + if (offset <= i_size_read(inode)) { avail = inode->i_size-offset; readlen = min_t(unsigned long, avail, PAGE_SIZE);if (romfs_copyfrom(inode, buf, ROMFS_I(inode)->i_dataoffset+offset, readlen) == readlen) { Any ideas on what's changed recently with romfs files? Any clues would be appreciated.
I wasn't aware of the romfs code changing for 2.6.23. If you diff to 2.6.22 what do you see? Regards Greg ------------------------------------------------------------------------ Greg Ungerer -- Chief Software Dude EMAIL: [EMAIL PROTECTED] Secure Computing Corporation PHONE: +61 7 3435 2888 825 Stanley St, FAX: +61 7 3891 3630 Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com _______________________________________________ uClinux-dev mailing list [email protected] http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by [email protected] To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
