1. 07 5月, 2014 1 次提交
  2. 21 7月, 2011 1 次提交
    • J
      fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers · 02c24a82
      Josef Bacik 提交于
      Btrfs needs to be able to control how filemap_write_and_wait_range() is called
      in fsync to make it less of a painful operation, so push down taking i_mutex and
      the calling of filemap_write_and_wait() down into the ->fsync() handlers.  Some
      file systems can drop taking the i_mutex altogether it seems, like ext3 and
      ocfs2.  For correctness sake I just pushed everything down in all cases to make
      sure that we keep the current behavior the same for everybody, and then each
      individual fs maintainer can make up their mind about what to do from there.
      Thanks,
      Acked-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NJosef Bacik <josef@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      02c24a82
  3. 15 3月, 2011 2 次提交
    • B
      exofs: Write sbi->s_nextid as part of the Create command · 1cea312a
      Boaz Harrosh 提交于
      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: NBoaz Harrosh <bharrosh@panasas.com>
      1cea312a
    • N
      exofs: simple fsync race fix · 97178b7b
      Nick Piggin 提交于
      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: NNick Piggin <npiggin@kernel.dk>
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      97178b7b
  4. 26 10月, 2010 1 次提交
  5. 10 8月, 2010 1 次提交
    • B
      exofs: New truncate sequence · 2f246fd0
      Boaz Harrosh 提交于
      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 <npiggin@suse.de>
      CC: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      2f246fd0
  6. 04 8月, 2010 1 次提交
    • B
      exofs: exofs_file_fsync and exofs_file_flush correctness · b2848349
      Boaz Harrosh 提交于
      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: NBoaz Harrosh <bharrosh@panasas.com>
      b2848349
  7. 28 5月, 2010 1 次提交
  8. 21 6月, 2009 2 次提交
    • B
      exofs: Avoid using file_fsync() · baaf94cd
      Boaz Harrosh 提交于
      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: NBoaz Harrosh <bharrosh@panasas.com>
      baaf94cd
    • B
      exofs: Remove IBM copyrights · 27d2e149
      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: NAvishay Traeger <avishay@gmail.com>
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      27d2e149
  9. 01 4月, 2009 1 次提交
    • B
      exofs: file and file_inode operations · e8062719
      Boaz Harrosh 提交于
      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: NBoaz Harrosh <bharrosh@panasas.com>
      e8062719