1. 27 Oct, 2010 8 commits
  2. 25 Oct, 2010 2 commits
  3. 05 Oct, 2010 1 commit
    • Jan Kara's avatar
      ext3: Fix lost extented attributes for inode with ino == 11 · beb37b85
      Jan Kara authored
      
      If a filesystem has inode size > 128 and someone deletes lost+found and
      reuses inode 11 for some other file, extented attributes set for this
      inode before umount will get lost after remounting the filesystem. This
      is because extended attributes will get stored in an inode but ext3_iget
      will ignore them due to workaround of a bug in an old mkfs.
      
      Fix the problem by initializing i_extra_isize to 0 for freshly allocated
      inodes where mkfs workaround in ext3_iget applies. This way these inodes
      will always store extended attributes in a special block and no problems
      occur.
      
      The bug was spotted and a reproduction test provided by:
        Masayoshi MIZUMA <m.mizuma@jp.fujitsu.com>
      Reviewed-by: default avatarAndreas Dilger <adilger.kernel@dilger.ca>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      beb37b85
  4. 04 Oct, 2010 3 commits
    • Jan Blunck's avatar
      BKL: Remove BKL from ext3_put_super() and ext3_remount() · 77b54a46
      Jan Blunck authored
      
      The BKL lock is protecting the remounting against a potential call to
      ext3_put_super(). This could not happen, since this is protected by the
      s_umount rw semaphore of struct super_block.
      
      Therefore I think the BKL is protecting nothing here.
      Signed-off-by: default avatarJan Blunck <jblunck@infradead.org>
      Acked-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      77b54a46
    • Jan Blunck's avatar
      BKL: Remove BKL from ext3 fill_super() · d646cf82
      Jan Blunck authored
      
      The BKL is protecting nothing than two memory allocations here.
      Signed-off-by: default avatarJan Blunck <jblunck@infradead.org>
      Acked-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      d646cf82
    • Jan Blunck's avatar
      BKL: Explicitly add BKL around get_sb/fill_super · db719222
      Jan Blunck authored
      
      This patch is a preparation necessary to remove the BKL from do_new_mount().
      It explicitly adds calls to lock_kernel()/unlock_kernel() around
      get_sb/fill_super operations for filesystems that still uses the BKL.
      
      I've read through all the code formerly covered by the BKL inside
      do_kern_mount() and have satisfied myself that it doesn't need the BKL
      any more.
      
      do_kern_mount() is already called without the BKL when mounting the rootfs
      and in nfsctl. do_kern_mount() calls vfs_kern_mount(), which is called
      from various places without BKL: simple_pin_fs(), nfs_do_clone_mount()
      through nfs_follow_mountpoint(), afs_mntpt_do_automount() through
      afs_mntpt_follow_link(). Both later functions are actually the filesystems
      follow_link inode operation. vfs_kern_mount() is calling the specified
      get_sb function and lets the filesystem do its job by calling the given
      fill_super function.
      
      Therefore I think it is safe to push down the BKL from the VFS to the
      low-level filesystems get_sb/fill_super operation.
      
      [arnd: do not add the BKL to those file systems that already
             don't use it elsewhere]
      Signed-off-by: default avatarJan Blunck <jblunck@infradead.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: Christoph Hellwig <hch@infradead.org>
      db719222
  5. 16 Sep, 2010 1 commit
    • Christoph Hellwig's avatar
      block: remove BLKDEV_IFL_WAIT · dd3932ed
      Christoph Hellwig authored
      
      All the blkdev_issue_* helpers can only sanely be used for synchronous
      caller.  To issue cache flushes or barriers asynchronously the caller needs
      to set up a bio by itself with a completion callback to move the asynchronous
      state machine ahead.  So drop the BLKDEV_IFL_WAIT flag that is always
      specified when calling blkdev_issue_* and also remove the now unused flags
      argument to blkdev_issue_flush and blkdev_issue_zeroout.  For
      blkdev_issue_discard we need to keep it for the secure discard flag, which
      gains a more descriptive name and loses the bitops vs flag confusion.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      dd3932ed
  6. 10 Sep, 2010 1 commit
  7. 09 Aug, 2010 5 commits
    • Andreas Gruenbacher's avatar
      mbcache: Remove unused features · 2aec7c52
      Andreas Gruenbacher authored
      
      The mbcache code was written to support a variable number of indexes,
      but all the existing users use exactly one index.  Simplify to code to
      support only that case.
      
      There are also no users of the cache entry free operation, and none of
      the users keep extra data in cache entries.  Remove those features as
      well.
      Signed-off-by: default avatarAndreas Gruenbacher <agruen@suse.de>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      2aec7c52
    • Al Viro's avatar
      convert ext3 to ->evict_inode() · ac14a95b
      Al Viro authored
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      ac14a95b
    • Christoph Hellwig's avatar
      remove inode_setattr · 1025774c
      Christoph Hellwig authored
      
      Replace inode_setattr with opencoded variants of it in all callers.  This
      moves the remaining call to vmtruncate into the filesystem methods where it
      can be replaced with the proper truncate sequence.
      
      In a few cases it was obvious that we would never end up calling vmtruncate
      so it was left out in the opencoded variant:
      
       spufs: explicitly checks for ATTR_SIZE earlier
       btrfs,hugetlbfs,logfs,dlmfs: explicitly clears ATTR_SIZE earlier
       ufs: contains an opencoded simple_seattr + truncate that sets the filesize just above
      
      In addition to that ncpfs called inode_setattr with handcrafted iattrs,
      which allowed to trim down the opencoded variant.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      1025774c
    • Christoph Hellwig's avatar
      introduce __block_write_begin · 6e1db88d
      Christoph Hellwig authored
      
      Split up the block_write_begin implementation - __block_write_begin is a new
      trivial wrapper for block_prepare_write that always takes an already
      allocated page and can be either called from block_write_begin or filesystem
      code that already has a page allocated.  Remove the handling of already
      allocated pages from block_write_begin after switching all callers that
      do it to __block_write_begin.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      6e1db88d
    • Christoph Hellwig's avatar
      sort out blockdev_direct_IO variants · eafdc7d1
      Christoph Hellwig authored
      
      Move the call to vmtruncate to get rid of accessive blocks to the callers
      in prepearation of the new truncate calling sequence.  This was only done
      for DIO_LOCKING filesystems, so the __blockdev_direct_IO_newtrunc variant
      was not needed anyway.  Get rid of blockdev_direct_IO_no_locking and
      its _newtrunc variant while at it as just opencoding the two additional
      paramters is shorted than the name suffix.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      eafdc7d1
  8. 05 Aug, 2010 1 commit
    • Jan Kara's avatar
      ext3: Fix dirtying of journalled buffers in data=journal mode · 5f11e6a4
      Jan Kara authored
      
      In data=journal mode, we still use block_write_begin() to prepare page for
      writing. This function can occasionally mark buffer dirty which violates
      journalling assumptions - when a buffer is part of a transaction, it should be
      dirty and a buffer can be already part of a forget list of some transaction
      when block_write_begin() gets called. This violation of journalling assumptions
      then results in "JBD: Spotted dirty metadata buffer..." warnings.
      
      In fact, temporary dirtying the buffer while the page is still locked does not
      really cause problems to the journalling because we won't write the buffer
      until the page gets unlocked. So we just have to make sure to clear dirty bits
      before unlocking the page.
      Reviewed-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      5f11e6a4
  9. 23 Jul, 2010 1 commit
    • Dave Chinner's avatar
      ext3: default to ordered mode · aa32a796
      Dave Chinner authored
      
      data=writeback mode is dangerous as it leads to higher data loss and stale data
      exposure when systems crash. It should not be the default, especially when all
      major distros ensure their ext3 filesystems default to ordered mode. Change the
      default mode to the safer data=ordered mode, because we should be caring far
      more about avoiding stale data exposure than performance.
      
      CC: linux-ext4@vger.kernel.org
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      Acked-by: default avatarEric Sandeen <sandeen@redhat.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      aa32a796
  10. 21 Jul, 2010 3 commits
  11. 24 Jun, 2010 1 commit
  12. 27 May, 2010 2 commits
  13. 24 May, 2010 5 commits
  14. 21 May, 2010 6 commits