[lkml]   [2009]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[patch 04/30] nilfs2: fix missing zero-fill initialization of btree node cache
    2.6.30-stable review patch.  If anyone has any objections, please let us know.

    From: Ryusuke Konishi <>

    commit 1f28fcd925b2b3157411bbd08f0024b55b70d8dd upstream.

    This will fix file system corruption which infrequently happens after
    mount. The problem was reported from users with the title "[NILFS
    users] Fail to mount NILFS." (Message-ID:
    <>), and so forth. I've also
    experienced the corruption multiple times on kernel 2.6.30 and 2.6.31.

    The problem turned out to be caused due to discordance between
    mapping->nrpages of a btree node cache and the actual number of pages
    hung on the cache; if the mapping->nrpages becomes zero even as it has
    pages, truncate_inode_pages() returns without doing anything. Usually
    this is harmless except it may cause page leak, but garbage collection
    fairly infrequently sees a stale page remained in the btree node cache
    of DAT (i.e. disk address translation file of nilfs), and induces the

    I identified a missing initialization in btree node caches was the
    root cause. This corrects the bug.

    I've tested this for kernel 2.6.30 and 2.6.31.

    Reported-by: Yuri Chislov <>
    Signed-off-by: Ryusuke Konishi <>
    Signed-off-by: Greg Kroah-Hartman <>

    fs/nilfs2/btnode.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/fs/nilfs2/btnode.c
    +++ b/fs/nilfs2/btnode.c
    @@ -36,6 +36,7 @@

    void nilfs_btnode_cache_init_once(struct address_space *btnc)
    + memset(btnc, 0, sizeof(*btnc));
    INIT_RADIX_TREE(&btnc->page_tree, GFP_ATOMIC);

     \ /
      Last update: 2009-10-02 01:45    [W:0.038 / U:0.892 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site