Hi Greg,

Greg Ungerer wrote:
Hi Matt,

Matt Waddel wrote:
..
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

...
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+offs
et, 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?

The fs/romfs/inode.c code only changed slightly from 2.6.22 to 2.6.23.
However, mm/filemap.c changed quite a bit during this time and this is
where I think the problem originates.

Regards,
Matt

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

_______________________________________________
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

Reply via email to