1. 01 11月, 2011 3 次提交
  2. 11 10月, 2011 3 次提交
  3. 06 10月, 2011 1 次提交
  4. 20 7月, 2011 1 次提交
  5. 28 5月, 2011 1 次提交
  6. 26 5月, 2011 2 次提交
  7. 24 3月, 2011 1 次提交
  8. 14 3月, 2011 1 次提交
  9. 10 3月, 2011 1 次提交
  10. 03 3月, 2011 1 次提交
  11. 23 2月, 2011 2 次提交
    • D
      UDF: Fix compiler warning · 6f644e5f
      Dirk Behme 提交于
      Fix compiler warning
      
      fs/udf/balloc.c: In function 'udf_bitmap_new_block':
      fs/udf/balloc.c:273: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer type
      fs/udf/balloc.c:285: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer type
      fs/udf/balloc.c:311: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer type
      fs/udf/balloc.c:325: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer type
      
      The main fix is to add a cast in ext2_find_next_bit().
      
      As all other usage locations of udf_find_next_one_bit()
      directly use bh->b_data (which is a char *), the useless
      (char *) cast in line 311 can be removed, too.
      Signed-off-by: NDirk Behme <dirk.behme@de.bosch.com>
      Signed-off-by: NGeorge G. Davis <gdavis@mvista.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      6f644e5f
    • J
      udf: Convert UDF to new truncate calling sequence · 7e49b6f2
      Jan Kara 提交于
      Use new truncation sequence in UDF and fix up error handling in the
      code.
      Signed-off-by: NJan Kara <jack@suse.cz>
      7e49b6f2
  12. 07 1月, 2011 17 次提交
    • N
      fs: icache RCU free inodes · fa0d7e3d
      Nick Piggin 提交于
      RCU free the struct inode. This will allow:
      
      - Subsequent store-free path walking patch. The inode must be consulted for
        permissions when walking, so an RCU inode reference is a must.
      - sb_inode_list_lock to be moved inside i_lock because sb list walkers who want
        to take i_lock no longer need to take sb_inode_list_lock to walk the list in
        the first place. This will simplify and optimize locking.
      - Could remove some nested trylock loops in dcache code
      - Could potentially simplify things a bit in VM land. Do not need to take the
        page lock to follow page->mapping.
      
      The downsides of this is the performance cost of using RCU. In a simple
      creat/unlink microbenchmark, performance drops by about 10% due to inability to
      reuse cache-hot slab objects. As iterations increase and RCU freeing starts
      kicking over, this increases to about 20%.
      
      In cases where inode lifetimes are longer (ie. many inodes may be allocated
      during the average life span of a single inode), a lot of this cache reuse is
      not applicable, so the regression caused by this patch is smaller.
      
      The cache-hot regression could largely be avoided by using SLAB_DESTROY_BY_RCU,
      however this adds some complexity to list walking and store-free path walking,
      so I prefer to implement this at a later date, if it is shown to be a win in
      real situations. I haven't found a regression in any non-micro benchmark so I
      doubt it will be a problem.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fa0d7e3d
    • J
      UDF: Close small mem leak in udf_find_entry() · a4264b3f
      Jesper Juhl 提交于
      Hi,
      
      There's a small memory leak in fs/udf/namei.c::udf_find_entry().
      
      We dynamically allocate memory for 'fname' with kmalloc() and in most
      situations we free it before we leave the function, but there is one
      situation where we do not (but should). This patch closes the leak by
      jumping to the 'out_ok' label which does the correct cleanup rather than
      doing half the cleanup and returning directly.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Signed-off-by: NJan Kara <jack@suse.cz>
      a4264b3f
    • J
      udf: Fix directory corruption after extent merging · 4651c590
      Jan Kara 提交于
      If udf_bread() called from udf_add_entry() managed to merge created extent to
      an already existing one (or if previous extents could be merged), the code
      truncating the last extent to proper size would just overwrite the freshly
      allocated extent with an extent that used to be in that place.  This obviously
      results in a directory corruption. Fix the problem by properly reloading the
      last extent.
      Signed-off-by: NJan Kara <jack@suse.cz>
      4651c590
    • J
      udf: Protect udf_file_aio_write from possible races · 8754a3f7
      Jan Kara 提交于
      Code doing conversion from INICB file to a normal file in udf_file_aio_write()
      is not protected by any lock from other code modifying the inode. Use
      i_alloc_sem for that.
      Reported-by: NAlessio Igor Bogani <abogani@texware.it>
      Signed-off-by: NJan Kara <jack@suse.cz>
      8754a3f7
    • A
      udf: Remove unnecessary bkl usages · 9db9f9e3
      Alessio Igor Bogani 提交于
      The udf_readdir(), udf_lookup(), udf_create(), udf_mknod(), udf_mkdir(),
      udf_rmdir(), udf_link(), udf_get_parent() and udf_unlink() seems already
      adequately protected by i_mutex held by VFS invoking calls. The udf_rename()
      instead should be already protected by lock_rename again by VFS. The
      udf_ioctl(), udf_fill_super() and udf_evict_inode() don't requires any further
      protection.
      
      This work was supported by a hardware donation from the CE Linux Forum.
      Signed-off-by: NAlessio Igor Bogani <abogani@texware.it>
      Signed-off-by: NJan Kara <jack@suse.cz>
      9db9f9e3
    • A
      udf: Use of s_alloc_mutex to serialize udf_relocate_blocks() execution · 7db09be6
      Alessio Igor Bogani 提交于
      This work was supported by a hardware donation from the CE Linux Forum.
      Signed-off-by: NAlessio Igor Bogani <abogani@texware.it>
      Signed-off-by: NJan Kara <jack@suse.cz>
      7db09be6
    • A
      udf: Replace bkl with the UDF_I(inode)->i_data_sem for protect udf_inode_info struct · 4d0fb621
      Alessio Igor Bogani 提交于
      Replace bkl with the UDF_I(inode)->i_data_sem rw semaphore in
      udf_release_file(), udf_symlink(), udf_symlink_filler(), udf_get_block(),
      udf_block_map(), and udf_setattr(). The rule now is that any operation
      on regular file's or symlink's extents (or generally allocation information
      including goal block) needs to hold i_data_sem.
      
      This work was supported by a hardware donation from the CE Linux Forum.
      Signed-off-by: NAlessio Igor Bogani <abogani@texware.it>
      Signed-off-by: NJan Kara <jack@suse.cz>
      4d0fb621
    • J
      udf: Remove BKL from free space counting functions · d1668fe3
      Jan Kara 提交于
      udf_count_free_bitmap() does not need BKL because bitmaps are in a fixed
      place on disk and so we can count set bits without serialization.
      udf_count_free_table() is now protected by s_alloc_mutex instead of BKL
      to get a consistent view of free space extents.
      Signed-off-by: NJan Kara <jack@suse.cz>
      d1668fe3
    • J
      udf: Call udf_add_free_space() for more blocks at once in udf_free_blocks() · 7abc2e45
      Jan Kara 提交于
      There's no need to call udf_add_free_space() for one block at a time. It saves
      us noticeable amount of work and yields different result from the original
      code only if the filesystem is corrupted and bitmap bit is already cleared.
      In such case counter of free blocks is probably wrong anyways so the change
      does not matter.
      Signed-off-by: NJan Kara <jack@suse.cz>
      7abc2e45
    • J
      udf: Remove BKL from udf_put_super() and udf_remount_fs() · 0484b1ce
      Jan Kara 提交于
      udf_put_super() does not need BKL because the filesystem is shut down so
      there's nothing to race with. The credential changes in udf_remount_fs()
      and LVID changes are now protected by dedicated locks so we can remove BKL
      from this function as well.
      Signed-off-by: NJan Kara <jack@suse.cz>
      0484b1ce
    • J
      udf: Protect default inode credentials by rwlock · c03cad24
      Jan Kara 提交于
      Superblock carries credentials (uid, gid, etc.) which are used as default
      values in __udf_read_inode() when media does not provide these. These
      credentials can change during remount so we protect them by a rwlock so that
      each inode gets a consistent set of credentials.
      Signed-off-by: NJan Kara <jack@suse.cz>
      c03cad24
    • J
      udf: Protect all modifications of LVID with s_alloc_mutex · 949f4a7c
      Jan Kara 提交于
      udf_open_lvid() and udf_close_lvid() were modifying LVID without
      s_alloc_mutex. Since they can be called from remount, the modification
      could race with other filesystem modifications of LVID so protect them
      by s_alloc_mutex just to be sure.
      Signed-off-by: NJan Kara <jack@suse.cz>
      949f4a7c
    • J
      udf: Move handling of uniqueID into a helper function and protect it by a s_alloc_mutex · d664b6af
      Jan Kara 提交于
      uniqueID handling has been duplicated in three places. Move it into a common
      helper. Since we modify an LVID buffer with uniqueID update, we take
      sbi->s_alloc_mutex to protect agaist other modifications of the structure.
      Signed-off-by: NJan Kara <jack@suse.cz>
      d664b6af
    • J
      udf: Remove BKL from udf_update_inode · 49521de1
      Jan Kara 提交于
      udf_update_inode() does not need BKL since on-disk inode modifications are
      protected by the buffer lock and reading of values of in-memory inode is
      safe without any lock. In some cases we can write inconsistent inode state
      to disk but in that case inode will be marked dirty and overwritten later.
      
      Also make unnecessarily global udf_sync_inode() static.
      Signed-off-by: NJan Kara <jack@suse.cz>
      49521de1
    • J
      udf: Convert UDF_SB(sb)->s_flags to use bitops · f2a6cc1f
      Jan Kara 提交于
      Use atomic bitops to manipulate with sb flags to make manipulation safe
      without any locking.
      Signed-off-by: NJan Kara <jack@suse.cz>
      f2a6cc1f
    • J
      fs/udf: Add printf format/argument verification · fab3c858
      Joe Perches 提交于
      Add __attribute__((format... to udf_warning.
      
      All arguments matched formats, no other changes necessary.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      fab3c858
    • J
      fs/udf: Use vzalloc · ed2ae6f6
      Joe Perches 提交于
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      ed2ae6f6
  13. 29 10月, 2010 1 次提交
  14. 26 10月, 2010 1 次提交
  15. 21 10月, 2010 1 次提交
    • A
      BKL: introduce CONFIG_BKL. · 6de5bd12
      Arnd Bergmann 提交于
      With all the patches we have queued in the BKL removal tree, only a
      few dozen modules are left that actually rely on the BKL, and even
      there are lots of low-hanging fruit. We need to decide what to do
      about them, this patch illustrates one of the options:
      
      Every user of the BKL is marked as 'depends on BKL' in Kconfig,
      and the CONFIG_BKL becomes a user-visible option. If it gets
      disabled, no BKL using module can be built any more and the BKL
      code itself is compiled out.
      
      The one exception is file locking, which is practically always
      enabled and does a 'select BKL' instead. This effectively forces
      CONFIG_BKL to be enabled until we have solved the fs/lockd
      mess and can apply the patch that removes the BKL from fs/locks.c.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      6de5bd12
  16. 05 10月, 2010 1 次提交
    • J
      BKL: Explicitly add BKL around get_sb/fill_super · db719222
      Jan Blunck 提交于
      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: NJan Blunck <jblunck@infradead.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: Christoph Hellwig <hch@infradead.org>
      db719222
  17. 10 8月, 2010 2 次提交
    • A
      switch udf to ->evict_inode() · 3aac2b62
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      3aac2b62
    • C
      remove inode_setattr · 1025774c
      Christoph Hellwig 提交于
      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: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      1025774c