1. 27 9月, 2017 1 次提交
    • J
      quota: Fix quota corruption with generic/232 test · 4c6bb696
      Jan Kara 提交于
      Eric has reported that since commit d2faa415 "quota: Do not acquire
      dqio_sem for dquot overwrites in v2 format" test generic/232
      occasionally fails due to quota information being incorrect. Indeed that
      commit was too eager to remove dqio_sem completely from the path that
      just overwrites quota structure with updated information. Although that
      is innocent on its own, another process that inserts new quota structure
      to the same block can perform read-modify-write cycle of that block thus
      effectively discarding quota information update if they race in a wrong
      way.
      
      Fix the problem by acquiring dqio_sem for reading for overwrites of
      quota structure. Note that it *is* possible to completely avoid taking
      dqio_sem in the overwrite path however that will require modifying path
      inserting / deleting quota structures to avoid RMW cycles of the full
      block and for now it is not clear whether it is worth the hassle.
      
      Fixes: d2faa415Reported-and-tested-by: NEric Whitney <enwlinux@gmail.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      4c6bb696
  2. 21 8月, 2017 1 次提交
  3. 18 8月, 2017 9 次提交
  4. 09 2月, 2016 1 次提交
  5. 04 1月, 2016 1 次提交
  6. 04 3月, 2015 1 次提交
    • J
      quota: Fix maximum quota limit settings · 7e08da50
      Jan Kara 提交于
      Currently quota format that supports 64-bit usage sets maximum quota
      limit as 2^64-1. However quota core code uses signed numbers to track
      usage and even limits themselves are stored in long long. Checking of
      maximum allowable limits worked by luck until commit 14bf61ff
      (quota: Switch ->get_dqblk() and ->set_dqblk() to use bytes as space
      units) because variable we compared with was unsigned. After that commit
      the type we compared against changed to signed and thus checks for
      maximum limits with the newest VFS quota format started to refuse any
      non-negative value. Later the problem was inadvertedly fixed by commit
      b10a0819 (quota: Store maximum space limit in bytes) because we
      started to compare against unsigned type as well.
      
      Fix possible future problems of this kind by setting maximum limits to
      2^63-1 to avoid overflow issues.
      Reported-by: NCarlos Carvalho <carlos@fisica.ufpr.br>
      Signed-off-by: NJan Kara <jack@suse.cz>
      7e08da50
  7. 30 1月, 2015 1 次提交
  8. 22 1月, 2015 1 次提交
    • J
      quota: Don't store flags for v2 quota format · c119c5b9
      Jan Kara 提交于
      Currently, v2 quota format blindly stored flags from in-memory dqinfo on
      disk, although there are no flags supported. Since it is stupid to store
      flags which have no effect, just store 0 unconditionally and don't
      bother loading it from disk.
      
      Note that userspace could have stored some flags there via Q_SETINFO
      quotactl and then later read them (although flags have no effect) but
      I'm pretty sure noone does that (most definitely quota-tools don't and
      quota interface doesn't have too much other users).
      Signed-off-by: NJan Kara <jack@suse.cz>
      c119c5b9
  9. 18 9月, 2012 1 次提交
    • E
      userns: Convert struct dquot dq_id to be a struct kqid · 4c376dca
      Eric W. Biederman 提交于
      Change struct dquot dq_id to a struct kqid and remove the now
      unecessary dq_type.
      
      Make minimal changes to dquot, quota_tree, quota_v1, quota_v2, ext3,
      ext4, and ocfs2 to deal with the change in quota structures and
      signatures.  The ocfs2 changes are larger than most because of the
      extensive tracing throughout the ocfs2 quota code that prints out
      dq_id.
      
      quota_tree.c:get_index is modified to take a struct kqid instead of a
      qid_t because all of it's callers pass in dquot->dq_id and it allows
      me to introduce only a single conversion.
      
      The rest of the changes are either just replacing dq_type with dq_id.type,
      adding conversions to deal with the change in type and occassionally
      adding qid_eq to allow quota id comparisons in a user namespace safe way.
      
      Cc: Mark Fasheh <mfasheh@suse.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andreas Dilger <adilger.kernel@dilger.ca>
      Cc: Theodore Tso <tytso@mit.edu>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      4c376dca
  10. 24 2月, 2011 1 次提交
  11. 21 7月, 2010 1 次提交
  12. 22 5月, 2010 1 次提交
  13. 23 12月, 2009 2 次提交
  14. 10 12月, 2009 2 次提交
  15. 26 3月, 2009 2 次提交
  16. 06 1月, 2009 4 次提交
  17. 26 7月, 2008 1 次提交
  18. 30 4月, 2008 1 次提交
  19. 28 4月, 2008 1 次提交
  20. 23 3月, 2006 1 次提交
  21. 04 2月, 2006 1 次提交
  22. 15 1月, 2006 1 次提交
  23. 17 4月, 2005 2 次提交
    • N
      [PATCH] quota: possible bug in quota format v2 support · e821d94d
      Niu YaWei 提交于
      Don't put root block of quota tree to the free list (when quota file is
      completely empty).  That should not actually happen anyway (somebody should
      get accounted for the filesystem root and so quota file should never be
      empty) but better prevent it here than solve magical quota file
      corruption.
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e821d94d
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4