From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
To: Andreas Dilger <adilger@dilger.ca>,
linux-ext4@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>,
"Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Li Xi <pkuelelixi@gmail.com>
Subject: [PATCH RFC v1 0/4] e2fsprogs: project quota
Date: Fri, 13 Mar 2015 19:00:06 +0300 [thread overview]
Message-ID: <20150313155012.14281.80292.stgit@buzz> (raw)
Projects quota allows to enforce disk quota for several subtrees or even
individual files on the filesystem. Each inode is marked with project-id
(independently from uid and gid) and accounted into corresponding project
quota. New files inherits project id from directory where they are created.
This patchset adds required support into mkfs, fsck, tune2fs, debugfs, chattr and lsattr.
All patches are available at github:
https://github.com/koct9i/linux --branch project
https://github.com/koct9i/e2fsprogs --branch project
https://github.com/koct9i/quota-tools --branch project
Ext4 layout
-----------
Project id introduce ro-compatible feature 'project'.
Inode project id is stored in place of obsolete field 'i_faddr' (that trick was
suggested by Darrick J. Wong in previous discussions of project quota).
Linux never used that field and fsck checks that it contains zero.
Quota information is stored in reserved/special inode №11.
For symmetry with other quotas inode number is stored in superblock.
By default only 10 inodes are reserved for special usage.
After this patch mkfs will reserve 20 inodes if feature project is enabled.
I've add option to resize2fs to reserve more inodes in existing filestsrem.
(See patchset [PATCH RFC v1 0/4] e2fsprogs: reserve more special inodes)
For now project quota supports only modern 'hidden' journaled mode.
---
Konstantin Khlebnikov (4):
e2fsprogs: introduce project id feature
e2fsprogs: add project quota support
e2fsprogs: add tests for project quota
e2fsprogs: add project id into lsattr and chattr
debugfs/debugfs.c | 40 ++++++++---
debugfs/quota.c | 8 +-
debugfs/set_fields.c | 4 +
e2fsck/pass1.c | 14 +++-
e2fsck/pass2.c | 3 +
e2fsck/quota.c | 11 +++
e2fsck/unix.c | 25 ++++---
lib/e2p/Makefile.in | 5 +
lib/e2p/e2p.h | 2 +
lib/e2p/feature.c | 2 +
lib/e2p/ls.c | 3 +
lib/e2p/project.c | 55 +++++++++++++++
lib/ext2fs/ext2_fs.h | 19 ++++-
lib/ext2fs/ext2fs.h | 3 +
lib/ext2fs/swapfs.c | 3 +
lib/ext2fs/tst_inode_size.c | 2 -
lib/ext2fs/tst_super_size.c | 3 +
lib/quota/mkquota.c | 42 ++++++++++--
lib/quota/quotaio.c | 23 ++++--
lib/quota/quotaio.h | 7 +-
misc/chattr.1.in | 7 ++
misc/chattr.c | 34 +++++++++
misc/ext4.5.in | 7 ++
misc/lsattr.1.in | 5 +
misc/lsattr.c | 19 +++++
misc/mke2fs.8.in | 5 +
misc/mke2fs.c | 26 ++++++-
misc/tune2fs.8.in | 9 ++
misc/tune2fs.c | 77 +++++++++++++++++++--
tests/m_project/expect.1 | 156 +++++++++++++++++++++++++++++++++++++++++++
tests/m_project/script | 7 ++
tests/t_project_1on/expect | 66 ++++++++++++++++++
tests/t_project_1on/name | 1
tests/t_project_1on/script | 68 +++++++++++++++++++
tests/t_project_2off/expect | 78 ++++++++++++++++++++++
tests/t_project_2off/name | 1
tests/t_project_2off/script | 54 +++++++++++++++
37 files changed, 821 insertions(+), 73 deletions(-)
create mode 100644 lib/e2p/project.c
create mode 100644 tests/m_project/expect.1
create mode 100644 tests/m_project/script
create mode 100644 tests/t_project_1on/expect
create mode 100644 tests/t_project_1on/name
create mode 100644 tests/t_project_1on/script
create mode 100644 tests/t_project_2off/expect
create mode 100644 tests/t_project_2off/name
create mode 100644 tests/t_project_2off/script
--
Signature
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2015-03-13 16:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 16:00 Konstantin Khlebnikov [this message]
2015-03-13 16:00 ` [PATCH RFC v1 1/4] e2fsprogs: introduce project id feature Konstantin Khlebnikov
2015-03-13 16:00 ` [PATCH RFC v1 2/4] e2fsprogs: add project quota support Konstantin Khlebnikov
2015-03-13 16:00 ` [PATCH RFC v1 3/4] e2fsprogs: add tests for project quota Konstantin Khlebnikov
2015-03-13 16:00 ` [PATCH RFC v1 4/4] e2fsprogs: add project id into lsattr and chattr Konstantin Khlebnikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150313155012.14281.80292.stgit@buzz \
--to=khlebnikov@yandex-team.ru \
--cc=adilger@dilger.ca \
--cc=darrick.wong@oracle.com \
--cc=linux-ext4@vger.kernel.org \
--cc=pkuelelixi@gmail.com \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).