This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How can hole node come into being? -- JFFS2


Hi all,
    A problem has botherd me a long time. Anyone can
help me?

    The whole jffs2 fs has hole node management as an
integrity part. But in write operation, it seemed that
the impossiblity to form a hole node has been
eliminated.

/*------------------------------------------*/

FILE <jffs2.c>
FUNC jffs2_fo_write
    ... ...
    if( pos < 0 || pos > node->i_size )
        return EINVAL;
    ... ...

FILE <file-ecos.c>
FUNC jffs2_prepare_write
    ... ...
    if (pageofs > inode->i_size) {
    // Here make a new hole node for cross a page
    }
    ... ...

Also, after every write node operation, file offset
and inode i_size are advanced the real write length
without pad to PAGE.

/*------------------------------------------*/

Thanks in advance!

Guximei

_________________________________________________________
Do You Yahoo!? 
"您想享受2-7折星级酒店价格吗?"
http://cn.travel.yahoo.com/

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]