lkml.org 
[lkml]   [2001]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] fs/super.c stuff (3/10)
    diff -urN S6-pre2-s_active/fs/block_dev.c S6-pre2-fsync_no_super/fs/block_dev.c
    --- S6-pre2-s_active/fs/block_dev.c Fri Jun 8 18:29:02 2001
    +++ S6-pre2-fsync_no_super/fs/block_dev.c Sun Jun 10 12:13:03 2001
    @@ -678,8 +678,10 @@
    down(&bdev->bd_sem);
    /* syncing will go here */
    lock_kernel();
    - if (kind == BDEV_FILE || kind == BDEV_FS)
    + if (kind == BDEV_FILE)
    fsync_dev(rdev);
    + else if (kind == BDEV_FS)
    + fsync_no_super(rdev);
    if (atomic_dec_and_test(&bdev->bd_openers)) {
    /* invalidating buffers will go here */
    invalidate_buffers(rdev);
    diff -urN S6-pre2-s_active/fs/buffer.c S6-pre2-fsync_no_super/fs/buffer.c
    --- S6-pre2-s_active/fs/buffer.c Fri Jun 8 18:29:03 2001
    +++ S6-pre2-fsync_no_super/fs/buffer.c Sun Jun 10 12:13:03 2001
    @@ -318,6 +318,12 @@
    return sync_buffers(dev, 1);
    }

    +int fsync_no_super(kdev_t dev)
    +{
    + sync_buffers(dev, 0);
    + return sync_buffers(dev, 1);
    +}
    +
    int fsync_dev(kdev_t dev)
    {
    sync_buffers(dev, 0);
    diff -urN S6-pre2-s_active/fs/super.c S6-pre2-fsync_no_super/fs/super.c
    --- S6-pre2-s_active/fs/super.c Sun Jun 10 12:07:40 2001
    +++ S6-pre2-fsync_no_super/fs/super.c Sun Jun 10 12:13:04 2001
    @@ -971,12 +971,12 @@
    sb->s_type = NULL;
    unlock_super(sb);
    unlock_kernel();
    - up_write(&sb->s_umount);
    if (bdev) {
    blkdev_put(bdev, BDEV_FS);
    bdput(bdev);
    } else
    put_unnamed_dev(dev);
    + up_write(&sb->s_umount);
    }

    /*
    diff -urN S6-pre2-s_active/include/linux/fs.h S6-pre2-fsync_no_super/include/linux/fs.h
    --- S6-pre2-s_active/include/linux/fs.h Sun Jun 10 11:58:01 2001
    +++ S6-pre2-fsync_no_super/include/linux/fs.h Sun Jun 10 12:13:04 2001
    @@ -1122,6 +1122,7 @@
    extern void sync_dev(kdev_t);
    extern int fsync_dev(kdev_t);
    extern int fsync_super(struct super_block *);
    +extern int fsync_no_super(kdev_t);
    extern void sync_inodes_sb(struct super_block *);
    extern int fsync_inode_buffers(struct inode *);
    extern int osync_inode_buffers(struct inode *);

    -
    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 12:55    [W:0.021 / U:30.368 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site