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

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

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux