1. 01 8月, 2013 1 次提交
    • J
      udf: Standardize return values in mount sequence · d759bfa4
      Jan Kara 提交于
      Change all function used in filesystem discovery during mount to user
      standard kernel return values - -errno on error, 0 on success instead
      of 1 on failure and 0 on success. This allows us to pass error number
      (not just failure / success) so we can abort device scanning earlier
      in case of errors like EIO or ENOMEM . Also we will be able to return
      EROFS in case writeable mount is requested but writing isn't supported.
      Signed-off-by: NJan Kara <jack@suse.cz>
      d759bfa4
  2. 11 3月, 2013 1 次提交
  3. 06 2月, 2013 2 次提交
  4. 22 1月, 2013 1 次提交
    • N
      udf: add extent cache support in case of file reading · 99600051
      Namjae Jeon 提交于
      This patch implements extent caching in case of file reading.
      While reading a file, currently, UDF reads metadata serially
      which takes a lot of time depending on the number of extents present
      in the file. Caching last accessd extent improves metadata read time.
      Instead of reading file metadata from start, now we read from
      the cached extent.
      
      This patch considerably improves the time spent by CPU in kernel mode.
      For example, while reading a 10.9 GB file using dd:
      Time before applying patch:
      11677022208 bytes (10.9GB) copied, 1529.748921 seconds, 7.3MB/s
      real    25m 29.85s
      user    0m 12.41s
      sys     15m 34.75s
      
      Time after applying patch:
      11677022208 bytes (10.9GB) copied, 1469.338231 seconds, 7.6MB/s
      real    24m 29.44s
      user    0m 15.73s
      sys     3m 27.61s
      
      [JK: Fix bh refcounting issues, simplify initialization]
      Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com>
      Signed-off-by: NAshish Sangwan <a.sangwan@samsung.com>
      Signed-off-by: NBonggil Bak <bgbak@samsung.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      99600051
  5. 21 1月, 2013 1 次提交
  6. 15 1月, 2013 1 次提交
  7. 03 10月, 2012 1 次提交
  8. 21 9月, 2012 1 次提交
  9. 15 8月, 2012 2 次提交
  10. 11 7月, 2012 1 次提交
  11. 09 7月, 2012 2 次提交
  12. 29 6月, 2012 3 次提交
  13. 21 3月, 2012 2 次提交
  14. 01 3月, 2012 1 次提交
  15. 09 1月, 2012 1 次提交
  16. 07 1月, 2012 1 次提交
  17. 04 1月, 2012 2 次提交
    • A
      udf: propagate umode_t · faa17292
      Al Viro 提交于
      note re mount options: fmask and dmask are explicitly truncated to 12bit,
      UDF_INVALID_MODE just needs to be guaranteed to differ from any such value.
      And umask is used only in &= with umode_t, so we ignore other bits anyway.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      faa17292
    • A
      vfs: fix the stupidity with i_dentry in inode destructors · 6b520e05
      Al Viro 提交于
      Seeing that just about every destructor got that INIT_LIST_HEAD() copied into
      it, there is no point whatsoever keeping this INIT_LIST_HEAD in inode_init_once();
      the cost of taking it into inode_init_always() will be negligible for pipes
      and sockets and negative for everything else.  Not to mention the removal of
      boilerplate code from ->destroy_inode() instances...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6b520e05
  18. 01 11月, 2011 5 次提交
  19. 11 10月, 2011 3 次提交
  20. 07 1月, 2011 8 次提交
    • 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
    • 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: 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: 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