1. 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
  2. 08 7月, 2011 1 次提交
    • A
      UBIFS: fix master node recovery · 19495f70
      Anatolij Gustschin 提交于
      When the 1st LEB was unmapped and written but 2nd LEB not,
      the master node recovery doesn't succeed after power cut.
      We see following error when mounting UBIFS partition on NOR
      flash:
      
      UBIFS error (pid 1137): ubifs_recover_master_node: failed to recover master node
      
      Correct 2nd master node offset check is needed to fix the
      problem. If the 2nd master node is at the end in the 2nd LEB,
      first master node is used for recovery. When checking for this
      condition we should check whether the master node is exactly at
      the end of the LEB (without remaining empty space) or whether
      it is followed by an empty space less than the master node size.
      
      Artem: when the error happened, offs2 = 261120, sz = 512, c->leb_size = 262016.
      Signed-off-by: NAnatolij Gustschin <agust@denx.de>
      Signed-off-by: NArtem Bityutskiy <dedekind1@gmail.com>
      19495f70
  3. 04 7月, 2011 30 次提交
  4. 20 6月, 2011 1 次提交
  5. 13 6月, 2011 2 次提交
    • A
      ubifs: fix sget races · d251ed27
      Al Viro 提交于
      * allocate ubifs_info in ->mount(), fill it enough for sb_test() and
      set ->s_fs_info to it in set() callback passed to sget().
      * do *not* free it in ->put_super(); do that in ->kill_sb() after we'd
      done kill_anon_super().
      * don't free it in ubifs_fill_super() either - deactivate_locked_super()
      done by caller when ubifs_fill_super() returns an error will take care
      of that sucker.
      * get rid of kludge with passing ubi to ubifs_fill_super() in ->s_fs_info;
      we only need it in alloc_ubifs_info(), so ubifs_fill_super() will need
      only ubifs_info.  Which it will find in ->s_fs_info just fine, no need to
      reassign anything...
      
      As the result, sb_test() becomes safe to apply to all superblocks that
      can be found by sget() (and a kludge with temporary use of ->s_fs_info
      to store a pointer to very different structure goes away).
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      d251ed27
    • A
      ubifs: split allocation of ubifs_info into a separate function · b1c27ab3
      Al Viro 提交于
      preparation to ubifs sget() race fixes
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      b1c27ab3
  6. 03 6月, 2011 5 次提交