Skip to content

RFC e2fsprogs: project quota

Konstantin Khlebnikov linux-ext4 1 version New

Get series with b4
b4 am 20150313155012.14281.80292.stgit@buzz

Versions newest first

  1. v1 RFC Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4e2fsprogs: introduce project id featuredebugfs/debugfs.c debugfs/set_fields.c e2fsck/pass1.c +10 more+83 -250 replies
2/4e2fsprogs: add project quota supportdebugfs/quota.c e2fsck/pass1.c e2fsck/quota.c +10 more+183 -400 replies
3/4e2fsprogs: add tests for project quotatests/m_project/expect.1 tests/m_project/script tests/t_project_1on/expect +5 more+431 -00 replies
4/4e2fsprogs: add project id into lsattr and chattrlib/e2p/Makefile.in lib/e2p/e2p.h lib/e2p/project.c +5 more+124 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC v1 0/4] e2fsprogs: project quota

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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html