Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [bouyer-quota2] src

Module Name:    src
Committed By:   bouyer
Date:           Thu Jan 20 14:25:05 UTC 2011

Modified Files:
        src/distrib/sets/lists/comp [bouyer-quota2]: mi
        src/etc/mtree [bouyer-quota2]: NetBSD.dist.tests
        src/lib/libc/compat/arch/alpha/sys [bouyer-quota2]:
        src/lib/libc/compat/arch/arm/sys [bouyer-quota2]:
        src/lib/libc/compat/arch/hppa/sys [bouyer-quota2]:
        src/lib/libc/compat/arch/i386/sys [bouyer-quota2]:
        src/lib/libc/compat/arch/ia64/sys [bouyer-quota2]:
        src/lib/libc/compat/arch/m68k/sys [bouyer-quota2]:
        src/lib/libc/compat/arch/mips/sys [bouyer-quota2]:
        src/lib/libc/compat/arch/powerpc/sys [bouyer-quota2]:
        src/lib/libc/compat/arch/powerpc64/sys [bouyer-quota2]:
        src/lib/libc/compat/arch/sh3/sys [bouyer-quota2]:
        src/lib/libc/compat/arch/sparc/sys [bouyer-quota2]:
        src/lib/libc/compat/arch/sparc64/sys [bouyer-quota2]:
        src/lib/libc/compat/arch/vax/sys [bouyer-quota2]:
        src/lib/libc/compat/arch/x86_64/sys [bouyer-quota2]:
        src/lib/libc/sys [bouyer-quota2]:
        src/lib/librumphijack [bouyer-quota2]: hijack.c
        src/sbin/fsck_ffs [bouyer-quota2]: Makefile dir.c extern.h fsck.h
            inode.c main.c pass1.c pass1b.c pass2.c pass3.c pass4.c setup.c
        src/sbin/fsdb [bouyer-quota2]: Makefile
        src/sbin/newfs [bouyer-quota2]: Makefile extern.h mkfs.c newfs.8
        src/sbin/tunefs [bouyer-quota2]: tunefs.8 tunefs.c
        src/sys/compat/netbsd32 [bouyer-quota2]: netbsd32_netbsd.c
            netbsd32_syscall.h netbsd32_syscallargs.h netbsd32_syscalls.c
            netbsd32_sysent.c syscalls.master
        src/sys/conf [bouyer-quota2]: files
        src/sys/fs/unionfs [bouyer-quota2]: unionfs_vfsops.c
        src/sys/kern [bouyer-quota2]: init_sysent.c syscalls.c syscalls.master
            vfs_subr.c vfs_syscalls.c vnode_if.c
        src/sys/miscfs/genfs [bouyer-quota2]: layer_extern.h layer_vfsops.c
        src/sys/rump/fs/lib/libffs [bouyer-quota2]: Makefile
        src/sys/rump/include/rump [bouyer-quota2]: rump_syscalls.h
        src/sys/rump/librump/rumpkern [bouyer-quota2]: rump_syscalls.c
        src/sys/rump/librump/rumpvfs [bouyer-quota2]: rumpvnode_if.c
        src/sys/sys [bouyer-quota2]: Makefile mount.h syscall.h syscallargs.h
        src/sys/ufs [bouyer-quota2]: files.ufs
        src/sys/ufs/ffs [bouyer-quota2]: ffs_alloc.c ffs_balloc.c ffs_bswap.c
            ffs_extern.h ffs_inode.c ffs_subr.c ffs_vfsops.c fs.h
        src/sys/ufs/ufs [bouyer-quota2]: Makefile quota.h ufs_extern.h
            ufs_inode.c ufs_quota.c ufs_vfsops.c ufs_vnops.c ufsmount.h
        src/tests/fs/ffs [bouyer-quota2]: Makefile
        src/tests/sbin [bouyer-quota2]: Makefile
        src/usr.bin/quota [bouyer-quota2]: Makefile quota.1 quota.c
Added Files:
        src/lib/libc/compat/arch/alpha/sys [bouyer-quota2]: compat_quotactl.S
        src/lib/libc/compat/arch/arm/sys [bouyer-quota2]: compat_quotactl.S
        src/lib/libc/compat/arch/hppa/sys [bouyer-quota2]: compat_quotactl.S
        src/lib/libc/compat/arch/i386/sys [bouyer-quota2]: compat_quotactl.S
        src/lib/libc/compat/arch/ia64/sys [bouyer-quota2]: compat_quotactl.S
        src/lib/libc/compat/arch/m68k/sys [bouyer-quota2]: compat_quotactl.S
        src/lib/libc/compat/arch/mips/sys [bouyer-quota2]: compat_quotactl.S
        src/lib/libc/compat/arch/powerpc/sys [bouyer-quota2]: compat_quotactl.S
        src/lib/libc/compat/arch/powerpc64/sys [bouyer-quota2]:
        src/lib/libc/compat/arch/sh3/sys [bouyer-quota2]: compat_quotactl.S
        src/lib/libc/compat/arch/sparc/sys [bouyer-quota2]: compat_quotactl.S
        src/lib/libc/compat/arch/sparc64/sys [bouyer-quota2]: compat_quotactl.S
        src/lib/libc/compat/arch/vax/sys [bouyer-quota2]: compat_quotactl.S
        src/lib/libc/compat/arch/x86_64/sys [bouyer-quota2]: compat_quotactl.S
        src/sbin/fsck_ffs [bouyer-quota2]: pass6.c quota2.c
        src/sys/sys [bouyer-quota2]: quota.h
        src/sys/ufs/ffs [bouyer-quota2]: ffs_quota2.c
        src/sys/ufs/ufs [bouyer-quota2]: quota1.h quota2.h quota2_prop.c
            quota2_prop.h quota2_subr.c ufs_quota.h ufs_quota1.c ufs_quota2.c
        src/tests/fs/ffs [bouyer-quota2]: h_quota2_server.c t_quota2_1.c
        src/tests/sbin/fsck_ffs [bouyer-quota2]: Makefile
        src/tests/sbin/newfs [bouyer-quota2]: Makefile

Log Message:
Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
  as parameter a path to a mount point, and a prop_dictionary
  (in plistref format) describing commands and arguments.
  For each command, status and data are returned as a prop_dictionary.
  quota commands features will be added to take advantage of this,
  exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
  ffs (and playing nicely with wapbl).
  Quotas are enabled on a ffs filesystem via superblock flags.
  tunefs(8) can enable or disable quotas.
  On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
  block and inode usages, and will check and update quotas in Pass 6.
  quota usage and limits are stored in unliked files (one for users,
  one for groups)l fsck_ffs(8) will create the files if needed, or
  free them if needed. This means that after enabling or disabling
  quotas on a filesystem; a fsck_ffs(8) run is required.
  quotacheck(8) is not needed any more, on a unclean shutdown
  fsck or journal replay will take care of fixing quotas.
  newfs(8) can create a ready-to-mount quota-enabled filesystem
  (superblock flags are set and quota inodes are created).
  Other new features or semantic changes:
  - default quota datas, applied to users or groups which don't already
    have a quota entry
  - per-user/group grace time (instead of a filesystem global one)
  - 0 really means "nothing allowed at all", not "no limit".
    If you want "no limit", set the limit to UQUAD_MAX (tools will
    understand "unlimited" and "-")

  A quota file is structured as follow:
  it starts with a header, containing a few per-filesystem values,
  and the default quota limits.
  Quota entries are linked together as a simple list, each entry has a
  pointer (as an offset withing the file) to the next.
  The header has a pointer to a list of free quota entries, and
  a hash table of in-use entries. The size of the hash table depends
  on the filesystem block size (header+hash table should fit in the
  first block). The file is not sparse and is a multiple of
  filesystem block size (when the free quota entry list is empty a new
  filesystem block is allocated). quota entries to not cross
  filesystem block boundaries.

  In memory, the kernel keeps a cache of recently used quota entries
  as a reference to the block number, and offset withing the block.
  The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
      update repquota, edquota and rpc.rquotad to the new world
      implement compat_50_quotactl ioctl.
      update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.

To generate a diff of this commit:
cvs rdiff -u -r1.1573 -r1.1573.2.1 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.23 -r1.23.2.1 src/etc/mtree/NetBSD.dist.tests
cvs rdiff -u -r1.1 -r1.1.40.1 src/lib/libc/compat/arch/alpha/sys/
cvs rdiff -u -r0 -r1.1.2.1 \
cvs rdiff -u -r1.1 -r1.1.40.1 src/lib/libc/compat/arch/arm/sys/
cvs rdiff -u -r0 -r1.1.2.1 src/lib/libc/compat/arch/arm/sys/compat_quotactl.S
cvs rdiff -u -r1.1 -r1.1.40.1 src/lib/libc/compat/arch/hppa/sys/
cvs rdiff -u -r0 -r1.1.2.1 \
cvs rdiff -u -r1.1 -r1.1.40.1 src/lib/libc/compat/arch/i386/sys/
cvs rdiff -u -r0 -r1.1.2.1 \
cvs rdiff -u -r1.1 -r1.1.38.1 src/lib/libc/compat/arch/ia64/sys/
cvs rdiff -u -r0 -r1.1.2.1 \
cvs rdiff -u -r1.1 -r1.1.40.1 src/lib/libc/compat/arch/m68k/sys/
cvs rdiff -u -r0 -r1.1.2.1 \
cvs rdiff -u -r1.1 -r1.1.40.1 src/lib/libc/compat/arch/mips/sys/
cvs rdiff -u -r0 -r1.1.2.1 \
cvs rdiff -u -r1.1 -r1.1.40.1 \
cvs rdiff -u -r0 -r1.1.2.1 \
cvs rdiff -u -r1.2 -r1.2.40.1 \
cvs rdiff -u -r0 -r1.1.2.1 \
cvs rdiff -u -r1.1 -r1.1.40.1 src/lib/libc/compat/arch/sh3/sys/
cvs rdiff -u -r0 -r1.1.2.1 src/lib/libc/compat/arch/sh3/sys/compat_quotactl.S
cvs rdiff -u -r1.1 -r1.1.40.1 src/lib/libc/compat/arch/sparc/sys/
cvs rdiff -u -r0 -r1.1.2.1 \
cvs rdiff -u -r1.1 -r1.1.40.1 \
cvs rdiff -u -r0 -r1.1.2.1 \
cvs rdiff -u -r1.1 -r1.1.40.1 src/lib/libc/compat/arch/vax/sys/
cvs rdiff -u -r0 -r1.1.2.1 src/lib/libc/compat/arch/vax/sys/compat_quotactl.S
cvs rdiff -u -r1.1 -r1.1.40.1 \
cvs rdiff -u -r0 -r1.1.2.1 \
cvs rdiff -u -r1.204 -r1.204.2.1 src/lib/libc/sys/
cvs rdiff -u -r1.16 -r1.16.2.1 src/lib/librumphijack/hijack.c
cvs rdiff -u -r1.40 -r1.40.2.1 src/sbin/fsck_ffs/Makefile
cvs rdiff -u -r1.52 -r1.52.2.1 src/sbin/fsck_ffs/dir.c
cvs rdiff -u -r1.25 -r1.25.2.1 src/sbin/fsck_ffs/extern.h
cvs rdiff -u -r1.48 -r1.48.2.1 src/sbin/fsck_ffs/fsck.h
cvs rdiff -u -r1.63 -r1.63.2.1 src/sbin/fsck_ffs/inode.c
cvs rdiff -u -r1.76 -r1.76.2.1 src/sbin/fsck_ffs/main.c
cvs rdiff -u -r1.46 -r1.46.14.1 src/sbin/fsck_ffs/pass1.c
cvs rdiff -u -r1.21 -r1.21.48.1 src/sbin/fsck_ffs/pass1b.c
cvs rdiff -u -r1.45 -r1.45.20.1 src/sbin/fsck_ffs/pass2.c
cvs rdiff -u -r1.19 -r1.19.40.1 src/sbin/fsck_ffs/pass3.c
cvs rdiff -u -r1.25 -r1.25.14.1 src/sbin/fsck_ffs/pass4.c
cvs rdiff -u -r0 -r1.1.2.1 src/sbin/fsck_ffs/pass6.c \
cvs rdiff -u -r1.90 -r1.90.2.1 src/sbin/fsck_ffs/setup.c
cvs rdiff -u -r1.58 -r1.58.2.1 src/sbin/fsck_ffs/utilities.c
cvs rdiff -u -r1.27 -r1.27.2.1 src/sbin/fsdb/Makefile
cvs rdiff -u -r1.36 -r1.36.2.1 src/sbin/newfs/Makefile
cvs rdiff -u -r1.14 -r1.14.2.1 src/sbin/newfs/extern.h
cvs rdiff -u -r1.108 -r1.108.2.1 src/sbin/newfs/mkfs.c src/sbin/newfs/newfs.c
cvs rdiff -u -r1.79 -r1.79.2.1 src/sbin/newfs/newfs.8
cvs rdiff -u -r1.38 -r1.38.2.1 src/sbin/tunefs/tunefs.8
cvs rdiff -u -r1.42 -r1.42.2.1 src/sbin/tunefs/tunefs.c
cvs rdiff -u -r1.168 -r1.168.4.1 src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -u -r1.92 -r1.92.6.1 src/sys/compat/netbsd32/netbsd32_syscall.h \
cvs rdiff -u -r1.91 -r1.91.6.1 src/sys/compat/netbsd32/netbsd32_syscalls.c \
cvs rdiff -u -r1.84 -r1.84.6.1 src/sys/compat/netbsd32/syscalls.master
cvs rdiff -u -r1.996 -r1.996.4.1 src/sys/conf/files
cvs rdiff -u -r1.8 -r1.8.4.1 src/sys/fs/unionfs/unionfs_vfsops.c
cvs rdiff -u -r1.251 -r1.251.2.1 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.242 -r1.242.2.1 src/sys/kern/syscalls.c \
cvs rdiff -u -r1.418 -r1.418.2.1 src/sys/kern/vfs_subr.c
cvs rdiff -u -r1.414 -r1.414.4.1 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.85 -r1.85.4.1 src/sys/kern/vnode_if.c
cvs rdiff -u -r1.27 -r1.27.4.1 src/sys/miscfs/genfs/layer_extern.h
cvs rdiff -u -r1.33 -r1.33.4.1 src/sys/miscfs/genfs/layer_vfsops.c
cvs rdiff -u -r1.12 -r1.12.4.1 src/sys/rump/fs/lib/libffs/Makefile
cvs rdiff -u -r1.39 -r1.39.2.1 src/sys/rump/include/rump/rump_syscalls.h
cvs rdiff -u -r1.8 -r1.8.4.1 src/sys/rump/include/rump/rumpvnode_if.h
cvs rdiff -u -r1.61 -r1.61.2.1 src/sys/rump/librump/rumpkern/rump_syscalls.c
cvs rdiff -u -r1.7 -r1.7.4.1 src/sys/rump/librump/rumpvfs/rumpvnode_if.c
cvs rdiff -u -r1.128 -r1.128.4.1 src/sys/sys/Makefile
cvs rdiff -u -r1.196 -r1.196.4.1 src/sys/sys/mount.h
cvs rdiff -u -r0 -r1.1.2.1 src/sys/sys/quota.h
cvs rdiff -u -r1.238 -r1.238.2.1 src/sys/sys/syscall.h
cvs rdiff -u -r1.221 -r1.221.2.1 src/sys/sys/syscallargs.h
cvs rdiff -u -r1.79 -r1.79.4.1 src/sys/sys/vnode_if.h
cvs rdiff -u -r1.24 -r1.24.6.1 src/sys/ufs/files.ufs
cvs rdiff -u -r1.125 -r1.125.6.1 src/sys/ufs/ffs/ffs_alloc.c
cvs rdiff -u -r1.52 -r1.52.8.1 src/sys/ufs/ffs/ffs_balloc.c
cvs rdiff -u -r1.34 -r1.34.8.1 src/sys/ufs/ffs/ffs_bswap.c
cvs rdiff -u -r1.75 -r1.75.8.1 src/sys/ufs/ffs/ffs_extern.h
cvs rdiff -u -r1.104 -r1.104.8.1 src/sys/ufs/ffs/ffs_inode.c
cvs rdiff -u -r0 -r1.1.2.1 src/sys/ufs/ffs/ffs_quota2.c
cvs rdiff -u -r1.45 -r1.45.28.1 src/sys/ufs/ffs/ffs_subr.c
cvs rdiff -u -r1.263 -r1.263.4.1 src/sys/ufs/ffs/ffs_vfsops.c
cvs rdiff -u -r1.55 -r1.55.8.1 src/sys/ufs/ffs/fs.h
cvs rdiff -u -r1.6 -r1.6.24.1 src/sys/ufs/ufs/Makefile
cvs rdiff -u -r1.25 -r1.25.64.1 src/sys/ufs/ufs/quota.h
cvs rdiff -u -r0 -r1.1.2.1 src/sys/ufs/ufs/quota1.h src/sys/ufs/ufs/quota2.h \
    src/sys/ufs/ufs/quota2_prop.c src/sys/ufs/ufs/quota2_prop.h \
    src/sys/ufs/ufs/quota2_subr.c src/sys/ufs/ufs/ufs_quota.h \
    src/sys/ufs/ufs/ufs_quota1.c src/sys/ufs/ufs/ufs_quota2.c
cvs rdiff -u -r1.62 -r1.62.8.1 src/sys/ufs/ufs/ufs_extern.h
cvs rdiff -u -r1.83 -r1.83.4.1 src/sys/ufs/ufs/ufs_inode.c
cvs rdiff -u -r1.68 -r1.68.4.1 src/sys/ufs/ufs/ufs_quota.c
cvs rdiff -u -r1.40 -r1.40.8.1 src/sys/ufs/ufs/ufs_vfsops.c
cvs rdiff -u -r1.186 -r1.186.4.1 src/sys/ufs/ufs/ufs_vnops.c
cvs rdiff -u -r1.35 -r1.35.12.1 src/sys/ufs/ufs/ufsmount.h
cvs rdiff -u -r1.14 -r1.14.2.1 src/tests/fs/ffs/Makefile
cvs rdiff -u -r0 -r1.1.2.1 src/tests/fs/ffs/h_quota2_server.c \
cvs rdiff -u -r1.1 -r1.1.2.1 src/tests/sbin/Makefile
cvs rdiff -u -r0 -r1.1.2.1 src/tests/sbin/fsck_ffs/Makefile \
    src/tests/sbin/fsck_ffs/ \
    src/tests/sbin/fsck_ffs/ \
cvs rdiff -u -r0 -r1.1.2.1 src/tests/sbin/newfs/Makefile \
    src/tests/sbin/newfs/ \
cvs rdiff -u -r1.6 -r1.6.64.1 src/usr.bin/quota/Makefile
cvs rdiff -u -r1.14 -r1.14.52.1 src/usr.bin/quota/quota.1
cvs rdiff -u -r1.33 -r1.33.2.1 src/usr.bin/quota/quota.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index