summaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorTheodore Ts'o2011-09-10 00:50:51 +0200
committerTheodore Ts'o2011-09-10 00:50:51 +0200
commit84130193e0e6568dfdfb823f0e1e19aec80aff6e (patch)
tree799534ea6cd551ba346e32da2ee2f363851a3257 /fs/ext4/ext4.h
parentext4: teach mballoc preallocation code about bigalloc clusters (diff)
downloadkernel-qcow2-linux-84130193e0e6568dfdfb823f0e1e19aec80aff6e.tar.gz
kernel-qcow2-linux-84130193e0e6568dfdfb823f0e1e19aec80aff6e.tar.xz
kernel-qcow2-linux-84130193e0e6568dfdfb823f0e1e19aec80aff6e.zip
ext4: teach ext4_free_blocks() about bigalloc and clusters
The ext4_free_blocks() function now has two new flags that indicate whether a partial cluster at the beginning or the end of the block extents should be freed or not. That will be up the caller (i.e., truncate), who can figure out whether partial clusters at the beginning or the end of a block range can be freed. We also have to update the ext4_mb_free_metadata() and release_blocks_on_commit() machinery to be cluster-based, since it is used by ext4_free_blocks(). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 803cfa42e1e8..030bfc1cb59d 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -539,6 +539,8 @@ struct ext4_new_group_data {
#define EXT4_FREE_BLOCKS_FORGET 0x0002
#define EXT4_FREE_BLOCKS_VALIDATED 0x0004
#define EXT4_FREE_BLOCKS_NO_QUOT_UPDATE 0x0008
+#define EXT4_FREE_BLOCKS_NOFREE_FIRST_CLUSTER 0x0010
+#define EXT4_FREE_BLOCKS_NOFREE_LAST_CLUSTER 0x0020
/*
* Flags used by ext4_discard_partial_page_buffers