MP-Safe quotas for RELENG_6



Hello,
I backported the MP-Safe quotas patch for RELENG_6. Besides what the title
said, it includes several fixes for quotas operation. I would commit the
patch based on the users feedback, assuming the re@ would not object.

Please, test it.
http://people.freebsd.org/~kib/quotagiant/quotas-RELENG_6-20070623-1455.patch

Draft version of commit message:

MFC:

part of rev. 1.412 of sys/kern/vfs_syscalls.c:
Remove explicit calls to lock and unlock Giant and replace them with
VFS_LOCK_GIANT/VFS_UNLOCK_GIANT calls. MFC this for quotactl only.
rev. 1.433 of sys/kern/vfs_syscalls.c:
Busy filesystem around call of VFS_QUOTACTL() vfs op.

rev. 1.289 of sys/ufs/ufs/ufs_vnops.c:
Remove unneeded getinoquota() call in the ufs_access().

rev. 1.83 of sys/ufs/ufs/ufs_lookup.c:
Call getinoquota() before allocating new block for the directory to properly
account for block allocation.

rev. 1.30 of sys/ufs/ufs/quota.h
rev. 1.327 of sys/ufs/ffs/ffs_vfsops.c
rev. 1.93 of sys/ufs/ufs/ufs_quota.c:
Implement fine-grained locking for UFS quotas.

rev. 1.205 of sys/ufs/ffs/ffs_softdep.c
rev. 1.328 of sys/ufs/ffs/ffs_vfsops.c:
Mark UFS as being MP-Safe in "options QUOTA" case too. Remove no more
neccessary Giant acquisions in softdepend processing code.

rev. 1.206 of sys/ufs/ffs/ffs_softdep.c:
Revert rev. 1.205. Replace unconditional acquision of Giant when QUOTAS are
defined with VFS_LOCK_GIANT(NULL) call.

rev. 1.211 of sys/ufs/ffs/ffs_softdep.c
rev. 1.69 of sys/ufs/ufs/ufs_inode.c:
Fix livelock that could occur when snapshoting UFS with quotas, where
some quota limit was exceeded.

Attachment: pgpNvY1dfdd1C.pgp
Description: PGP signature



Relevant Pages

  • SUMMARY: Quota at directory level
    ... I should've noted that I did push for using zfs & creating FS per domain ... You can't do it via ufs quotas, those are done on the partition level.. ... implemented anywhere & don't think its feasible based on ufs or vxfs ...
    (SunManagers)
  • Re: Solaris 10_x86: UFS quota corruption
    ... forums or the opensolaris.org ufs discussion list. ... We are running Solaris 10_x86 on a Dell 2650 and have quotas enabled ... Running quotacheck fixes ... What could be causing consistency/corruption problems for quotas? ...
    (comp.unix.solaris)
  • Solaris 10_x86: UFS quota corruption
    ... forums or the opensolaris.org ufs discussion list. ... We are running Solaris 10_x86 on a Dell 2650 and have quotas enabled ... Running quotacheck fixes ... What could be causing consistency/corruption problems for quotas? ...
    (comp.unix.solaris)
  • [PATCH] Fix UFS quota
    ... So quotas for UFS should work again (they were broken by ... I don't actually think the patch is too much ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Testing UFS/Snapshots/Quotas on -STABLE
    ... kernel will force the Giant lock on UFS and I want to make sure I ... on a partition with quotas, and a large 'portsnap update' gets VERY ...
    (freebsd-stable)