1. 08 5月, 2013 1 次提交
  2. 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
  3. 13 12月, 2012 3 次提交
  4. 21 9月, 2012 1 次提交
  5. 06 9月, 2012 1 次提交
    • I
      UDF: Add support for O_DIRECT · 5eec54fc
      Ian Abbott 提交于
      Add support for the O_DIRECT flag.  There are two cases to deal with:
      
      1. Small files stored in the ICB (inode control block?): just return 0
      from the new udf_adinicb_direct_IO() handler to fall back to buffered
      I/O.
      
      2. Larger files, not stored in the ICB: nothing special here.  Just call
      blockdev_direct_IO() from our new udf_direct_IO() handler and tidy up
      any blocks instantiated outside i_size on error.  This is pretty
      standard.  Factor error handling code out of udf_write_begin() into new
      function udf_write_failed() so it can also be called by udf_direct_IO().
      
      Also change the whitespace in udf_aops to make it a bit neater.
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: NJan Kara <jack@suse.cz>
      5eec54fc
  6. 04 9月, 2012 1 次提交
    • N
      udf: add writepages support for udf · 378b8e1a
      Namjae Jeon 提交于
      Use mpage_writepages() instead of multiple calls to udf_writepage()
      to make performance higher.
      
      *Write Speed with writepage() =
       RecSize     ReadSpeed    WriteSpeed  RanReadSpeed RanWriteSpeed
      10485760    0.00MB/sec    8.56MB/sec    0.00MB/sec    8.20MB/sec
       1048576    0.00MB/sec    8.57MB/sec    0.00MB/sec    6.42MB/sec
        524288    0.00MB/sec    8.59MB/sec    0.00MB/sec    5.24MB/sec
        262144    0.00MB/sec    8.59MB/sec    0.00MB/sec    4.17MB/sec
        131072    0.00MB/sec    8.53MB/sec    0.00MB/sec    3.32MB/sec
         65536    0.00MB/sec    8.49MB/sec    0.00MB/sec    2.31MB/sec
      
      *Write Speed with writepages()
      RecSize     ReadSpeed    WriteSpeed  RanReadSpeed RanWriteSpeed
      10485760    0.00MB/sec    9.88MB/sec    0.00MB/sec    9.60MB/sec
       1048576    0.00MB/sec    9.95MB/sec    0.00MB/sec    7.52MB/sec
        524288    0.00MB/sec    9.98MB/sec    0.00MB/sec    6.16MB/sec
        262144    0.00MB/sec    9.90MB/sec    0.00MB/sec    4.98MB/sec
        131072    0.00MB/sec    9.89MB/sec    0.00MB/sec    3.78MB/sec
         65536    0.00MB/sec    9.81MB/sec    0.00MB/sec    2.50MB/sec
      
      There is about 1.4MB/sec speed improvement over 8.5MB/sec,
      which comes out around 16% improvement.
      Signed-off-by: NNamjae Jeon <linkinjeon@gmail.com>
      Signed-off-by: NAshish Sangwan <ashish.sangwan2@gmail.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      378b8e1a
  7. 15 8月, 2012 1 次提交
  8. 09 7月, 2012 1 次提交
  9. 06 5月, 2012 1 次提交
  10. 01 3月, 2012 2 次提交
  11. 09 1月, 2012 2 次提交
  12. 04 1月, 2012 1 次提交
    • 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
  13. 02 11月, 2011 1 次提交
  14. 01 11月, 2011 2 次提交
  15. 06 10月, 2011 1 次提交
  16. 10 3月, 2011 1 次提交
  17. 23 2月, 2011 1 次提交
  18. 07 1月, 2011 4 次提交
    • 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: 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: 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
  19. 10 8月, 2010 2 次提交
  20. 24 5月, 2010 1 次提交
    • J
      udf: Remove dead quota code · 36350462
      Jan Kara 提交于
      Quota on UDF is non-functional at least since 2.6.16 (I'm too lazy to
      do more archeology) because it does not provide .quota_write and .quota_read
      functions and thus quotaon(8) just returns EINVAL. Since nobody complained
      for all those years and quota support is not even in UDF standard just nuke
      it.
      Signed-off-by: NJan Kara <jack@suse.cz>
      36350462
  21. 08 4月, 2010 1 次提交
  22. 10 3月, 2010 2 次提交
    • J
      udf: Do not read inode before writing it · 5833ded9
      Jan Kara 提交于
      We needlessly read inode in udf_update_inode just before zeroing out the
      contents of the buffer. Fix it.
      Signed-off-by: NJan Kara <jack@suse.cz>
      5833ded9
    • J
      udf: Fix unalloc space handling in udf_update_inode · aae917cd
      Jan Kara 提交于
      Writing of inode holding unallocated space info was broken because we first
      cleared the buffer and after that checked whether it contains a tag meaning the
      block holds unallocated space information.  Fix the problem by checking
      appropriate in memory flag instead.
      
      Also cleanup the function a bit along the way - most importantly lock buffer
      when modifying its contents, check for buffer_write_io_error instead of
      !buffer_uptodate, etc..
      Signed-off-by: NJan Kara <jack@suse.cz>
      aae917cd
  23. 06 3月, 2010 1 次提交
  24. 05 3月, 2010 4 次提交
    • C
      dquot: cleanup dquot initialize routine · 871a2931
      Christoph Hellwig 提交于
      Get rid of the initialize dquot operation - it is now always called from
      the filesystem and if a filesystem really needs it's own (which none
      currently does) it can just call into it's own routine directly.
      
      Rename the now static low-level dquot_initialize helper to __dquot_initialize
      and vfs_dq_init to dquot_initialize to have a consistent namespace.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      871a2931
    • C
      dquot: move dquot initialization responsibility into the filesystem · 907f4554
      Christoph Hellwig 提交于
      Currently various places in the VFS call vfs_dq_init directly.  This means
      we tie the quota code into the VFS.  Get rid of that and make the
      filesystem responsible for the initialization.   For most metadata operations
      this is a straight forward move into the methods, but for truncate and
      open it's a bit more complicated.
      
      For truncate we currently only call vfs_dq_init for the sys_truncate case
      because open already takes care of it for ftruncate and open(O_TRUNC) - the
      new code causes an additional vfs_dq_init for those which is harmless.
      
      For open the initialization is moved from do_filp_open into the open method,
      which means it happens slightly earlier now, and only for regular files.
      The latter is fine because we don't need to initialize it for operations
      on special files, and we already do it as part of the namespace operations
      for directories.
      
      Add a dquot_file_open helper that filesystems that support generic quotas
      can use to fill in ->open.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      907f4554
    • C
      dquot: cleanup dquot drop routine · 9f754758
      Christoph Hellwig 提交于
      Get rid of the drop dquot operation - it is now always called from
      the filesystem and if a filesystem really needs it's own (which none
      currently does) it can just call into it's own routine directly.
      
      Rename the now static low-level dquot_drop helper to __dquot_drop
      and vfs_dq_drop to dquot_drop to have a consistent namespace.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      9f754758
    • C
      dquot: move dquot drop responsibility into the filesystem · 257ba15c
      Christoph Hellwig 提交于
      Currently clear_inode calls vfs_dq_drop directly.  This means
      we tie the quota code into the VFS.  Get rid of that and make the
      filesystem responsible for the drop inside the ->clear_inode
      superblock operation.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      257ba15c
  25. 04 3月, 2010 1 次提交
  26. 05 2月, 2010 1 次提交
  27. 15 12月, 2009 1 次提交
    • J
      udf: Avoid IO in udf_clear_inode · 2c948b3f
      Jan Kara 提交于
      It is not very good to do IO in udf_clear_inode. First, VFS does not really
      expect inode to become dirty there and thus we have to write it ourselves,
      second, memory reclaim gets blocked waiting for IO when it does not really
      expect it, third, the IO pattern (e.g. on umount) resulting from writes in
      udf_clear_inode is bad and it slows down writing a lot.
      
      The reason why UDF needed to do IO in udf_clear_inode is that UDF standard
      mandates extent length to exactly match inode size. But when we allocate
      extents to a file or directory, we don't really know what exactly the final
      file size will be and thus temporarily set it to block boundary and later
      truncate it to exact length in udf_clear_inode. Now, this is changed to
      truncate to final file size in udf_release_file for regular files. For
      directories and symlinks, we do the truncation at the moment when learn
      what the final file size will be.
      Signed-off-by: NJan Kara <jack@suse.cz>
      2c948b3f