1. 05 3月, 2010 7 次提交
    • J
      quota: Fix warning when a delayed write happens before quota is enabled · 0a5a9c72
      Jan Kara 提交于
      If a delayed-allocation write happens before quota is enabled, the
      kernel spits out a warning:
      WARNING: at fs/quota/dquot.c:988 dquot_claim_space+0x77/0x112()
      
      because the fact that user has some delayed allocation is not recorded
      in quota structure.
      
      Make dquot_initialize() update amount of reserved space for user if it sees
      inode has some space reserved. Also make sure that reserved quota space does
      not go negative and we warn about the filesystem bug just once.
      Signed-off-by: NJan Kara <jack@suse.cz>
      0a5a9c72
    • D
      quota: manage reserved space when quota is not active [v2] · c469070a
      Dmitry Monakhov 提交于
      Since we implemented generic reserved space management interface,
      then it is possible to account reserved space even when quota
      is not active (similar to i_blocks/i_bytes).
      
      Without this patch following testcase result in massive comlain from
      WARN_ON in dquot_claim_space()
      
      TEST_CASE:
      mount /dev/sdb /mnt -oquota
      dd if=/dev/zero of=/mnt/test bs=1M count=1
      quotaon /mnt
      # fs_reserved_spave == 1Mb
      # quota_reserved_space == 0, because quota was disabled
      dd if=/dev/zero of=/mnt/test seek=1 bs=1M count=1
      # fs_reserved_spave == 2Mb
      # quota_reserved_space == 1Mb
      sync  # ->dquot_claim_space() -> WARN_ON
      Signed-off-by: NDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: NJan Kara <jack@suse.cz>
      c469070a
    • C
      jbd[2]: remove references to BUFFER_DEBUG · c7e8d4d6
      Christoph Egger 提交于
      CONFIG_BUFFER_DEBUG seems to have been removed from the documentation
      somewhere around 2.4.15 and seemingly hasn't been available even
      longer. It is, however, still referenced at one place from the jbd
      code (one is a copy of the other header). Time to clean it up
      Signed-off-by: NChristoph Egger <siccegge@stud.informatik.uni-erlangen.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      c7e8d4d6
    • D
      ext3: trivial quota cleanup · e1f5c67a
      Dmitry Monakhov 提交于
      The patch is aimed to reorganize and simplify quota code a bit.
      Quota code is itself complex enouth, but we can make it more readable
      in some places:
      - Move quota option parsing to separate functions.
      - Simplify old-quota and journaled-quota mix check.
      Signed-off-by: NDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: NJan Kara <jack@suse.cz>
      e1f5c67a
    • D
      ext3: mount flags manipulation cleanup · e3c96435
      Dmitry Monakhov 提交于
      Replace intermediate EXT3_MOUNT_XXX flags manipulation to
      corresponding macro.
      Signed-off-by: NDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: NJan Kara <jack@suse.cz>
      e3c96435
    • J
      ext3: Use bitops to read/modify EXT3_I(inode)->i_state · 9df93939
      Jan Kara 提交于
      At several places we modify EXT3_I(inode)->i_state without holding i_mutex
      (ext3_release_file, ext3_bmap, ext3_journalled_writepage, ext3_do_update_inode,
      ...). These modifications are racy and we can lose updates to i_state. So
      convert handling of i_state to use bitops which are atomic.
      Signed-off-by: NJan Kara <jack@suse.cz>
      9df93939
    • J
      quota: Cleanup S_NOQUOTA handling · 26245c94
      Jan Kara 提交于
      Cleanup handling of S_NOQUOTA inode flag and document it a bit. The flag
      does not have to be set under dqptr_sem. Only functions modifying inode's
      dquot pointers have to check the flag under dqptr_sem before going forward
      with the modification. This way we are sure that we cannot add new dquot
      pointers to the inode which is just becoming a quota file.
      
      The good thing about this cleanup is that there are no more places in quota
      code which enforce i_mutex vs. dqptr_sem lock ordering (in particular that
      dqptr_sem -> i_mutex of quota file). This should silence some (false) lockdep
      warnings with ext4 + quota and generally make life of some filesystems easier.
      Signed-off-by: NJan Kara <jack@suse.cz>
      26245c94
  2. 03 3月, 2010 4 次提交
  3. 02 3月, 2010 29 次提交