15 Mar, 2011

2 commits

  • Before when creating a new inode, we'd set the sb->s_dirt flag,
    and sometime later the system would write out s_nextid as part
    of the sb_info. Also on inode sync we would force the sb sync
    as well.

    Define the s_nextid as a new partition attribute and set it
    every time we create a new object.
    At mount we read it from it's new place.

    We now never set sb->s_dirt anywhere in exofs. write_super
    is actually never called. The call to exofs_write_super from
    exofs_put_super is also removed because the VFS always calls
    ->sync_fs before calling ->put_super twice.

    To stay backward-and-forward compatible we also write the old
    s_nextid in the super_block object at unmount, and support zero
    length attribute on mount.

    This also fixes a BUG where in layouts when group_width was not
    a divisor of EXOFS_SUPER_ID (0x10000) the s_nextid was not read
    from the device it was written to. Because of the sliding window
    layout trick, and because the read was always done from the 0
    device but the write was done via the raid engine that might slide
    the device view. Now we read and write through the raid engine.

    Signed-off-by: Boaz Harrosh

    Boaz Harrosh
     
  • It is incorrect to test inode dirty bits without participating in the inode
    writeback protocol. Inode writeback sets I_SYNC and clears I_DIRTY_?, then
    writes out the particular bits, then clears I_SYNC when it is done. BTW. it
    may not completely write all pages out, so I_DIRTY_PAGES would get set
    again.

    This is a standard pattern used throughout the kernel's writeback caches
    (I_SYNC ~= I_WRITEBACK, if that makes it clearer).

    And so it is not possible to determine an inode's dirty status just by
    checking I_DIRTY bits. Especially not for the purpose of data integrity
    syncs.

    Missing the check for these bits means that fsync can complete while
    writeback to the inode is underway. Inode writeback functions get this
    right, so call into them rather than try to shortcut things by testing
    dirty state improperly.

    Signed-off-by: Nick Piggin
    Signed-off-by: Boaz Harrosh

    Nick Piggin
     

26 Oct, 2010

1 commit

  • Add a new helper to write out the inode using the writeback code,
    that is including the correct dirty bit and list manipulation. A few
    of filesystems already opencode this, and a lot of others should be
    using it instead of using write_inode_now which also writes out the
    data.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     

12 Aug, 2010

1 commit


10 Aug, 2010

1 commit

  • These changes are crafted based on the similar
    conversion done to ext2 by Nick Piggin.

    * Remove the deprecated ->truncate vector. Let exofs_setattr
    take care of on-disk size updates.
    * Call truncate_pagecache on the unused pages if
    write_begin/end fails.
    * Cleanup exofs_delete_inode that did stupid inode
    writes and updates on an inode that will be
    removed.
    * And finally get rid of exofs_get_block. We never
    had any blocks it was all for calling nobh_truncate_page.
    nobh_truncate_page is not actually needed in exofs since
    the last page is complete and gone, just like all the other
    pages. There is no partial blocks in exofs.

    I've tested with this patch, and there are no apparent
    failures, so far.

    CC: Nick Piggin
    CC: Christoph Hellwig
    Signed-off-by: Boaz Harrosh
    Signed-off-by: Al Viro

    Boaz Harrosh
     

04 Aug, 2010

1 commit

  • As per Christoph advise: no need to call filemap_write_and_wait().
    In exofs all metadata is at the inode so just writing the inode is
    all is needed. ->fsync implies this must be done synchronously.

    But now exofs_file_fsync can not be used by exofs_file_flush.
    vfs_fsync() should do that job correctly.

    FIXME: remove the sb_sync and fix that sb_update better.

    Signed-off-by: Boaz Harrosh

    Boaz Harrosh
     

28 May, 2010

1 commit


21 Jun, 2009

2 commits

  • The use of file_fsync() in exofs_file_sync() is not necessary since it
    does some extra stuff not used by exofs. Open code just the parts that
    are currently needed.

    TODO: Farther optimization can be done to sync the sb only on inode
    update of new files, Usually the sb update is not needed in exofs.

    Signed-off-by: Boaz Harrosh

    Boaz Harrosh
     
  • Boaz,
    Congrats on getting all the OSD stuff into 2.6.30!
    I just pulled the git, and saw that the IBM copyrights are still there.
    Please remove them from all files:
    * Copyright (C) 2005, 2006
    * International Business Machines

    IBM has revoked all rights on the code - they gave it to me.

    Thanks!
    Avishay

    Signed-off-by: Avishay Traeger
    Signed-off-by: Boaz Harrosh

    Boaz Harrosh
     

01 Apr, 2009

1 commit

  • implementation of the file_operations and inode_operations for
    regular data files.

    Most file_operations are generic vfs implementations except:
    - exofs_truncate will truncate the OSD object as well
    - Generic file_fsync is not good for none_bd devices so open code it
    - The default for .flush in Linux is todo nothing so call exofs_fsync
    on the file.

    Signed-off-by: Boaz Harrosh

    Boaz Harrosh