1. 01 11月, 2011 2 次提交
  2. 06 10月, 2011 1 次提交
  3. 10 3月, 2011 1 次提交
  4. 23 2月, 2011 1 次提交
  5. 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
  6. 10 8月, 2010 2 次提交
  7. 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
  8. 08 4月, 2010 1 次提交
  9. 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
  10. 06 3月, 2010 1 次提交
  11. 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
  12. 04 3月, 2010 1 次提交
  13. 05 2月, 2010 1 次提交
  14. 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
  15. 15 9月, 2009 1 次提交
    • J
      udf: Perform preallocation only for regular files · 81056dd0
      Jan Kara 提交于
      So far we preallocated blocks also for directories but that brings a
      problem, when to get rid of preallocated blocks we don't need. So far
      we removed them in udf_clear_inode() which has a disadvantage that
      1) blocks are unavailable long after writing to a directory finished
         and thus one can get out of space unnecessarily early
      2) releasing blocks from udf_clear_inode is problematic because VFS
         does not expect us to redirty inode there and it also slows down
         memory reclaim.
      
      So preallocate blocks only for regular files where we can drop preallocation
      in udf_release_file.
      Signed-off-by: NJan Kara <jack@suse.cz>
      81056dd0
  16. 02 4月, 2009 4 次提交
  17. 28 11月, 2008 1 次提交
    • J
      udf: Fix BUG_ON() in destroy_inode() · 52b19ac9
      Jan Kara 提交于
      udf_clear_inode() can leave behind buffers on mapping's i_private list (when
      we truncated preallocation). Call invalidate_inode_buffers() so that the list
      is properly cleaned-up before we return from udf_clear_inode(). This is ugly
      and suggest that we should cleanup preallocation earlier than in clear_inode()
      but currently there's no such call available since drop_inode() is called under
      inode lock and thus is unusable for disk operations.
      Signed-off-by: NJan Kara <jack@suse.cz>
      52b19ac9
  18. 17 4月, 2008 10 次提交
  19. 09 2月, 2008 1 次提交