1. 23 Dec, 2009 3 commits
    • Dmitry Monakhov's avatar
      quota: decouple fs reserved space from quota reservation · fd8fbfc1
      Dmitry Monakhov authored
      Currently inode_reservation is managed by fs itself and this
      reservation is transfered on dquot_transfer(). This means what
      inode_reservation must always be in sync with
      dquot->dq_dqb.dqb_rsvspace. Otherwise dquot_transfer() will result
      in incorrect quota(WARN_ON in dquot_claim_reserved_space() will be
      triggered)
      This is not easy because of complex locking order issues
      for example http://bugzilla.kernel.org/show_bug.cgi?id=14739
      
      The patch introduce quota reservation field for each fs-inode
      (fs specific inode is used in order to prevent bloating generic
      vfs inode). This reservation is managed by quota code internally
      similar to i_blocks/i_bytes and may not be always in sync with
      internal fs reservation.
      
      Also perform some code rearrangement:
      - Unify dquot_reserve_space() and dquot_reserve_space()
      - Unify dquot_release_reserved_space() and dquot_free_space()
      - Also this patch add missing warning update to release_rsv()
        dquot_release_reserved_space() must call flush_warnings() as
        dquot_free_space() does.
      Signed-off-by: default avatarDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      fd8fbfc1
    • Dmitry Monakhov's avatar
      Add unlocked version of inode_add_bytes() function · b462707e
      Dmitry Monakhov authored
      Quota code requires unlocked version of this function. Off course
      we can just copy-paste the code, but copy-pasting is always an evil.
      Signed-off-by: default avatarDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      b462707e
    • Dmitry Monakhov's avatar
      ext3: quota macros cleanup [V2] · c459001f
      Dmitry Monakhov authored
      Currently all quota block reservation macros contains hardcoded "2"
      aka MAXQUOTAS value. This is no good because in some places it is not
      obvious to understand what does this digit represent. Let's introduce
      new macro with self descriptive name.
      Signed-off-by: default avatarDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      c459001f
  2. 22 Dec, 2009 28 commits
  3. 21 Dec, 2009 9 commits