]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.suse/ocfs2-Comment-struct-ocfs2_extent_tree_operations.patch
Add a patch to fix Intel E100 wake-on-lan problems.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.suse / ocfs2-Comment-struct-ocfs2_extent_tree_operations.patch
1 From: Joel Becker <joel.becker@oracle.com>
2 Subject: ocfs2: Comment struct ocfs2_extent_tree_operations.
3 Patch-mainline: 2.6.28?
4 References: FATE302067
5
6 struct ocfs2_extent_tree_operations provides methods for the different
7 on-disk btrees in ocfs2. Describing what those methods do is probably a
8 good idea.
9
10 Signed-off-by: Joel Becker <joel.becker@oracle.com>
11 Acked-by: Mark Fasheh <mark.fasheh@suse.com>
12 ---
13 fs/ocfs2/alloc.c | 45 +++++++++++++++++++++++++++++++++++++++++++--
14 1 file changed, 43 insertions(+), 2 deletions(-)
15
16 --- a/fs/ocfs2/alloc.c
17 +++ b/fs/ocfs2/alloc.c
18 @@ -50,21 +50,62 @@
19 #include "buffer_head_io.h"
20
21
22 +/*
23 + * Operations for a specific extent tree type.
24 + *
25 + * To implement an on-disk btree (extent tree) type in ocfs2, add
26 + * an ocfs2_extent_tree_operations structure and the matching
27 + * ocfs2_get_<thingy>_extent_tree() function. That's pretty much it
28 + * for the allocation portion of the extent tree.
29 + */
30 struct ocfs2_extent_tree_operations {
31 + /*
32 + * last_eb_blk is the block number of the right most leaf extent
33 + * block. Most on-disk structures containing an extent tree store
34 + * this value for fast access. The ->eo_set_last_eb_blk() and
35 + * ->eo_get_last_eb_blk() operations access this value. They are
36 + * both required.
37 + */
38 void (*eo_set_last_eb_blk)(struct ocfs2_extent_tree *et,
39 u64 blkno);
40 u64 (*eo_get_last_eb_blk)(struct ocfs2_extent_tree *et);
41 +
42 + /*
43 + * The on-disk structure usually keeps track of how many total
44 + * clusters are stored in this extent tree. This function updates
45 + * that value. new_clusters is the delta, and must be
46 + * added to the total. Required.
47 + */
48 void (*eo_update_clusters)(struct inode *inode,
49 struct ocfs2_extent_tree *et,
50 u32 new_clusters);
51 +
52 + /*
53 + * If ->eo_insert_check() exists, it is called before rec is
54 + * inserted into the extent tree. It is optional.
55 + */
56 int (*eo_insert_check)(struct inode *inode,
57 struct ocfs2_extent_tree *et,
58 struct ocfs2_extent_rec *rec);
59 int (*eo_sanity_check)(struct inode *inode, struct ocfs2_extent_tree *et);
60
61 - /* These are internal to ocfs2_extent_tree and don't have
62 - * accessor functions */
63 + /*
64 + * --------------------------------------------------------------
65 + * The remaining are internal to ocfs2_extent_tree and don't have
66 + * accessor functions
67 + */
68 +
69 + /*
70 + * ->eo_fill_root_el() takes et->et_object and sets et->et_root_el.
71 + * It is required.
72 + */
73 void (*eo_fill_root_el)(struct ocfs2_extent_tree *et);
74 +
75 + /*
76 + * ->eo_fill_max_leaf_clusters sets et->et_max_leaf_clusters if
77 + * it exists. If it does not, et->et_max_leaf_clusters is set
78 + * to 0 (unlimited). Optional.
79 + */
80 void (*eo_fill_max_leaf_clusters)(struct inode *inode,
81 struct ocfs2_extent_tree *et);
82 };