OSDN Git Service

tune2fs: Add support for turning on quota feature
authorAditya Kali <adityakali@google.com>
Wed, 20 Jul 2011 18:40:05 +0000 (11:40 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 31 Aug 2011 22:08:42 +0000 (18:08 -0400)
commit771e8db9f04da550ee7c0ca74b198e989ea4ff35
treeb35c8b3a7ae9883c17f988834bd1bd7489d7746f
parent1f5d7a890e8b2ad03ee91fd891b0b5b4327da030
tune2fs: Add support for turning on quota feature

This patch adds support for setting the quota feature in superblock
and allows selectively creating quota inodes (user or group or both)
in the superblock. Currently, modifying the quota feature is only
supported when the filesystem is unmounted.
Also, when setting the quota feature, tune2fs will use aquota.user or
aquota.group file inode number in superblock if these files exist.
Otherwise it will initialize empty quota inodes #3 and #4 and use them.

Here is how it works:
 # Set quota feature and initialize both (user and group) quota inodes
 $ tune2fs -O quota /dev/ram1

 # Enable only one type of quota
 $ tune2fs -Q usrquota /dev/ram1

 # Enable grpquota, disable usrquota
 $ tune2fs -Q ^usrquota,grpquota /dev/ram1

 # Clear quota feature and remove quota inodes
 $ tune2fs -O ^quota /dev/ram1

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/Makefile.in
misc/tune2fs.8.in
misc/tune2fs.c