summaryrefslogtreecommitdiff
path: root/fs/ocfs2/suballoc.h
diff options
context:
space:
mode:
authorMark Fasheh <mfasheh@suse.com>2010-03-12 05:31:09 +0300
committerJoel Becker <joel.becker@oracle.com>2010-03-24 04:22:40 +0300
commitb4414eea0e7b9c134262c801a87e338bf675962c (patch)
tree09829d99527f1da69cc19074a2d3baef1195955e /fs/ocfs2/suballoc.h
parentb23179681c90a55e2a2083e1dde9f727ecffb2b7 (diff)
downloadlinux-b4414eea0e7b9c134262c801a87e338bf675962c.tar.xz
ocfs2: Clear undo bits when local alloc is freed
When the local alloc file changes windows, unused bits are freed back to the global bitmap. By defnition, those bits can not be in use by any file. Also, the local alloc will never have been able to allocate those bits if they were part of a previous truncate. Therefore it makes sense that we should clear unused local alloc bits in the undo buffer so that they can be used immediatly. [ Modified to call it ocfs2_release_clusters() -- Joel ] Signed-off-by: Mark Fasheh <mfasheh@suse.com> Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/suballoc.h')
-rw-r--r--fs/ocfs2/suballoc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ocfs2/suballoc.h b/fs/ocfs2/suballoc.h
index fa60723c43e8..e0f46df357e6 100644
--- a/fs/ocfs2/suballoc.h
+++ b/fs/ocfs2/suballoc.h
@@ -127,6 +127,11 @@ int ocfs2_free_clusters(handle_t *handle,
struct buffer_head *bitmap_bh,
u64 start_blk,
unsigned int num_clusters);
+int ocfs2_release_clusters(handle_t *handle,
+ struct inode *bitmap_inode,
+ struct buffer_head *bitmap_bh,
+ u64 start_blk,
+ unsigned int num_clusters);
static inline u64 ocfs2_which_suballoc_group(u64 block, unsigned int bit)
{