summaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorEric Whitney <enwlinux@gmail.com>2018-10-01 14:19:37 -0400
committerTheodore Ts'o <tytso@mit.edu>2018-10-01 14:19:37 -0400
commit0b02f4c0d6d9e2c611dfbdd4317193e9dca740e6 (patch)
treea07c3e6aaad97caccc4e91214e8779b0a06bd901 /fs/ext4/ext4.h
parent1dc0aa46e74a3366e12f426b7caaca477853e9c3 (diff)
ext4: fix reserved cluster accounting at delayed write time
The code in ext4_da_map_blocks sometimes reserves space for more delayed allocated clusters than it should, resulting in premature ENOSPC, exceeded quota, and inaccurate free space reporting. Fix this by checking for written and unwritten blocks shared in the same cluster with the newly delayed allocated block. A cluster reservation should not be made for a cluster for which physical space has already been allocated. Signed-off-by: Eric Whitney <enwlinux@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index fc0f41dbf90b..d85fd5c8a2c4 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -3155,6 +3155,7 @@ extern int ext4_swap_extents(handle_t *handle, struct inode *inode1,
3155 struct inode *inode2, ext4_lblk_t lblk1, 3155 struct inode *inode2, ext4_lblk_t lblk1,
3156 ext4_lblk_t lblk2, ext4_lblk_t count, 3156 ext4_lblk_t lblk2, ext4_lblk_t count,
3157 int mark_unwritten,int *err); 3157 int mark_unwritten,int *err);
3158extern int ext4_clu_mapped(struct inode *inode, ext4_lblk_t lclu);
3158 3159
3159/* move_extent.c */ 3160/* move_extent.c */
3160extern void ext4_double_down_write_data_sem(struct inode *first, 3161extern void ext4_double_down_write_data_sem(struct inode *first,