diff options
author | Tristan Ye <tristan.ye@oracle.com> | 2011-05-24 04:42:09 -0400 |
---|---|---|
committer | Tristan Ye <tristan.ye@oracle.com> | 2011-05-25 03:17:08 -0400 |
commit | 028ba5df63fa9fc18045bc1e9b48cdd43727e1c5 (patch) | |
tree | 2a3f20f03a0f82bc2ffd87b68b1649823b178e63 /fs/ocfs2/move_extents.c | |
parent | 220ebc4334326bc23e4c4c3f076dc5a58ec293f6 (diff) |
Ocfs2/move_extents: Add basic framework and source files for extent moving.
Adding new files move_extents.[c|h] and fill it with nothing but
only a context structure.
Signed-off-by: Tristan Ye <tristan.ye@oracle.com>
Diffstat (limited to 'fs/ocfs2/move_extents.c')
-rw-r--r-- | fs/ocfs2/move_extents.c | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c new file mode 100644 index 000000000000..6311c15356f7 --- /dev/null +++ b/fs/ocfs2/move_extents.c | |||
@@ -0,0 +1,56 @@ | |||
1 | /* -*- mode: c; c-basic-offset: 8; -*- | ||
2 | * vim: noexpandtab sw=8 ts=8 sts=0: | ||
3 | * | ||
4 | * move_extents.c | ||
5 | * | ||
6 | * Copyright (C) 2011 Oracle. All rights reserved. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public | ||
10 | * License version 2 as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #include <linux/fs.h> | ||
18 | #include <linux/types.h> | ||
19 | #include <linux/mount.h> | ||
20 | #include <linux/swap.h> | ||
21 | |||
22 | #include <cluster/masklog.h> | ||
23 | |||
24 | #include "ocfs2.h" | ||
25 | #include "ocfs2_ioctl.h" | ||
26 | |||
27 | #include "alloc.h" | ||
28 | #include "aops.h" | ||
29 | #include "dlmglue.h" | ||
30 | #include "extent_map.h" | ||
31 | #include "inode.h" | ||
32 | #include "journal.h" | ||
33 | #include "suballoc.h" | ||
34 | #include "uptodate.h" | ||
35 | #include "super.h" | ||
36 | #include "dir.h" | ||
37 | #include "buffer_head_io.h" | ||
38 | #include "sysfile.h" | ||
39 | #include "suballoc.h" | ||
40 | #include "refcounttree.h" | ||
41 | #include "move_extents.h" | ||
42 | |||
43 | struct ocfs2_move_extents_context { | ||
44 | struct inode *inode; | ||
45 | struct file *file; | ||
46 | int auto_defrag; | ||
47 | int credits; | ||
48 | u32 new_phys_cpos; | ||
49 | u32 clusters_moved; | ||
50 | u64 refcount_loc; | ||
51 | struct ocfs2_move_extents *range; | ||
52 | struct ocfs2_extent_tree et; | ||
53 | struct ocfs2_alloc_context *meta_ac; | ||
54 | struct ocfs2_alloc_context *data_ac; | ||
55 | struct ocfs2_cached_dealloc_ctxt dealloc; | ||
56 | }; | ||