summaryrefslogtreecommitdiff
path: root/Kbuild
diff options
context:
space:
mode:
authorEric Whitney <enwlinux@gmail.com>2018-10-01 21:24:08 +0300
committerTheodore Ts'o <tytso@mit.edu>2018-10-01 21:24:08 +0300
commitb6bf9171ef5c37b66d446378ba63af5339a56a97 (patch)
tree7e82ed99dbf97e0516ef5aaf4064f76e7cb0d04f /Kbuild
parent0b02f4c0d6d9e2c611dfbdd4317193e9dca740e6 (diff)
downloadlinux-b6bf9171ef5c37b66d446378ba63af5339a56a97.tar.xz
ext4: reduce reserved cluster count by number of allocated clusters
Ext4 does not always reduce the reserved cluster count by the number of clusters allocated when mapping a delayed extent. It sometimes adds back one or more clusters after allocation if delalloc blocks adjacent to the range allocated by ext4_ext_map_blocks() share the clusters newly allocated for that range. However, this overcounts the number of clusters needed to satisfy future mapping requests (holding one or more reservations for clusters that have already been allocated) and premature ENOSPC and quota failures, etc., result. Ext4 also does not reduce the reserved cluster count when allocating clusters for non-delayed allocated writes that have previously been reserved for delayed writes. This also results in overcounts. To make it possible to handle reserved cluster accounting for fallocated regions in the same manner as used for other non-delayed writes, do the reserved cluster accounting for them at the time of allocation. In the current code, this is only done later when a delayed extent sharing the fallocated region is finally mapped. Address comment correcting handling of unsigned long long constant from Jan Kara's review of RFC version of this patch. Signed-off-by: Eric Whitney <enwlinux@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions