linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ayush Ranjan <ayush.ranjan98@gmail.com>
To: Theodore Ts'o <tytso@mit.edu>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	Jonathan Corbet <corbet@lwn.net>
Cc: linux-ext4@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] Ext4 Documentation: Add missing quota section.
Date: Sun, 8 Sep 2019 12:51:23 -0500	[thread overview]
Message-ID: <20190908175123.GA14145@fa19-cs241-404.cs.illinois.edu> (raw)

There were a few broken links for quota. The page
https://ext4.wiki.kernel.org/index.php/Quota was not migrated into
the current documentation sources. This patch adds the contents of that
missing page as a new section in the overview page. Also fixes those
broken links by replacing them with cross document links to this new
quota section.

Signed-off-by: Ayush Ranjan <ayushr2@illinois.edu>
---
 Documentation/filesystems/ext4/overview.rst |  1 +
 Documentation/filesystems/ext4/quota.rst    | 53 +++++++++++++++++++++
 Documentation/filesystems/ext4/super.rst    |  6 +--
 3 files changed, 57 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/filesystems/ext4/quota.rst

diff --git a/Documentation/filesystems/ext4/overview.rst b/Documentation/filesystems/ext4/overview.rst
index cbab18bab..f97ea68ea 100644
--- a/Documentation/filesystems/ext4/overview.rst
+++ b/Documentation/filesystems/ext4/overview.rst
@@ -24,3 +24,4 @@ order.
 .. include:: bigalloc.rst
 .. include:: inlinedata.rst
 .. include:: eainode.rst
+.. include:: quota.rst
diff --git a/Documentation/filesystems/ext4/quota.rst b/Documentation/filesystems/ext4/quota.rst
new file mode 100644
index 000000000..8964c26cb
--- /dev/null
+++ b/Documentation/filesystems/ext4/quota.rst
@@ -0,0 +1,53 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+.. _quota:
+
+Quota Feature
+-------------
+
+The quota feature (``EXT4_FEATURE_RO_COMPAT_QUOTA``) causes the quota
+files (i.e., user.quota and group.quota which existed in the older quota
+design) to be hidden inodes, so they can not be corrupted by user space
+programs. Instead, these inodes are managed directly via e2fsprogs, and
+journaled quota will be automatically enabled by the kernel as soon as
+the file system is mounted. This way, it strongly reduces the
+possibility that the usage tracking performed by the file system will
+get out of sync.
+
+Kernel Support
+~~~~~~~~~~~~~~
+
+Support for the quota feature first appeared in the 3.6 upstream kernel
+version. There is a bug which will not be fixed until v3.8 which will
+cause ext4 to fail to mount a file system with quotas if the quota code
+is built as a module. So users who wish to experiment with this feature
+are strongly encouraged to build with the following configuration
+options:
+
+- ``CONFIG_QUOTA=y``
+- ``CONFIG_QUOTATREE=y``
+- ``CONFIG_QUOTACTL=y``
+
+E2fsprogs Support
+~~~~~~~~~~~~~~~~~
+
+Support for the quota feature first appeared in e2fsprogs 1.42, although
+it is not enabled by default. It must enabled via a compile-time
+configuration option, --enable-quota. There are bug fixes which have
+been applied in various 1.42.x maintenance branch releases, so users who
+wish to experiment with the quota feature are strongly encouraged
+upgrade to the latest e2fsprogs 1.42.x maintenance release. As of this
+writing the following bugs are still in e2fsprogs 1.42.7, which means
+use of file systems with the quota feature in production can not be
+recommended:
+
+- The e2fsck check of the on-disk quota inodes won't notice if there is
+  a missing uid record. (i.e., if some uid, say daemon owns a bunch of
+  files, but that uid record is not in the quota inode, e2fsck won't say
+  boo.)
+- If e2fsck *does* notice a discrepancy between the usage information
+  recorded in the hidden quota inodes, and the actual number of blocks
+  used by a particular user id or group id, it will overwrite the user
+  or group quota inode with all of the information it has.
+  Unfortunately, in the process it will zero out all of the current
+  quota limits set. This is unfortunate....
diff --git a/Documentation/filesystems/ext4/super.rst b/Documentation/filesystems/ext4/super.rst
index 04ff079a2..2a9e1438f 100644
--- a/Documentation/filesystems/ext4/super.rst
+++ b/Documentation/filesystems/ext4/super.rst
@@ -404,11 +404,11 @@ The ext4 superblock is laid out as follows in
    * - 0x240
      - \_\_le32
      - s\_usr\_quota\_inum
-     - Inode number of user `quota <quota>`__ file.
+     - Inode number of user :ref:`quota <quota>` file.
    * - 0x244
      - \_\_le32
      - s\_grp\_quota\_inum
-     - Inode number of group `quota <quota>`__ file.
+     - Inode number of group :ref:`quota <quota>` file.
    * - 0x248
      - \_\_le32
      - s\_overhead\_blocks
@@ -678,7 +678,7 @@ the following:
    * - 0x80
      - This filesystem has a snapshot (RO\_COMPAT\_HAS\_SNAPSHOT).
    * - 0x100
-     - `Quota <Quota>`__ (RO\_COMPAT\_QUOTA).
+     - :ref:`Quota <quota>` (RO\_COMPAT\_QUOTA).
    * - 0x200
      - This filesystem supports “bigalloc”, which means that file extents are
        tracked in units of clusters (of blocks) instead of blocks
-- 
2.23.0


                 reply	other threads:[~2019-09-08 17:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190908175123.GA14145@fa19-cs241-404.cs.illinois.edu \
    --to=ayush.ranjan98@gmail.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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).