diff options
author | Theodore Ts'o <tytso@mit.edu> | 2012-08-17 09:48:17 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-08-17 09:48:17 -0400 |
commit | df981d03eeff7971ac7e6ff37000bfa702327ef1 (patch) | |
tree | 4e944139b9e45c4af910c517b57f2d9bc7c81a1a /Documentation/filesystems | |
parent | 01fc48e8929e45e67527200017cff4e74e4ba054 (diff) |
ext4: add max_dir_size_kb mount option
Very large directories can cause significant performance problems, or
perhaps even invoke the OOM killer, if the process is running in a
highly constrained memory environment (whether it is VM's with a small
amount of memory or in a small memory cgroup).
So it is useful, in cloud server/data center environments, to be able
to set a filesystem-wide cap on the maximum size of a directory, to
ensure that directories never get larger than a sane size. We do this
via a new mount option, max_dir_size_kb. If there is an attempt to
grow the directory larger than max_dir_size_kb, the system call will
return ENOSPC instead.
Google-Bug-Id: 6863013
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/ext4.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt index 1b7f9acbcbbe..104322bf378c 100644 --- a/Documentation/filesystems/ext4.txt +++ b/Documentation/filesystems/ext4.txt | |||
@@ -375,6 +375,16 @@ dioread_nolock locking. If the dioread_nolock option is specified | |||
375 | Because of the restrictions this options comprises | 375 | Because of the restrictions this options comprises |
376 | it is off by default (e.g. dioread_lock). | 376 | it is off by default (e.g. dioread_lock). |
377 | 377 | ||
378 | max_dir_size_kb=n This limits the size of directories so that any | ||
379 | attempt to expand them beyond the specified | ||
380 | limit in kilobytes will cause an ENOSPC error. | ||
381 | This is useful in memory constrained | ||
382 | environments, where a very large directory can | ||
383 | cause severe performance problems or even | ||
384 | provoke the Out Of Memory killer. (For example, | ||
385 | if there is only 512mb memory available, a 176mb | ||
386 | directory may seriously cramp the system's style.) | ||
387 | |||
378 | i_version Enable 64-bit inode version support. This option is | 388 | i_version Enable 64-bit inode version support. This option is |
379 | off by default. | 389 | off by default. |
380 | 390 | ||