]> git.neil.brown.name Git - history.git/commit
[PATCH] quota locking update
authorAndrew Morton <akpm@digeo.com>
Wed, 1 Jan 2003 08:46:22 +0000 (00:46 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Wed, 1 Jan 2003 08:46:22 +0000 (00:46 -0800)
commitb0de9c76475f7d8f6917d8ed8bb55259e1512c37
tree92944f45c0e825b0ea4c14488b54d38bd5852365
parentf5254cb3ca4b80d41d02096e9268477676c6416d
[PATCH] quota locking update

I've been carrying this since Jan sent it out a month or two ago.
I don't know if anyone has tested it though.  The sort of people
who use quotas tend to like nice stable kernels.  I read through it,
but can't say that I know enough about quotas to know if it makes sense.
The wait_on_dquot() synchronisation is a bit odd.

I do need to do a round of stability testing with this and ext3 - the
interaction between quotas and ext3 is an area where we've had deadlocks
in the past.

But the quota locking is definitely looking crufty, and I'd suggest that
we run with this..

Patch from Jan Kara <jack@suse.cz>

"I'm resending you the patch with new quota SMP locking.  The patch removes
 BKL and replaces it with two spinlocks protecting quota lists and data
 stored in dquot structures.  Also non-SMP locking was changed a bit make SMP
 locking easier (eg.  we got rid of not very nice dq_dup_ref counters).  The
 patch is against 2.5.48 but applies well also to 2.5.49.  Would you please
 apply the patch?"

- Change dqoff_sem from a semaphore to an rwsem.

- Convert dqi_flags from an int to a ulong and use test_bit/set_bit rather
  thatn &/|

- The various exported quota operations now run without lock_kernel().
  This means that things like DQUOT_ALLOC_SPACE no longer take lock_kernel()
  in out high-perfomance filesystems.  Nice.

- Replace lock_kernel() in the quota code with two quota-private global
  locks.

- Replace all the open-coded waitqueue management with a semaphore
  (wait_on_dquot())
fs/dquot.c
fs/inode.c
fs/quota.c
fs/super.c
include/linux/quota.h
include/linux/quotaops.h