lkml.org 
[lkml]   [2005]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 27/29] FAT: Use synchronous update for {vfat,msdos}_add_entry()
    From
    Date

    Use the synchronous updates, in order to guarantee that the writing to
    a disk is completeing when a system call returns.

    Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
    ---

    fs/msdos/namei.c | 5 ++++-
    fs/vfat/namei.c | 5 ++++-
    2 files changed, 8 insertions(+), 2 deletions(-)

    diff -puN fs/msdos/namei.c~sync08-fat_tweak7 fs/msdos/namei.c
    --- linux-2.6.11/fs/msdos/namei.c~sync08-fat_tweak7 2005-03-06 02:37:29.000000000 +0900
    +++ linux-2.6.11-hirofumi/fs/msdos/namei.c 2005-03-06 02:37:29.000000000 +0900
    @@ -278,7 +278,10 @@ static int msdos_add_entry(struct inode
    return err;

    dir->i_ctime = dir->i_mtime = *ts;
    - mark_inode_dirty(dir);
    + if (IS_DIRSYNC(dir))
    + (void)fat_sync_inode(dir);
    + else
    + mark_inode_dirty(dir);

    return 0;
    }
    diff -puN fs/vfat/namei.c~sync08-fat_tweak7 fs/vfat/namei.c
    --- linux-2.6.11/fs/vfat/namei.c~sync08-fat_tweak7 2005-03-06 02:37:29.000000000 +0900
    +++ linux-2.6.11-hirofumi/fs/vfat/namei.c 2005-03-06 02:37:29.000000000 +0900
    @@ -684,7 +684,10 @@ static int vfat_add_entry(struct inode *

    /* update timestamp */
    dir->i_ctime = dir->i_mtime = dir->i_atime = *ts;
    - mark_inode_dirty(dir);
    + if (IS_DIRSYNC(dir))
    + (void)fat_sync_inode(dir);
    + else
    + mark_inode_dirty(dir);
    cleanup:
    kfree(slots);
    return err;
    _
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-03-22 14:10    [W:0.020 / U:0.316 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site