ocfs2: Decrement refcount when truncating refcounted extents.

Add 'Decrement refcount for delete' in to the normal truncate
process. So for a refcounted extent record, call refcount rec
decrementation instead of cluster free.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
This commit is contained in:
Tao Ma
2009-08-18 11:29:12 +08:00
committed by Joel Becker
parent 1aa75fea64
commit bcbbb24a6a
4 changed files with 290 additions and 7 deletions

View File

@@ -45,4 +45,10 @@ int ocfs2_decrease_refcount(struct inode *inode,
handle_t *handle, u32 cpos, u32 len,
struct ocfs2_alloc_context *meta_ac,
struct ocfs2_cached_dealloc_ctxt *dealloc);
int ocfs2_prepare_refcount_change_for_del(struct inode *inode,
struct buffer_head *di_bh,
u64 phys_blkno,
u32 clusters,
int *credits,
struct ocfs2_alloc_context **meta_ac);
#endif /* OCFS2_REFCOUNTTREE_H */