diff options
author | Tao Ma <tao.ma@oracle.com> | 2008-11-12 01:27:00 +0100 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-01-05 17:34:19 +0100 |
commit | 78f30c314a74b9dc5d7368d96fe4be883d9a3a04 (patch) | |
tree | 07904e23f2d2c1287869daecc9f27052b71d67a5 /fs/ocfs2/alloc.h | |
parent | ocfs2/xattr: Move clusters free into dealloc. (diff) | |
download | linux-78f30c314a74b9dc5d7368d96fe4be883d9a3a04.tar.xz linux-78f30c314a74b9dc5d7368d96fe4be883d9a3a04.zip |
ocfs2/xattr: Reserve meta/data at the beginning of ocfs2_xattr_set.
In ocfs2 xattr set, we reserve metadata and clusters in any place
they are needed. It is time-consuming and ineffective, so this
patch try to reserve metadata and clusters at the beginning of
ocfs2_xattr_set.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/alloc.h')
-rw-r--r-- | fs/ocfs2/alloc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ocfs2/alloc.h b/fs/ocfs2/alloc.h index c301cf225f0b..3eb735eedae6 100644 --- a/fs/ocfs2/alloc.h +++ b/fs/ocfs2/alloc.h @@ -176,6 +176,10 @@ static inline void ocfs2_init_dealloc_ctxt(struct ocfs2_cached_dealloc_ctxt *c) } int ocfs2_cache_cluster_dealloc(struct ocfs2_cached_dealloc_ctxt *ctxt, u64 blkno, unsigned int bit); +static inline int ocfs2_dealloc_has_cluster(struct ocfs2_cached_dealloc_ctxt *c) +{ + return c->c_global_allocator != NULL; +} int ocfs2_run_deallocs(struct ocfs2_super *osb, struct ocfs2_cached_dealloc_ctxt *ctxt); |