diff options
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/alloc.c | 32 | ||||
-rw-r--r-- | fs/ocfs2/alloc.h | 2 | ||||
-rw-r--r-- | fs/ocfs2/aops.c | 8 | ||||
-rw-r--r-- | fs/ocfs2/aops.h | 2 | ||||
-rw-r--r-- | fs/ocfs2/dir.c | 4 | ||||
-rw-r--r-- | fs/ocfs2/dir.h | 2 | ||||
-rw-r--r-- | fs/ocfs2/file.c | 18 | ||||
-rw-r--r-- | fs/ocfs2/file.h | 4 | ||||
-rw-r--r-- | fs/ocfs2/inode.c | 6 | ||||
-rw-r--r-- | fs/ocfs2/inode.h | 2 | ||||
-rw-r--r-- | fs/ocfs2/ioctl.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/journal.c | 95 | ||||
-rw-r--r-- | fs/ocfs2/journal.h | 21 | ||||
-rw-r--r-- | fs/ocfs2/localalloc.c | 18 | ||||
-rw-r--r-- | fs/ocfs2/localalloc.h | 2 | ||||
-rw-r--r-- | fs/ocfs2/namei.c | 38 | ||||
-rw-r--r-- | fs/ocfs2/namei.h | 2 | ||||
-rw-r--r-- | fs/ocfs2/ocfs2.h | 2 | ||||
-rw-r--r-- | fs/ocfs2/suballoc.c | 44 | ||||
-rw-r--r-- | fs/ocfs2/suballoc.h | 12 |
20 files changed, 130 insertions, 186 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 354817acf8b3..85a048b7a67b 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -52,14 +52,14 @@ static int ocfs2_extent_contig(struct inode *inode, | |||
52 | u64 blkno); | 52 | u64 blkno); |
53 | 53 | ||
54 | static int ocfs2_create_new_meta_bhs(struct ocfs2_super *osb, | 54 | static int ocfs2_create_new_meta_bhs(struct ocfs2_super *osb, |
55 | struct ocfs2_journal_handle *handle, | 55 | handle_t *handle, |
56 | struct inode *inode, | 56 | struct inode *inode, |
57 | int wanted, | 57 | int wanted, |
58 | struct ocfs2_alloc_context *meta_ac, | 58 | struct ocfs2_alloc_context *meta_ac, |
59 | struct buffer_head *bhs[]); | 59 | struct buffer_head *bhs[]); |
60 | 60 | ||
61 | static int ocfs2_add_branch(struct ocfs2_super *osb, | 61 | static int ocfs2_add_branch(struct ocfs2_super *osb, |
62 | struct ocfs2_journal_handle *handle, | 62 | handle_t *handle, |
63 | struct inode *inode, | 63 | struct inode *inode, |
64 | struct buffer_head *fe_bh, | 64 | struct buffer_head *fe_bh, |
65 | struct buffer_head *eb_bh, | 65 | struct buffer_head *eb_bh, |
@@ -67,14 +67,14 @@ static int ocfs2_add_branch(struct ocfs2_super *osb, | |||
67 | struct ocfs2_alloc_context *meta_ac); | 67 | struct ocfs2_alloc_context *meta_ac); |
68 | 68 | ||
69 | static int ocfs2_shift_tree_depth(struct ocfs2_super *osb, | 69 | static int ocfs2_shift_tree_depth(struct ocfs2_super *osb, |
70 | struct ocfs2_journal_handle *handle, | 70 | handle_t *handle, |
71 | struct inode *inode, | 71 | struct inode *inode, |
72 | struct buffer_head *fe_bh, | 72 | struct buffer_head *fe_bh, |
73 | struct ocfs2_alloc_context *meta_ac, | 73 | struct ocfs2_alloc_context *meta_ac, |
74 | struct buffer_head **ret_new_eb_bh); | 74 | struct buffer_head **ret_new_eb_bh); |
75 | 75 | ||
76 | static int ocfs2_do_insert_extent(struct ocfs2_super *osb, | 76 | static int ocfs2_do_insert_extent(struct ocfs2_super *osb, |
77 | struct ocfs2_journal_handle *handle, | 77 | handle_t *handle, |
78 | struct inode *inode, | 78 | struct inode *inode, |
79 | struct buffer_head *fe_bh, | 79 | struct buffer_head *fe_bh, |
80 | u64 blkno, | 80 | u64 blkno, |
@@ -152,7 +152,7 @@ bail: | |||
152 | * l_count for you | 152 | * l_count for you |
153 | */ | 153 | */ |
154 | static int ocfs2_create_new_meta_bhs(struct ocfs2_super *osb, | 154 | static int ocfs2_create_new_meta_bhs(struct ocfs2_super *osb, |
155 | struct ocfs2_journal_handle *handle, | 155 | handle_t *handle, |
156 | struct inode *inode, | 156 | struct inode *inode, |
157 | int wanted, | 157 | int wanted, |
158 | struct ocfs2_alloc_context *meta_ac, | 158 | struct ocfs2_alloc_context *meta_ac, |
@@ -253,7 +253,7 @@ bail: | |||
253 | * contain a single record with e_clusters == 0. | 253 | * contain a single record with e_clusters == 0. |
254 | */ | 254 | */ |
255 | static int ocfs2_add_branch(struct ocfs2_super *osb, | 255 | static int ocfs2_add_branch(struct ocfs2_super *osb, |
256 | struct ocfs2_journal_handle *handle, | 256 | handle_t *handle, |
257 | struct inode *inode, | 257 | struct inode *inode, |
258 | struct buffer_head *fe_bh, | 258 | struct buffer_head *fe_bh, |
259 | struct buffer_head *eb_bh, | 259 | struct buffer_head *eb_bh, |
@@ -418,7 +418,7 @@ bail: | |||
418 | * after this call. | 418 | * after this call. |
419 | */ | 419 | */ |
420 | static int ocfs2_shift_tree_depth(struct ocfs2_super *osb, | 420 | static int ocfs2_shift_tree_depth(struct ocfs2_super *osb, |
421 | struct ocfs2_journal_handle *handle, | 421 | handle_t *handle, |
422 | struct inode *inode, | 422 | struct inode *inode, |
423 | struct buffer_head *fe_bh, | 423 | struct buffer_head *fe_bh, |
424 | struct ocfs2_alloc_context *meta_ac, | 424 | struct ocfs2_alloc_context *meta_ac, |
@@ -520,7 +520,7 @@ bail: | |||
520 | * down. | 520 | * down. |
521 | */ | 521 | */ |
522 | static int ocfs2_do_insert_extent(struct ocfs2_super *osb, | 522 | static int ocfs2_do_insert_extent(struct ocfs2_super *osb, |
523 | struct ocfs2_journal_handle *handle, | 523 | handle_t *handle, |
524 | struct inode *inode, | 524 | struct inode *inode, |
525 | struct buffer_head *fe_bh, | 525 | struct buffer_head *fe_bh, |
526 | u64 start_blk, | 526 | u64 start_blk, |
@@ -809,7 +809,7 @@ bail: | |||
809 | 809 | ||
810 | /* the caller needs to update fe->i_clusters */ | 810 | /* the caller needs to update fe->i_clusters */ |
811 | int ocfs2_insert_extent(struct ocfs2_super *osb, | 811 | int ocfs2_insert_extent(struct ocfs2_super *osb, |
812 | struct ocfs2_journal_handle *handle, | 812 | handle_t *handle, |
813 | struct inode *inode, | 813 | struct inode *inode, |
814 | struct buffer_head *fe_bh, | 814 | struct buffer_head *fe_bh, |
815 | u64 start_blk, | 815 | u64 start_blk, |
@@ -951,7 +951,7 @@ static int ocfs2_truncate_log_can_coalesce(struct ocfs2_truncate_log *tl, | |||
951 | } | 951 | } |
952 | 952 | ||
953 | static int ocfs2_truncate_log_append(struct ocfs2_super *osb, | 953 | static int ocfs2_truncate_log_append(struct ocfs2_super *osb, |
954 | struct ocfs2_journal_handle *handle, | 954 | handle_t *handle, |
955 | u64 start_blk, | 955 | u64 start_blk, |
956 | unsigned int num_clusters) | 956 | unsigned int num_clusters) |
957 | { | 957 | { |
@@ -1034,7 +1034,7 @@ bail: | |||
1034 | } | 1034 | } |
1035 | 1035 | ||
1036 | static int ocfs2_replay_truncate_records(struct ocfs2_super *osb, | 1036 | static int ocfs2_replay_truncate_records(struct ocfs2_super *osb, |
1037 | struct ocfs2_journal_handle *handle, | 1037 | handle_t *handle, |
1038 | struct inode *data_alloc_inode, | 1038 | struct inode *data_alloc_inode, |
1039 | struct buffer_head *data_alloc_bh) | 1039 | struct buffer_head *data_alloc_bh) |
1040 | { | 1040 | { |
@@ -1074,7 +1074,7 @@ static int ocfs2_replay_truncate_records(struct ocfs2_super *osb, | |||
1074 | /* TODO: Perhaps we can calculate the bulk of the | 1074 | /* TODO: Perhaps we can calculate the bulk of the |
1075 | * credits up front rather than extending like | 1075 | * credits up front rather than extending like |
1076 | * this. */ | 1076 | * this. */ |
1077 | status = ocfs2_extend_trans(handle->k_handle, | 1077 | status = ocfs2_extend_trans(handle, |
1078 | OCFS2_TRUNCATE_LOG_FLUSH_ONE_REC); | 1078 | OCFS2_TRUNCATE_LOG_FLUSH_ONE_REC); |
1079 | if (status < 0) { | 1079 | if (status < 0) { |
1080 | mlog_errno(status); | 1080 | mlog_errno(status); |
@@ -1113,7 +1113,7 @@ static int __ocfs2_flush_truncate_log(struct ocfs2_super *osb) | |||
1113 | { | 1113 | { |
1114 | int status; | 1114 | int status; |
1115 | unsigned int num_to_flush; | 1115 | unsigned int num_to_flush; |
1116 | struct ocfs2_journal_handle *handle; | 1116 | handle_t *handle; |
1117 | struct inode *tl_inode = osb->osb_tl_inode; | 1117 | struct inode *tl_inode = osb->osb_tl_inode; |
1118 | struct inode *data_alloc_inode = NULL; | 1118 | struct inode *data_alloc_inode = NULL; |
1119 | struct buffer_head *tl_bh = osb->osb_tl_bh; | 1119 | struct buffer_head *tl_bh = osb->osb_tl_bh; |
@@ -1339,7 +1339,7 @@ int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb, | |||
1339 | int i; | 1339 | int i; |
1340 | unsigned int clusters, num_recs, start_cluster; | 1340 | unsigned int clusters, num_recs, start_cluster; |
1341 | u64 start_blk; | 1341 | u64 start_blk; |
1342 | struct ocfs2_journal_handle *handle; | 1342 | handle_t *handle; |
1343 | struct inode *tl_inode = osb->osb_tl_inode; | 1343 | struct inode *tl_inode = osb->osb_tl_inode; |
1344 | struct ocfs2_truncate_log *tl; | 1344 | struct ocfs2_truncate_log *tl; |
1345 | 1345 | ||
@@ -1534,7 +1534,7 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb, | |||
1534 | struct inode *inode, | 1534 | struct inode *inode, |
1535 | struct buffer_head *fe_bh, | 1535 | struct buffer_head *fe_bh, |
1536 | struct buffer_head *old_last_eb_bh, | 1536 | struct buffer_head *old_last_eb_bh, |
1537 | struct ocfs2_journal_handle *handle, | 1537 | handle_t *handle, |
1538 | struct ocfs2_truncate_context *tc) | 1538 | struct ocfs2_truncate_context *tc) |
1539 | { | 1539 | { |
1540 | int status, i, depth; | 1540 | int status, i, depth; |
@@ -1773,7 +1773,7 @@ int ocfs2_commit_truncate(struct ocfs2_super *osb, | |||
1773 | struct ocfs2_extent_block *eb; | 1773 | struct ocfs2_extent_block *eb; |
1774 | struct ocfs2_extent_list *el; | 1774 | struct ocfs2_extent_list *el; |
1775 | struct buffer_head *last_eb_bh; | 1775 | struct buffer_head *last_eb_bh; |
1776 | struct ocfs2_journal_handle *handle = NULL; | 1776 | handle_t *handle = NULL; |
1777 | struct inode *tl_inode = osb->osb_tl_inode; | 1777 | struct inode *tl_inode = osb->osb_tl_inode; |
1778 | 1778 | ||
1779 | mlog_entry_void(); | 1779 | mlog_entry_void(); |
diff --git a/fs/ocfs2/alloc.h b/fs/ocfs2/alloc.h index 12ba897743f4..0b82e8044325 100644 --- a/fs/ocfs2/alloc.h +++ b/fs/ocfs2/alloc.h | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | struct ocfs2_alloc_context; | 29 | struct ocfs2_alloc_context; |
30 | int ocfs2_insert_extent(struct ocfs2_super *osb, | 30 | int ocfs2_insert_extent(struct ocfs2_super *osb, |
31 | struct ocfs2_journal_handle *handle, | 31 | handle_t *handle, |
32 | struct inode *inode, | 32 | struct inode *inode, |
33 | struct buffer_head *fe_bh, | 33 | struct buffer_head *fe_bh, |
34 | u64 blkno, | 34 | u64 blkno, |
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index fcdcdf6aa352..2f7268e81520 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -355,13 +355,13 @@ static int walk_page_buffers( handle_t *handle, | |||
355 | return ret; | 355 | return ret; |
356 | } | 356 | } |
357 | 357 | ||
358 | struct ocfs2_journal_handle *ocfs2_start_walk_page_trans(struct inode *inode, | 358 | handle_t *ocfs2_start_walk_page_trans(struct inode *inode, |
359 | struct page *page, | 359 | struct page *page, |
360 | unsigned from, | 360 | unsigned from, |
361 | unsigned to) | 361 | unsigned to) |
362 | { | 362 | { |
363 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 363 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
364 | struct ocfs2_journal_handle *handle = NULL; | 364 | handle_t *handle = NULL; |
365 | int ret = 0; | 365 | int ret = 0; |
366 | 366 | ||
367 | handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); | 367 | handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); |
@@ -372,7 +372,7 @@ struct ocfs2_journal_handle *ocfs2_start_walk_page_trans(struct inode *inode, | |||
372 | } | 372 | } |
373 | 373 | ||
374 | if (ocfs2_should_order_data(inode)) { | 374 | if (ocfs2_should_order_data(inode)) { |
375 | ret = walk_page_buffers(handle->k_handle, | 375 | ret = walk_page_buffers(handle, |
376 | page_buffers(page), | 376 | page_buffers(page), |
377 | from, to, NULL, | 377 | from, to, NULL, |
378 | ocfs2_journal_dirty_data); | 378 | ocfs2_journal_dirty_data); |
@@ -394,7 +394,7 @@ static int ocfs2_commit_write(struct file *file, struct page *page, | |||
394 | int ret; | 394 | int ret; |
395 | struct buffer_head *di_bh = NULL; | 395 | struct buffer_head *di_bh = NULL; |
396 | struct inode *inode = page->mapping->host; | 396 | struct inode *inode = page->mapping->host; |
397 | struct ocfs2_journal_handle *handle = NULL; | 397 | handle_t *handle = NULL; |
398 | struct ocfs2_dinode *di; | 398 | struct ocfs2_dinode *di; |
399 | 399 | ||
400 | mlog_entry("(0x%p, 0x%p, %u, %u)\n", file, page, from, to); | 400 | mlog_entry("(0x%p, 0x%p, %u, %u)\n", file, page, from, to); |
diff --git a/fs/ocfs2/aops.h b/fs/ocfs2/aops.h index e88c3f0b8fa9..f446a15eab88 100644 --- a/fs/ocfs2/aops.h +++ b/fs/ocfs2/aops.h | |||
@@ -25,7 +25,7 @@ | |||
25 | int ocfs2_prepare_write_nolock(struct inode *inode, struct page *page, | 25 | int ocfs2_prepare_write_nolock(struct inode *inode, struct page *page, |
26 | unsigned from, unsigned to); | 26 | unsigned from, unsigned to); |
27 | 27 | ||
28 | struct ocfs2_journal_handle *ocfs2_start_walk_page_trans(struct inode *inode, | 28 | handle_t *ocfs2_start_walk_page_trans(struct inode *inode, |
29 | struct page *page, | 29 | struct page *page, |
30 | unsigned from, | 30 | unsigned from, |
31 | unsigned to); | 31 | unsigned to); |
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index 036c891c1e17..5efea44d780d 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c | |||
@@ -340,7 +340,7 @@ int ocfs2_empty_dir(struct inode *inode) | |||
340 | 340 | ||
341 | /* returns a bh of the 1st new block in the allocation. */ | 341 | /* returns a bh of the 1st new block in the allocation. */ |
342 | int ocfs2_do_extend_dir(struct super_block *sb, | 342 | int ocfs2_do_extend_dir(struct super_block *sb, |
343 | struct ocfs2_journal_handle *handle, | 343 | handle_t *handle, |
344 | struct inode *dir, | 344 | struct inode *dir, |
345 | struct buffer_head *parent_fe_bh, | 345 | struct buffer_head *parent_fe_bh, |
346 | struct ocfs2_alloc_context *data_ac, | 346 | struct ocfs2_alloc_context *data_ac, |
@@ -398,7 +398,7 @@ static int ocfs2_extend_dir(struct ocfs2_super *osb, | |||
398 | struct ocfs2_dinode *fe = (struct ocfs2_dinode *) parent_fe_bh->b_data; | 398 | struct ocfs2_dinode *fe = (struct ocfs2_dinode *) parent_fe_bh->b_data; |
399 | struct ocfs2_alloc_context *data_ac = NULL; | 399 | struct ocfs2_alloc_context *data_ac = NULL; |
400 | struct ocfs2_alloc_context *meta_ac = NULL; | 400 | struct ocfs2_alloc_context *meta_ac = NULL; |
401 | struct ocfs2_journal_handle *handle = NULL; | 401 | handle_t *handle = NULL; |
402 | struct buffer_head *new_bh = NULL; | 402 | struct buffer_head *new_bh = NULL; |
403 | struct ocfs2_dir_entry * de; | 403 | struct ocfs2_dir_entry * de; |
404 | struct super_block *sb = osb->sb; | 404 | struct super_block *sb = osb->sb; |
diff --git a/fs/ocfs2/dir.h b/fs/ocfs2/dir.h index 5f614ec9649c..3f67e146864a 100644 --- a/fs/ocfs2/dir.h +++ b/fs/ocfs2/dir.h | |||
@@ -45,7 +45,7 @@ int ocfs2_prepare_dir_for_insert(struct ocfs2_super *osb, | |||
45 | struct buffer_head **ret_de_bh); | 45 | struct buffer_head **ret_de_bh); |
46 | struct ocfs2_alloc_context; | 46 | struct ocfs2_alloc_context; |
47 | int ocfs2_do_extend_dir(struct super_block *sb, | 47 | int ocfs2_do_extend_dir(struct super_block *sb, |
48 | struct ocfs2_journal_handle *handle, | 48 | handle_t *handle, |
49 | struct inode *dir, | 49 | struct inode *dir, |
50 | struct buffer_head *parent_fe_bh, | 50 | struct buffer_head *parent_fe_bh, |
51 | struct ocfs2_alloc_context *data_ac, | 51 | struct ocfs2_alloc_context *data_ac, |
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 100754de16b8..fe6b795b1a45 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -134,7 +134,7 @@ bail: | |||
134 | return (err < 0) ? -EIO : 0; | 134 | return (err < 0) ? -EIO : 0; |
135 | } | 135 | } |
136 | 136 | ||
137 | int ocfs2_set_inode_size(struct ocfs2_journal_handle *handle, | 137 | int ocfs2_set_inode_size(handle_t *handle, |
138 | struct inode *inode, | 138 | struct inode *inode, |
139 | struct buffer_head *fe_bh, | 139 | struct buffer_head *fe_bh, |
140 | u64 new_i_size) | 140 | u64 new_i_size) |
@@ -163,7 +163,7 @@ static int ocfs2_simple_size_update(struct inode *inode, | |||
163 | { | 163 | { |
164 | int ret; | 164 | int ret; |
165 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 165 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
166 | struct ocfs2_journal_handle *handle = NULL; | 166 | handle_t *handle = NULL; |
167 | 167 | ||
168 | handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); | 168 | handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); |
169 | if (handle == NULL) { | 169 | if (handle == NULL) { |
@@ -188,7 +188,7 @@ static int ocfs2_orphan_for_truncate(struct ocfs2_super *osb, | |||
188 | u64 new_i_size) | 188 | u64 new_i_size) |
189 | { | 189 | { |
190 | int status; | 190 | int status; |
191 | struct ocfs2_journal_handle *handle; | 191 | handle_t *handle; |
192 | 192 | ||
193 | mlog_entry_void(); | 193 | mlog_entry_void(); |
194 | 194 | ||
@@ -327,7 +327,7 @@ int ocfs2_do_extend_allocation(struct ocfs2_super *osb, | |||
327 | struct inode *inode, | 327 | struct inode *inode, |
328 | u32 clusters_to_add, | 328 | u32 clusters_to_add, |
329 | struct buffer_head *fe_bh, | 329 | struct buffer_head *fe_bh, |
330 | struct ocfs2_journal_handle *handle, | 330 | handle_t *handle, |
331 | struct ocfs2_alloc_context *data_ac, | 331 | struct ocfs2_alloc_context *data_ac, |
332 | struct ocfs2_alloc_context *meta_ac, | 332 | struct ocfs2_alloc_context *meta_ac, |
333 | enum ocfs2_alloc_restarted *reason_ret) | 333 | enum ocfs2_alloc_restarted *reason_ret) |
@@ -432,7 +432,7 @@ static int ocfs2_extend_allocation(struct inode *inode, | |||
432 | u32 prev_clusters; | 432 | u32 prev_clusters; |
433 | struct buffer_head *bh = NULL; | 433 | struct buffer_head *bh = NULL; |
434 | struct ocfs2_dinode *fe = NULL; | 434 | struct ocfs2_dinode *fe = NULL; |
435 | struct ocfs2_journal_handle *handle = NULL; | 435 | handle_t *handle = NULL; |
436 | struct ocfs2_alloc_context *data_ac = NULL; | 436 | struct ocfs2_alloc_context *data_ac = NULL; |
437 | struct ocfs2_alloc_context *meta_ac = NULL; | 437 | struct ocfs2_alloc_context *meta_ac = NULL; |
438 | enum ocfs2_alloc_restarted why; | 438 | enum ocfs2_alloc_restarted why; |
@@ -552,7 +552,7 @@ restarted_transaction: | |||
552 | credits = ocfs2_calc_extend_credits(osb->sb, | 552 | credits = ocfs2_calc_extend_credits(osb->sb, |
553 | fe, | 553 | fe, |
554 | clusters_to_add); | 554 | clusters_to_add); |
555 | status = ocfs2_extend_trans(handle->k_handle, credits); | 555 | status = ocfs2_extend_trans(handle, credits); |
556 | if (status < 0) { | 556 | if (status < 0) { |
557 | /* handle still has to be committed at | 557 | /* handle still has to be committed at |
558 | * this point. */ | 558 | * this point. */ |
@@ -610,7 +610,7 @@ static int ocfs2_write_zero_page(struct inode *inode, | |||
610 | struct page *page; | 610 | struct page *page; |
611 | unsigned long index; | 611 | unsigned long index; |
612 | unsigned int offset; | 612 | unsigned int offset; |
613 | struct ocfs2_journal_handle *handle = NULL; | 613 | handle_t *handle = NULL; |
614 | int ret; | 614 | int ret; |
615 | 615 | ||
616 | offset = (size & (PAGE_CACHE_SIZE-1)); /* Within page */ | 616 | offset = (size & (PAGE_CACHE_SIZE-1)); /* Within page */ |
@@ -775,7 +775,7 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr) | |||
775 | struct super_block *sb = inode->i_sb; | 775 | struct super_block *sb = inode->i_sb; |
776 | struct ocfs2_super *osb = OCFS2_SB(sb); | 776 | struct ocfs2_super *osb = OCFS2_SB(sb); |
777 | struct buffer_head *bh = NULL; | 777 | struct buffer_head *bh = NULL; |
778 | struct ocfs2_journal_handle *handle = NULL; | 778 | handle_t *handle = NULL; |
779 | 779 | ||
780 | mlog_entry("(0x%p, '%.*s')\n", dentry, | 780 | mlog_entry("(0x%p, '%.*s')\n", dentry, |
781 | dentry->d_name.len, dentry->d_name.name); | 781 | dentry->d_name.len, dentry->d_name.name); |
@@ -897,7 +897,7 @@ static int ocfs2_write_remove_suid(struct inode *inode) | |||
897 | int ret; | 897 | int ret; |
898 | struct buffer_head *bh = NULL; | 898 | struct buffer_head *bh = NULL; |
899 | struct ocfs2_inode_info *oi = OCFS2_I(inode); | 899 | struct ocfs2_inode_info *oi = OCFS2_I(inode); |
900 | struct ocfs2_journal_handle *handle; | 900 | handle_t *handle; |
901 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 901 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
902 | struct ocfs2_dinode *di; | 902 | struct ocfs2_dinode *di; |
903 | 903 | ||
diff --git a/fs/ocfs2/file.h b/fs/ocfs2/file.h index 740c9e7ca599..84f8b974dcad 100644 --- a/fs/ocfs2/file.h +++ b/fs/ocfs2/file.h | |||
@@ -41,7 +41,7 @@ int ocfs2_do_extend_allocation(struct ocfs2_super *osb, | |||
41 | struct inode *inode, | 41 | struct inode *inode, |
42 | u32 clusters_to_add, | 42 | u32 clusters_to_add, |
43 | struct buffer_head *fe_bh, | 43 | struct buffer_head *fe_bh, |
44 | struct ocfs2_journal_handle *handle, | 44 | handle_t *handle, |
45 | struct ocfs2_alloc_context *data_ac, | 45 | struct ocfs2_alloc_context *data_ac, |
46 | struct ocfs2_alloc_context *meta_ac, | 46 | struct ocfs2_alloc_context *meta_ac, |
47 | enum ocfs2_alloc_restarted *reason); | 47 | enum ocfs2_alloc_restarted *reason); |
@@ -49,7 +49,7 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr); | |||
49 | int ocfs2_getattr(struct vfsmount *mnt, struct dentry *dentry, | 49 | int ocfs2_getattr(struct vfsmount *mnt, struct dentry *dentry, |
50 | struct kstat *stat); | 50 | struct kstat *stat); |
51 | 51 | ||
52 | int ocfs2_set_inode_size(struct ocfs2_journal_handle *handle, | 52 | int ocfs2_set_inode_size(handle_t *handle, |
53 | struct inode *inode, | 53 | struct inode *inode, |
54 | struct buffer_head *fe_bh, | 54 | struct buffer_head *fe_bh, |
55 | u64 new_i_size); | 55 | u64 new_i_size); |
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index ac78877ba14d..ad4d4a1df77b 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
@@ -512,7 +512,7 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb, | |||
512 | struct buffer_head *fe_bh) | 512 | struct buffer_head *fe_bh) |
513 | { | 513 | { |
514 | int status = 0; | 514 | int status = 0; |
515 | struct ocfs2_journal_handle *handle = NULL; | 515 | handle_t *handle = NULL; |
516 | struct ocfs2_truncate_context *tc = NULL; | 516 | struct ocfs2_truncate_context *tc = NULL; |
517 | struct ocfs2_dinode *fe; | 517 | struct ocfs2_dinode *fe; |
518 | 518 | ||
@@ -568,7 +568,7 @@ static int ocfs2_remove_inode(struct inode *inode, | |||
568 | int status; | 568 | int status; |
569 | struct inode *inode_alloc_inode = NULL; | 569 | struct inode *inode_alloc_inode = NULL; |
570 | struct buffer_head *inode_alloc_bh = NULL; | 570 | struct buffer_head *inode_alloc_bh = NULL; |
571 | struct ocfs2_journal_handle *handle; | 571 | handle_t *handle; |
572 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 572 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
573 | struct ocfs2_dinode *di = (struct ocfs2_dinode *) di_bh->b_data; | 573 | struct ocfs2_dinode *di = (struct ocfs2_dinode *) di_bh->b_data; |
574 | 574 | ||
@@ -1198,7 +1198,7 @@ bail: | |||
1198 | * struct inode. | 1198 | * struct inode. |
1199 | * Only takes ip_lock. | 1199 | * Only takes ip_lock. |
1200 | */ | 1200 | */ |
1201 | int ocfs2_mark_inode_dirty(struct ocfs2_journal_handle *handle, | 1201 | int ocfs2_mark_inode_dirty(handle_t *handle, |
1202 | struct inode *inode, | 1202 | struct inode *inode, |
1203 | struct buffer_head *bh) | 1203 | struct buffer_head *bh) |
1204 | { | 1204 | { |
diff --git a/fs/ocfs2/inode.h b/fs/ocfs2/inode.h index 9b7354545cb4..46a378fbc40b 100644 --- a/fs/ocfs2/inode.h +++ b/fs/ocfs2/inode.h | |||
@@ -136,7 +136,7 @@ ssize_t ocfs2_rw_direct(int rw, struct file *filp, char *buf, | |||
136 | void ocfs2_sync_blockdev(struct super_block *sb); | 136 | void ocfs2_sync_blockdev(struct super_block *sb); |
137 | void ocfs2_refresh_inode(struct inode *inode, | 137 | void ocfs2_refresh_inode(struct inode *inode, |
138 | struct ocfs2_dinode *fe); | 138 | struct ocfs2_dinode *fe); |
139 | int ocfs2_mark_inode_dirty(struct ocfs2_journal_handle *handle, | 139 | int ocfs2_mark_inode_dirty(handle_t *handle, |
140 | struct inode *inode, | 140 | struct inode *inode, |
141 | struct buffer_head *bh); | 141 | struct buffer_head *bh); |
142 | int ocfs2_aio_read(struct file *file, struct kiocb *req, struct iocb *iocb); | 142 | int ocfs2_aio_read(struct file *file, struct kiocb *req, struct iocb *iocb); |
diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c index 752735842b1d..4768be5f3086 100644 --- a/fs/ocfs2/ioctl.c +++ b/fs/ocfs2/ioctl.c | |||
@@ -43,7 +43,7 @@ static int ocfs2_set_inode_attr(struct inode *inode, unsigned flags, | |||
43 | { | 43 | { |
44 | struct ocfs2_inode_info *ocfs2_inode = OCFS2_I(inode); | 44 | struct ocfs2_inode_info *ocfs2_inode = OCFS2_I(inode); |
45 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 45 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
46 | struct ocfs2_journal_handle *handle = NULL; | 46 | handle_t *handle = NULL; |
47 | struct buffer_head *bh = NULL; | 47 | struct buffer_head *bh = NULL; |
48 | unsigned oldflags; | 48 | unsigned oldflags; |
49 | int status; | 49 | int status; |
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 6d9658b0c5db..c0ad7cb59521 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c | |||
@@ -110,30 +110,13 @@ finally: | |||
110 | return status; | 110 | return status; |
111 | } | 111 | } |
112 | 112 | ||
113 | static struct ocfs2_journal_handle *ocfs2_alloc_handle(struct ocfs2_super *osb) | ||
114 | { | ||
115 | struct ocfs2_journal_handle *retval = NULL; | ||
116 | |||
117 | retval = kcalloc(1, sizeof(*retval), GFP_NOFS); | ||
118 | if (!retval) { | ||
119 | mlog(ML_ERROR, "Failed to allocate memory for journal " | ||
120 | "handle!\n"); | ||
121 | return NULL; | ||
122 | } | ||
123 | retval->k_handle = NULL; | ||
124 | |||
125 | return retval; | ||
126 | } | ||
127 | |||
128 | /* pass it NULL and it will allocate a new handle object for you. If | 113 | /* pass it NULL and it will allocate a new handle object for you. If |
129 | * you pass it a handle however, it may still return error, in which | 114 | * you pass it a handle however, it may still return error, in which |
130 | * case it has free'd the passed handle for you. */ | 115 | * case it has free'd the passed handle for you. */ |
131 | struct ocfs2_journal_handle *ocfs2_start_trans(struct ocfs2_super *osb, | 116 | handle_t *ocfs2_start_trans(struct ocfs2_super *osb, int max_buffs) |
132 | int max_buffs) | ||
133 | { | 117 | { |
134 | int ret; | ||
135 | journal_t *journal = osb->journal->j_journal; | 118 | journal_t *journal = osb->journal->j_journal; |
136 | struct ocfs2_journal_handle *handle; | 119 | handle_t *handle; |
137 | 120 | ||
138 | BUG_ON(!osb || !osb->journal->j_journal); | 121 | BUG_ON(!osb || !osb->journal->j_journal); |
139 | 122 | ||
@@ -149,77 +132,39 @@ struct ocfs2_journal_handle *ocfs2_start_trans(struct ocfs2_super *osb, | |||
149 | BUG(); | 132 | BUG(); |
150 | } | 133 | } |
151 | 134 | ||
152 | handle = ocfs2_alloc_handle(osb); | ||
153 | if (!handle) { | ||
154 | ret = -ENOMEM; | ||
155 | mlog_errno(ret); | ||
156 | return ERR_PTR(ret); | ||
157 | } | ||
158 | |||
159 | down_read(&osb->journal->j_trans_barrier); | 135 | down_read(&osb->journal->j_trans_barrier); |
160 | 136 | ||
161 | /* actually start the transaction now */ | 137 | handle = journal_start(journal, max_buffs); |
162 | handle->k_handle = journal_start(journal, max_buffs); | 138 | if (IS_ERR(handle)) { |
163 | if (IS_ERR(handle->k_handle)) { | ||
164 | up_read(&osb->journal->j_trans_barrier); | 139 | up_read(&osb->journal->j_trans_barrier); |
165 | kfree(handle); | ||
166 | 140 | ||
167 | ret = PTR_ERR(handle->k_handle); | 141 | mlog_errno(PTR_ERR(handle)); |
168 | handle->k_handle = NULL; | ||
169 | mlog_errno(ret); | ||
170 | 142 | ||
171 | if (is_journal_aborted(journal)) { | 143 | if (is_journal_aborted(journal)) { |
172 | ocfs2_abort(osb->sb, "Detected aborted journal"); | 144 | ocfs2_abort(osb->sb, "Detected aborted journal"); |
173 | ret = -EROFS; | 145 | handle = ERR_PTR(-EROFS); |
174 | } | 146 | } |
175 | return ERR_PTR(ret); | 147 | } else |
176 | } | 148 | atomic_inc(&(osb->journal->j_num_trans)); |
177 | |||
178 | atomic_inc(&(osb->journal->j_num_trans)); | ||
179 | 149 | ||
180 | return handle; | 150 | return handle; |
181 | } | 151 | } |
182 | 152 | ||
183 | void ocfs2_commit_trans(struct ocfs2_super *osb, | 153 | int ocfs2_commit_trans(struct ocfs2_super *osb, |
184 | struct ocfs2_journal_handle *handle) | 154 | handle_t *handle) |
185 | { | 155 | { |
186 | handle_t *jbd_handle; | 156 | int ret; |
187 | int retval; | ||
188 | struct ocfs2_journal *journal = osb->journal; | 157 | struct ocfs2_journal *journal = osb->journal; |
189 | 158 | ||
190 | mlog_entry_void(); | ||
191 | |||
192 | BUG_ON(!handle); | 159 | BUG_ON(!handle); |
193 | 160 | ||
194 | if (!handle->k_handle) { | 161 | ret = journal_stop(handle); |
195 | kfree(handle); | 162 | if (ret < 0) |
196 | mlog_exit_void(); | 163 | mlog_errno(ret); |
197 | return; | ||
198 | } | ||
199 | |||
200 | /* ocfs2_extend_trans may have had to call journal_restart | ||
201 | * which will always commit the transaction, but may return | ||
202 | * error for any number of reasons. If this is the case, we | ||
203 | * clear k_handle as it's not valid any more. */ | ||
204 | if (handle->k_handle) { | ||
205 | jbd_handle = handle->k_handle; | ||
206 | |||
207 | /* actually stop the transaction. if we've set h_sync, | ||
208 | * it'll have been committed when we return */ | ||
209 | retval = journal_stop(jbd_handle); | ||
210 | if (retval < 0) { | ||
211 | mlog_errno(retval); | ||
212 | mlog(ML_ERROR, "Could not commit transaction\n"); | ||
213 | BUG(); | ||
214 | } | ||
215 | |||
216 | handle->k_handle = NULL; /* it's been free'd in journal_stop */ | ||
217 | } | ||
218 | 164 | ||
219 | up_read(&journal->j_trans_barrier); | 165 | up_read(&journal->j_trans_barrier); |
220 | 166 | ||
221 | kfree(handle); | 167 | return ret; |
222 | mlog_exit_void(); | ||
223 | } | 168 | } |
224 | 169 | ||
225 | /* | 170 | /* |
@@ -268,7 +213,7 @@ bail: | |||
268 | return status; | 213 | return status; |
269 | } | 214 | } |
270 | 215 | ||
271 | int ocfs2_journal_access(struct ocfs2_journal_handle *handle, | 216 | int ocfs2_journal_access(handle_t *handle, |
272 | struct inode *inode, | 217 | struct inode *inode, |
273 | struct buffer_head *bh, | 218 | struct buffer_head *bh, |
274 | int type) | 219 | int type) |
@@ -306,11 +251,11 @@ int ocfs2_journal_access(struct ocfs2_journal_handle *handle, | |||
306 | switch (type) { | 251 | switch (type) { |
307 | case OCFS2_JOURNAL_ACCESS_CREATE: | 252 | case OCFS2_JOURNAL_ACCESS_CREATE: |
308 | case OCFS2_JOURNAL_ACCESS_WRITE: | 253 | case OCFS2_JOURNAL_ACCESS_WRITE: |
309 | status = journal_get_write_access(handle->k_handle, bh); | 254 | status = journal_get_write_access(handle, bh); |
310 | break; | 255 | break; |
311 | 256 | ||
312 | case OCFS2_JOURNAL_ACCESS_UNDO: | 257 | case OCFS2_JOURNAL_ACCESS_UNDO: |
313 | status = journal_get_undo_access(handle->k_handle, bh); | 258 | status = journal_get_undo_access(handle, bh); |
314 | break; | 259 | break; |
315 | 260 | ||
316 | default: | 261 | default: |
@@ -327,7 +272,7 @@ int ocfs2_journal_access(struct ocfs2_journal_handle *handle, | |||
327 | return status; | 272 | return status; |
328 | } | 273 | } |
329 | 274 | ||
330 | int ocfs2_journal_dirty(struct ocfs2_journal_handle *handle, | 275 | int ocfs2_journal_dirty(handle_t *handle, |
331 | struct buffer_head *bh) | 276 | struct buffer_head *bh) |
332 | { | 277 | { |
333 | int status; | 278 | int status; |
@@ -335,7 +280,7 @@ int ocfs2_journal_dirty(struct ocfs2_journal_handle *handle, | |||
335 | mlog_entry("(bh->b_blocknr=%llu)\n", | 280 | mlog_entry("(bh->b_blocknr=%llu)\n", |
336 | (unsigned long long)bh->b_blocknr); | 281 | (unsigned long long)bh->b_blocknr); |
337 | 282 | ||
338 | status = journal_dirty_metadata(handle->k_handle, bh); | 283 | status = journal_dirty_metadata(handle, bh); |
339 | if (status < 0) | 284 | if (status < 0) |
340 | mlog(ML_ERROR, "Could not dirty metadata buffer. " | 285 | mlog(ML_ERROR, "Could not dirty metadata buffer. " |
341 | "(bh->b_blocknr=%llu)\n", | 286 | "(bh->b_blocknr=%llu)\n", |
diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h index 3c0d15c5e49c..d86cb960b7ec 100644 --- a/fs/ocfs2/journal.h +++ b/fs/ocfs2/journal.h | |||
@@ -37,7 +37,6 @@ enum ocfs2_journal_state { | |||
37 | 37 | ||
38 | struct ocfs2_super; | 38 | struct ocfs2_super; |
39 | struct ocfs2_dinode; | 39 | struct ocfs2_dinode; |
40 | struct ocfs2_journal_handle; | ||
41 | 40 | ||
42 | struct ocfs2_journal { | 41 | struct ocfs2_journal { |
43 | enum ocfs2_journal_state j_state; /* Journals current state */ | 42 | enum ocfs2_journal_state j_state; /* Journals current state */ |
@@ -133,10 +132,6 @@ static inline void ocfs2_inode_set_new(struct ocfs2_super *osb, | |||
133 | spin_unlock(&trans_inc_lock); | 132 | spin_unlock(&trans_inc_lock); |
134 | } | 133 | } |
135 | 134 | ||
136 | struct ocfs2_journal_handle { | ||
137 | handle_t *k_handle; /* kernel handle. */ | ||
138 | }; | ||
139 | |||
140 | /* Exported only for the journal struct init code in super.c. Do not call. */ | 135 | /* Exported only for the journal struct init code in super.c. Do not call. */ |
141 | void ocfs2_complete_recovery(void *data); | 136 | void ocfs2_complete_recovery(void *data); |
142 | 137 | ||
@@ -200,7 +195,11 @@ static inline void ocfs2_checkpoint_inode(struct inode *inode) | |||
200 | * ocfs2_start_trans - Begin a transaction. Give it an upper estimate of | 195 | * ocfs2_start_trans - Begin a transaction. Give it an upper estimate of |
201 | * the number of blocks that will be changed during | 196 | * the number of blocks that will be changed during |
202 | * this handle. | 197 | * this handle. |
203 | * ocfs2_commit_trans - Complete a handle. | 198 | * ocfs2_commit_trans - Complete a handle. It might return -EIO if |
199 | * the journal was aborted. The majority of paths don't | ||
200 | * check the return value as an error there comes too | ||
201 | * late to do anything (and will be picked up in a | ||
202 | * later transaction). | ||
204 | * ocfs2_extend_trans - Extend a handle by nblocks credits. This may | 203 | * ocfs2_extend_trans - Extend a handle by nblocks credits. This may |
205 | * commit the handle to disk in the process, but will | 204 | * commit the handle to disk in the process, but will |
206 | * not release any locks taken during the transaction. | 205 | * not release any locks taken during the transaction. |
@@ -215,10 +214,10 @@ static inline void ocfs2_checkpoint_inode(struct inode *inode) | |||
215 | /* You must always start_trans with a number of buffs > 0, but it's | 214 | /* You must always start_trans with a number of buffs > 0, but it's |
216 | * perfectly legal to go through an entire transaction without having | 215 | * perfectly legal to go through an entire transaction without having |
217 | * dirtied any buffers. */ | 216 | * dirtied any buffers. */ |
218 | struct ocfs2_journal_handle *ocfs2_start_trans(struct ocfs2_super *osb, | 217 | handle_t *ocfs2_start_trans(struct ocfs2_super *osb, |
219 | int max_buffs); | 218 | int max_buffs); |
220 | void ocfs2_commit_trans(struct ocfs2_super *osb, | 219 | int ocfs2_commit_trans(struct ocfs2_super *osb, |
221 | struct ocfs2_journal_handle *handle); | 220 | handle_t *handle); |
222 | int ocfs2_extend_trans(handle_t *handle, int nblocks); | 221 | int ocfs2_extend_trans(handle_t *handle, int nblocks); |
223 | 222 | ||
224 | /* | 223 | /* |
@@ -236,7 +235,7 @@ int ocfs2_extend_trans(handle_t *handle, int nblocks); | |||
236 | #define OCFS2_JOURNAL_ACCESS_WRITE 1 | 235 | #define OCFS2_JOURNAL_ACCESS_WRITE 1 |
237 | #define OCFS2_JOURNAL_ACCESS_UNDO 2 | 236 | #define OCFS2_JOURNAL_ACCESS_UNDO 2 |
238 | 237 | ||
239 | int ocfs2_journal_access(struct ocfs2_journal_handle *handle, | 238 | int ocfs2_journal_access(handle_t *handle, |
240 | struct inode *inode, | 239 | struct inode *inode, |
241 | struct buffer_head *bh, | 240 | struct buffer_head *bh, |
242 | int type); | 241 | int type); |
@@ -259,7 +258,7 @@ int ocfs2_journal_access(struct ocfs2_journal_handle *handle, | |||
259 | * <modify the bh> | 258 | * <modify the bh> |
260 | * ocfs2_journal_dirty(handle, bh); | 259 | * ocfs2_journal_dirty(handle, bh); |
261 | */ | 260 | */ |
262 | int ocfs2_journal_dirty(struct ocfs2_journal_handle *handle, | 261 | int ocfs2_journal_dirty(handle_t *handle, |
263 | struct buffer_head *bh); | 262 | struct buffer_head *bh); |
264 | int ocfs2_journal_dirty_data(handle_t *handle, | 263 | int ocfs2_journal_dirty_data(handle_t *handle, |
265 | struct buffer_head *bh); | 264 | struct buffer_head *bh); |
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index 2ae567a7042b..698d79a74ef8 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c | |||
@@ -58,7 +58,7 @@ static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb, | |||
58 | static void ocfs2_clear_local_alloc(struct ocfs2_dinode *alloc); | 58 | static void ocfs2_clear_local_alloc(struct ocfs2_dinode *alloc); |
59 | 59 | ||
60 | static int ocfs2_sync_local_to_main(struct ocfs2_super *osb, | 60 | static int ocfs2_sync_local_to_main(struct ocfs2_super *osb, |
61 | struct ocfs2_journal_handle *handle, | 61 | handle_t *handle, |
62 | struct ocfs2_dinode *alloc, | 62 | struct ocfs2_dinode *alloc, |
63 | struct inode *main_bm_inode, | 63 | struct inode *main_bm_inode, |
64 | struct buffer_head *main_bm_bh); | 64 | struct buffer_head *main_bm_bh); |
@@ -69,7 +69,7 @@ static int ocfs2_local_alloc_reserve_for_window(struct ocfs2_super *osb, | |||
69 | struct buffer_head **bitmap_bh); | 69 | struct buffer_head **bitmap_bh); |
70 | 70 | ||
71 | static int ocfs2_local_alloc_new_window(struct ocfs2_super *osb, | 71 | static int ocfs2_local_alloc_new_window(struct ocfs2_super *osb, |
72 | struct ocfs2_journal_handle *handle, | 72 | handle_t *handle, |
73 | struct ocfs2_alloc_context *ac); | 73 | struct ocfs2_alloc_context *ac); |
74 | 74 | ||
75 | static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb, | 75 | static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb, |
@@ -195,7 +195,7 @@ bail: | |||
195 | void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb) | 195 | void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb) |
196 | { | 196 | { |
197 | int status; | 197 | int status; |
198 | struct ocfs2_journal_handle *handle; | 198 | handle_t *handle; |
199 | struct inode *local_alloc_inode = NULL; | 199 | struct inode *local_alloc_inode = NULL; |
200 | struct buffer_head *bh = NULL; | 200 | struct buffer_head *bh = NULL; |
201 | struct buffer_head *main_bm_bh = NULL; | 201 | struct buffer_head *main_bm_bh = NULL; |
@@ -382,7 +382,7 @@ int ocfs2_complete_local_alloc_recovery(struct ocfs2_super *osb, | |||
382 | struct ocfs2_dinode *alloc) | 382 | struct ocfs2_dinode *alloc) |
383 | { | 383 | { |
384 | int status; | 384 | int status; |
385 | struct ocfs2_journal_handle *handle; | 385 | handle_t *handle; |
386 | struct buffer_head *main_bm_bh = NULL; | 386 | struct buffer_head *main_bm_bh = NULL; |
387 | struct inode *main_bm_inode; | 387 | struct inode *main_bm_inode; |
388 | 388 | ||
@@ -414,7 +414,7 @@ int ocfs2_complete_local_alloc_recovery(struct ocfs2_super *osb, | |||
414 | } | 414 | } |
415 | 415 | ||
416 | /* we want the bitmap change to be recorded on disk asap */ | 416 | /* we want the bitmap change to be recorded on disk asap */ |
417 | handle->k_handle->h_sync = 1; | 417 | handle->h_sync = 1; |
418 | 418 | ||
419 | status = ocfs2_sync_local_to_main(osb, handle, alloc, | 419 | status = ocfs2_sync_local_to_main(osb, handle, alloc, |
420 | main_bm_inode, main_bm_bh); | 420 | main_bm_inode, main_bm_bh); |
@@ -521,7 +521,7 @@ bail: | |||
521 | } | 521 | } |
522 | 522 | ||
523 | int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, | 523 | int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, |
524 | struct ocfs2_journal_handle *handle, | 524 | handle_t *handle, |
525 | struct ocfs2_alloc_context *ac, | 525 | struct ocfs2_alloc_context *ac, |
526 | u32 min_bits, | 526 | u32 min_bits, |
527 | u32 *bit_off, | 527 | u32 *bit_off, |
@@ -699,7 +699,7 @@ static void ocfs2_verify_zero_bits(unsigned long *bitmap, | |||
699 | * passed is used for caching. | 699 | * passed is used for caching. |
700 | */ | 700 | */ |
701 | static int ocfs2_sync_local_to_main(struct ocfs2_super *osb, | 701 | static int ocfs2_sync_local_to_main(struct ocfs2_super *osb, |
702 | struct ocfs2_journal_handle *handle, | 702 | handle_t *handle, |
703 | struct ocfs2_dinode *alloc, | 703 | struct ocfs2_dinode *alloc, |
704 | struct inode *main_bm_inode, | 704 | struct inode *main_bm_inode, |
705 | struct buffer_head *main_bm_bh) | 705 | struct buffer_head *main_bm_bh) |
@@ -811,7 +811,7 @@ bail: | |||
811 | * pass it the bitmap lock in lock_bh if you have it. | 811 | * pass it the bitmap lock in lock_bh if you have it. |
812 | */ | 812 | */ |
813 | static int ocfs2_local_alloc_new_window(struct ocfs2_super *osb, | 813 | static int ocfs2_local_alloc_new_window(struct ocfs2_super *osb, |
814 | struct ocfs2_journal_handle *handle, | 814 | handle_t *handle, |
815 | struct ocfs2_alloc_context *ac) | 815 | struct ocfs2_alloc_context *ac) |
816 | { | 816 | { |
817 | int status = 0; | 817 | int status = 0; |
@@ -878,7 +878,7 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb, | |||
878 | int status = 0; | 878 | int status = 0; |
879 | struct buffer_head *main_bm_bh = NULL; | 879 | struct buffer_head *main_bm_bh = NULL; |
880 | struct inode *main_bm_inode = NULL; | 880 | struct inode *main_bm_inode = NULL; |
881 | struct ocfs2_journal_handle *handle = NULL; | 881 | handle_t *handle = NULL; |
882 | struct ocfs2_dinode *alloc; | 882 | struct ocfs2_dinode *alloc; |
883 | struct ocfs2_dinode *alloc_copy = NULL; | 883 | struct ocfs2_dinode *alloc_copy = NULL; |
884 | struct ocfs2_alloc_context *ac = NULL; | 884 | struct ocfs2_alloc_context *ac = NULL; |
diff --git a/fs/ocfs2/localalloc.h b/fs/ocfs2/localalloc.h index 4bd624ce380a..385a10152f9c 100644 --- a/fs/ocfs2/localalloc.h +++ b/fs/ocfs2/localalloc.h | |||
@@ -46,7 +46,7 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb, | |||
46 | struct ocfs2_alloc_context *ac); | 46 | struct ocfs2_alloc_context *ac); |
47 | 47 | ||
48 | int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, | 48 | int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, |
49 | struct ocfs2_journal_handle *handle, | 49 | handle_t *handle, |
50 | struct ocfs2_alloc_context *ac, | 50 | struct ocfs2_alloc_context *ac, |
51 | u32 min_bits, | 51 | u32 min_bits, |
52 | u32 *bit_off, | 52 | u32 *bit_off, |
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index d63ab7be89a5..583bffe98091 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
@@ -75,12 +75,12 @@ static int inline ocfs2_search_dirblock(struct buffer_head *bh, | |||
75 | unsigned long offset, | 75 | unsigned long offset, |
76 | struct ocfs2_dir_entry **res_dir); | 76 | struct ocfs2_dir_entry **res_dir); |
77 | 77 | ||
78 | static int ocfs2_delete_entry(struct ocfs2_journal_handle *handle, | 78 | static int ocfs2_delete_entry(handle_t *handle, |
79 | struct inode *dir, | 79 | struct inode *dir, |
80 | struct ocfs2_dir_entry *de_del, | 80 | struct ocfs2_dir_entry *de_del, |
81 | struct buffer_head *bh); | 81 | struct buffer_head *bh); |
82 | 82 | ||
83 | static int __ocfs2_add_entry(struct ocfs2_journal_handle *handle, | 83 | static int __ocfs2_add_entry(handle_t *handle, |
84 | struct inode *dir, | 84 | struct inode *dir, |
85 | const char *name, int namelen, | 85 | const char *name, int namelen, |
86 | struct inode *inode, u64 blkno, | 86 | struct inode *inode, u64 blkno, |
@@ -93,12 +93,12 @@ static int ocfs2_mknod_locked(struct ocfs2_super *osb, | |||
93 | dev_t dev, | 93 | dev_t dev, |
94 | struct buffer_head **new_fe_bh, | 94 | struct buffer_head **new_fe_bh, |
95 | struct buffer_head *parent_fe_bh, | 95 | struct buffer_head *parent_fe_bh, |
96 | struct ocfs2_journal_handle *handle, | 96 | handle_t *handle, |
97 | struct inode **ret_inode, | 97 | struct inode **ret_inode, |
98 | struct ocfs2_alloc_context *inode_ac); | 98 | struct ocfs2_alloc_context *inode_ac); |
99 | 99 | ||
100 | static int ocfs2_fill_new_dir(struct ocfs2_super *osb, | 100 | static int ocfs2_fill_new_dir(struct ocfs2_super *osb, |
101 | struct ocfs2_journal_handle *handle, | 101 | handle_t *handle, |
102 | struct inode *parent, | 102 | struct inode *parent, |
103 | struct inode *inode, | 103 | struct inode *inode, |
104 | struct buffer_head *fe_bh, | 104 | struct buffer_head *fe_bh, |
@@ -111,7 +111,7 @@ static int ocfs2_prepare_orphan_dir(struct ocfs2_super *osb, | |||
111 | struct buffer_head **de_bh); | 111 | struct buffer_head **de_bh); |
112 | 112 | ||
113 | static int ocfs2_orphan_add(struct ocfs2_super *osb, | 113 | static int ocfs2_orphan_add(struct ocfs2_super *osb, |
114 | struct ocfs2_journal_handle *handle, | 114 | handle_t *handle, |
115 | struct inode *inode, | 115 | struct inode *inode, |
116 | struct ocfs2_dinode *fe, | 116 | struct ocfs2_dinode *fe, |
117 | char *name, | 117 | char *name, |
@@ -119,11 +119,11 @@ static int ocfs2_orphan_add(struct ocfs2_super *osb, | |||
119 | struct inode *orphan_dir_inode); | 119 | struct inode *orphan_dir_inode); |
120 | 120 | ||
121 | static int ocfs2_create_symlink_data(struct ocfs2_super *osb, | 121 | static int ocfs2_create_symlink_data(struct ocfs2_super *osb, |
122 | struct ocfs2_journal_handle *handle, | 122 | handle_t *handle, |
123 | struct inode *inode, | 123 | struct inode *inode, |
124 | const char *symname); | 124 | const char *symname); |
125 | 125 | ||
126 | static inline int ocfs2_add_entry(struct ocfs2_journal_handle *handle, | 126 | static inline int ocfs2_add_entry(handle_t *handle, |
127 | struct dentry *dentry, | 127 | struct dentry *dentry, |
128 | struct inode *inode, u64 blkno, | 128 | struct inode *inode, u64 blkno, |
129 | struct buffer_head *parent_fe_bh, | 129 | struct buffer_head *parent_fe_bh, |
@@ -236,7 +236,7 @@ bail: | |||
236 | } | 236 | } |
237 | 237 | ||
238 | static int ocfs2_fill_new_dir(struct ocfs2_super *osb, | 238 | static int ocfs2_fill_new_dir(struct ocfs2_super *osb, |
239 | struct ocfs2_journal_handle *handle, | 239 | handle_t *handle, |
240 | struct inode *parent, | 240 | struct inode *parent, |
241 | struct inode *inode, | 241 | struct inode *inode, |
242 | struct buffer_head *fe_bh, | 242 | struct buffer_head *fe_bh, |
@@ -311,7 +311,7 @@ static int ocfs2_mknod(struct inode *dir, | |||
311 | { | 311 | { |
312 | int status = 0; | 312 | int status = 0; |
313 | struct buffer_head *parent_fe_bh = NULL; | 313 | struct buffer_head *parent_fe_bh = NULL; |
314 | struct ocfs2_journal_handle *handle = NULL; | 314 | handle_t *handle = NULL; |
315 | struct ocfs2_super *osb; | 315 | struct ocfs2_super *osb; |
316 | struct ocfs2_dinode *dirfe; | 316 | struct ocfs2_dinode *dirfe; |
317 | struct buffer_head *new_fe_bh = NULL; | 317 | struct buffer_head *new_fe_bh = NULL; |
@@ -476,7 +476,7 @@ static int ocfs2_mknod_locked(struct ocfs2_super *osb, | |||
476 | dev_t dev, | 476 | dev_t dev, |
477 | struct buffer_head **new_fe_bh, | 477 | struct buffer_head **new_fe_bh, |
478 | struct buffer_head *parent_fe_bh, | 478 | struct buffer_head *parent_fe_bh, |
479 | struct ocfs2_journal_handle *handle, | 479 | handle_t *handle, |
480 | struct inode **ret_inode, | 480 | struct inode **ret_inode, |
481 | struct ocfs2_alloc_context *inode_ac) | 481 | struct ocfs2_alloc_context *inode_ac) |
482 | { | 482 | { |
@@ -642,7 +642,7 @@ static int ocfs2_link(struct dentry *old_dentry, | |||
642 | struct inode *dir, | 642 | struct inode *dir, |
643 | struct dentry *dentry) | 643 | struct dentry *dentry) |
644 | { | 644 | { |
645 | struct ocfs2_journal_handle *handle; | 645 | handle_t *handle; |
646 | struct inode *inode = old_dentry->d_inode; | 646 | struct inode *inode = old_dentry->d_inode; |
647 | int err; | 647 | int err; |
648 | struct buffer_head *fe_bh = NULL; | 648 | struct buffer_head *fe_bh = NULL; |
@@ -807,7 +807,7 @@ static int ocfs2_unlink(struct inode *dir, | |||
807 | struct ocfs2_dinode *fe = NULL; | 807 | struct ocfs2_dinode *fe = NULL; |
808 | struct buffer_head *fe_bh = NULL; | 808 | struct buffer_head *fe_bh = NULL; |
809 | struct buffer_head *parent_node_bh = NULL; | 809 | struct buffer_head *parent_node_bh = NULL; |
810 | struct ocfs2_journal_handle *handle = NULL; | 810 | handle_t *handle = NULL; |
811 | struct ocfs2_dir_entry *dirent = NULL; | 811 | struct ocfs2_dir_entry *dirent = NULL; |
812 | struct buffer_head *dirent_bh = NULL; | 812 | struct buffer_head *dirent_bh = NULL; |
813 | char orphan_name[OCFS2_ORPHAN_NAMELEN + 1]; | 813 | char orphan_name[OCFS2_ORPHAN_NAMELEN + 1]; |
@@ -1069,7 +1069,7 @@ static int ocfs2_rename(struct inode *old_dir, | |||
1069 | struct buffer_head *insert_entry_bh = NULL; | 1069 | struct buffer_head *insert_entry_bh = NULL; |
1070 | struct ocfs2_super *osb = NULL; | 1070 | struct ocfs2_super *osb = NULL; |
1071 | u64 newfe_blkno; | 1071 | u64 newfe_blkno; |
1072 | struct ocfs2_journal_handle *handle = NULL; | 1072 | handle_t *handle = NULL; |
1073 | struct buffer_head *old_dir_bh = NULL; | 1073 | struct buffer_head *old_dir_bh = NULL; |
1074 | struct buffer_head *new_dir_bh = NULL; | 1074 | struct buffer_head *new_dir_bh = NULL; |
1075 | struct ocfs2_dir_entry *old_de = NULL, *new_de = NULL; // dirent for old_dentry | 1075 | struct ocfs2_dir_entry *old_de = NULL, *new_de = NULL; // dirent for old_dentry |
@@ -1478,7 +1478,7 @@ bail: | |||
1478 | * data, including the null terminator. | 1478 | * data, including the null terminator. |
1479 | */ | 1479 | */ |
1480 | static int ocfs2_create_symlink_data(struct ocfs2_super *osb, | 1480 | static int ocfs2_create_symlink_data(struct ocfs2_super *osb, |
1481 | struct ocfs2_journal_handle *handle, | 1481 | handle_t *handle, |
1482 | struct inode *inode, | 1482 | struct inode *inode, |
1483 | const char *symname) | 1483 | const char *symname) |
1484 | { | 1484 | { |
@@ -1593,7 +1593,7 @@ static int ocfs2_symlink(struct inode *dir, | |||
1593 | struct buffer_head *parent_fe_bh = NULL; | 1593 | struct buffer_head *parent_fe_bh = NULL; |
1594 | struct ocfs2_dinode *fe = NULL; | 1594 | struct ocfs2_dinode *fe = NULL; |
1595 | struct ocfs2_dinode *dirfe; | 1595 | struct ocfs2_dinode *dirfe; |
1596 | struct ocfs2_journal_handle *handle = NULL; | 1596 | handle_t *handle = NULL; |
1597 | struct ocfs2_alloc_context *inode_ac = NULL; | 1597 | struct ocfs2_alloc_context *inode_ac = NULL; |
1598 | struct ocfs2_alloc_context *data_ac = NULL; | 1598 | struct ocfs2_alloc_context *data_ac = NULL; |
1599 | 1599 | ||
@@ -1784,7 +1784,7 @@ int ocfs2_check_dir_entry(struct inode * dir, | |||
1784 | * If you pass me insert_bh, I'll skip the search of the other dir | 1784 | * If you pass me insert_bh, I'll skip the search of the other dir |
1785 | * blocks and put the record in there. | 1785 | * blocks and put the record in there. |
1786 | */ | 1786 | */ |
1787 | static int __ocfs2_add_entry(struct ocfs2_journal_handle *handle, | 1787 | static int __ocfs2_add_entry(handle_t *handle, |
1788 | struct inode *dir, | 1788 | struct inode *dir, |
1789 | const char *name, int namelen, | 1789 | const char *name, int namelen, |
1790 | struct inode *inode, u64 blkno, | 1790 | struct inode *inode, u64 blkno, |
@@ -1870,7 +1870,7 @@ bail: | |||
1870 | * ocfs2_delete_entry deletes a directory entry by merging it with the | 1870 | * ocfs2_delete_entry deletes a directory entry by merging it with the |
1871 | * previous entry | 1871 | * previous entry |
1872 | */ | 1872 | */ |
1873 | static int ocfs2_delete_entry(struct ocfs2_journal_handle *handle, | 1873 | static int ocfs2_delete_entry(handle_t *handle, |
1874 | struct inode *dir, | 1874 | struct inode *dir, |
1875 | struct ocfs2_dir_entry *de_del, | 1875 | struct ocfs2_dir_entry *de_del, |
1876 | struct buffer_head *bh) | 1876 | struct buffer_head *bh) |
@@ -2159,7 +2159,7 @@ leave: | |||
2159 | } | 2159 | } |
2160 | 2160 | ||
2161 | static int ocfs2_orphan_add(struct ocfs2_super *osb, | 2161 | static int ocfs2_orphan_add(struct ocfs2_super *osb, |
2162 | struct ocfs2_journal_handle *handle, | 2162 | handle_t *handle, |
2163 | struct inode *inode, | 2163 | struct inode *inode, |
2164 | struct ocfs2_dinode *fe, | 2164 | struct ocfs2_dinode *fe, |
2165 | char *name, | 2165 | char *name, |
@@ -2232,7 +2232,7 @@ leave: | |||
2232 | 2232 | ||
2233 | /* unlike orphan_add, we expect the orphan dir to already be locked here. */ | 2233 | /* unlike orphan_add, we expect the orphan dir to already be locked here. */ |
2234 | int ocfs2_orphan_del(struct ocfs2_super *osb, | 2234 | int ocfs2_orphan_del(struct ocfs2_super *osb, |
2235 | struct ocfs2_journal_handle *handle, | 2235 | handle_t *handle, |
2236 | struct inode *orphan_dir_inode, | 2236 | struct inode *orphan_dir_inode, |
2237 | struct inode *inode, | 2237 | struct inode *inode, |
2238 | struct buffer_head *orphan_dir_bh) | 2238 | struct buffer_head *orphan_dir_bh) |
diff --git a/fs/ocfs2/namei.h b/fs/ocfs2/namei.h index deaaa97dbf0b..8425944fcccd 100644 --- a/fs/ocfs2/namei.h +++ b/fs/ocfs2/namei.h | |||
@@ -39,7 +39,7 @@ struct buffer_head *ocfs2_find_entry(const char *name, | |||
39 | struct inode *dir, | 39 | struct inode *dir, |
40 | struct ocfs2_dir_entry **res_dir); | 40 | struct ocfs2_dir_entry **res_dir); |
41 | int ocfs2_orphan_del(struct ocfs2_super *osb, | 41 | int ocfs2_orphan_del(struct ocfs2_super *osb, |
42 | struct ocfs2_journal_handle *handle, | 42 | handle_t *handle, |
43 | struct inode *orphan_dir_inode, | 43 | struct inode *orphan_dir_inode, |
44 | struct inode *inode, | 44 | struct inode *inode, |
45 | struct buffer_head *orphan_dir_bh); | 45 | struct buffer_head *orphan_dir_bh); |
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h index 0462a7f4e21b..553e7021b6a7 100644 --- a/fs/ocfs2/ocfs2.h +++ b/fs/ocfs2/ocfs2.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/workqueue.h> | 34 | #include <linux/workqueue.h> |
35 | #include <linux/kref.h> | 35 | #include <linux/kref.h> |
36 | #include <linux/mutex.h> | 36 | #include <linux/mutex.h> |
37 | #include <linux/jbd.h> | ||
37 | 38 | ||
38 | #include "cluster/nodemanager.h" | 39 | #include "cluster/nodemanager.h" |
39 | #include "cluster/heartbeat.h" | 40 | #include "cluster/heartbeat.h" |
@@ -181,7 +182,6 @@ enum ocfs2_mount_options | |||
181 | #define OCFS2_OSB_ERROR_FS 0x0004 | 182 | #define OCFS2_OSB_ERROR_FS 0x0004 |
182 | 183 | ||
183 | struct ocfs2_journal; | 184 | struct ocfs2_journal; |
184 | struct ocfs2_journal_handle; | ||
185 | struct ocfs2_super | 185 | struct ocfs2_super |
186 | { | 186 | { |
187 | struct task_struct *commit_task; | 187 | struct task_struct *commit_task; |
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index 186d2c3d524d..000d71cca6c5 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c | |||
@@ -49,7 +49,7 @@ | |||
49 | static inline void ocfs2_debug_bg(struct ocfs2_group_desc *bg); | 49 | static inline void ocfs2_debug_bg(struct ocfs2_group_desc *bg); |
50 | static inline void ocfs2_debug_suballoc_inode(struct ocfs2_dinode *fe); | 50 | static inline void ocfs2_debug_suballoc_inode(struct ocfs2_dinode *fe); |
51 | static inline u16 ocfs2_find_victim_chain(struct ocfs2_chain_list *cl); | 51 | static inline u16 ocfs2_find_victim_chain(struct ocfs2_chain_list *cl); |
52 | static int ocfs2_block_group_fill(struct ocfs2_journal_handle *handle, | 52 | static int ocfs2_block_group_fill(handle_t *handle, |
53 | struct inode *alloc_inode, | 53 | struct inode *alloc_inode, |
54 | struct buffer_head *bg_bh, | 54 | struct buffer_head *bg_bh, |
55 | u64 group_blkno, | 55 | u64 group_blkno, |
@@ -69,7 +69,7 @@ static int ocfs2_block_group_search(struct inode *inode, | |||
69 | u16 *bit_off, u16 *bits_found); | 69 | u16 *bit_off, u16 *bits_found); |
70 | static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, | 70 | static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, |
71 | struct ocfs2_alloc_context *ac, | 71 | struct ocfs2_alloc_context *ac, |
72 | struct ocfs2_journal_handle *handle, | 72 | handle_t *handle, |
73 | u32 bits_wanted, | 73 | u32 bits_wanted, |
74 | u32 min_bits, | 74 | u32 min_bits, |
75 | u16 *bit_off, | 75 | u16 *bit_off, |
@@ -77,20 +77,20 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, | |||
77 | u64 *bg_blkno); | 77 | u64 *bg_blkno); |
78 | static int ocfs2_test_bg_bit_allocatable(struct buffer_head *bg_bh, | 78 | static int ocfs2_test_bg_bit_allocatable(struct buffer_head *bg_bh, |
79 | int nr); | 79 | int nr); |
80 | static inline int ocfs2_block_group_set_bits(struct ocfs2_journal_handle *handle, | 80 | static inline int ocfs2_block_group_set_bits(handle_t *handle, |
81 | struct inode *alloc_inode, | 81 | struct inode *alloc_inode, |
82 | struct ocfs2_group_desc *bg, | 82 | struct ocfs2_group_desc *bg, |
83 | struct buffer_head *group_bh, | 83 | struct buffer_head *group_bh, |
84 | unsigned int bit_off, | 84 | unsigned int bit_off, |
85 | unsigned int num_bits); | 85 | unsigned int num_bits); |
86 | static inline int ocfs2_block_group_clear_bits(struct ocfs2_journal_handle *handle, | 86 | static inline int ocfs2_block_group_clear_bits(handle_t *handle, |
87 | struct inode *alloc_inode, | 87 | struct inode *alloc_inode, |
88 | struct ocfs2_group_desc *bg, | 88 | struct ocfs2_group_desc *bg, |
89 | struct buffer_head *group_bh, | 89 | struct buffer_head *group_bh, |
90 | unsigned int bit_off, | 90 | unsigned int bit_off, |
91 | unsigned int num_bits); | 91 | unsigned int num_bits); |
92 | 92 | ||
93 | static int ocfs2_relink_block_group(struct ocfs2_journal_handle *handle, | 93 | static int ocfs2_relink_block_group(handle_t *handle, |
94 | struct inode *alloc_inode, | 94 | struct inode *alloc_inode, |
95 | struct buffer_head *fe_bh, | 95 | struct buffer_head *fe_bh, |
96 | struct buffer_head *bg_bh, | 96 | struct buffer_head *bg_bh, |
@@ -98,7 +98,7 @@ static int ocfs2_relink_block_group(struct ocfs2_journal_handle *handle, | |||
98 | u16 chain); | 98 | u16 chain); |
99 | static inline int ocfs2_block_group_reasonably_empty(struct ocfs2_group_desc *bg, | 99 | static inline int ocfs2_block_group_reasonably_empty(struct ocfs2_group_desc *bg, |
100 | u32 wanted); | 100 | u32 wanted); |
101 | static int ocfs2_free_suballoc_bits(struct ocfs2_journal_handle *handle, | 101 | static int ocfs2_free_suballoc_bits(handle_t *handle, |
102 | struct inode *alloc_inode, | 102 | struct inode *alloc_inode, |
103 | struct buffer_head *alloc_bh, | 103 | struct buffer_head *alloc_bh, |
104 | unsigned int start_bit, | 104 | unsigned int start_bit, |
@@ -196,7 +196,7 @@ static int ocfs2_check_group_descriptor(struct super_block *sb, | |||
196 | return 0; | 196 | return 0; |
197 | } | 197 | } |
198 | 198 | ||
199 | static int ocfs2_block_group_fill(struct ocfs2_journal_handle *handle, | 199 | static int ocfs2_block_group_fill(handle_t *handle, |
200 | struct inode *alloc_inode, | 200 | struct inode *alloc_inode, |
201 | struct buffer_head *bg_bh, | 201 | struct buffer_head *bg_bh, |
202 | u64 group_blkno, | 202 | u64 group_blkno, |
@@ -279,7 +279,7 @@ static int ocfs2_block_group_alloc(struct ocfs2_super *osb, | |||
279 | struct ocfs2_dinode *fe = (struct ocfs2_dinode *) bh->b_data; | 279 | struct ocfs2_dinode *fe = (struct ocfs2_dinode *) bh->b_data; |
280 | struct ocfs2_chain_list *cl; | 280 | struct ocfs2_chain_list *cl; |
281 | struct ocfs2_alloc_context *ac = NULL; | 281 | struct ocfs2_alloc_context *ac = NULL; |
282 | struct ocfs2_journal_handle *handle = NULL; | 282 | handle_t *handle = NULL; |
283 | u32 bit_off, num_bits; | 283 | u32 bit_off, num_bits; |
284 | u16 alloc_rec; | 284 | u16 alloc_rec; |
285 | u64 bg_blkno; | 285 | u64 bg_blkno; |
@@ -747,7 +747,7 @@ static int ocfs2_block_group_find_clear_bits(struct ocfs2_super *osb, | |||
747 | return status; | 747 | return status; |
748 | } | 748 | } |
749 | 749 | ||
750 | static inline int ocfs2_block_group_set_bits(struct ocfs2_journal_handle *handle, | 750 | static inline int ocfs2_block_group_set_bits(handle_t *handle, |
751 | struct inode *alloc_inode, | 751 | struct inode *alloc_inode, |
752 | struct ocfs2_group_desc *bg, | 752 | struct ocfs2_group_desc *bg, |
753 | struct buffer_head *group_bh, | 753 | struct buffer_head *group_bh, |
@@ -818,7 +818,7 @@ static inline u16 ocfs2_find_victim_chain(struct ocfs2_chain_list *cl) | |||
818 | return best; | 818 | return best; |
819 | } | 819 | } |
820 | 820 | ||
821 | static int ocfs2_relink_block_group(struct ocfs2_journal_handle *handle, | 821 | static int ocfs2_relink_block_group(handle_t *handle, |
822 | struct inode *alloc_inode, | 822 | struct inode *alloc_inode, |
823 | struct buffer_head *fe_bh, | 823 | struct buffer_head *fe_bh, |
824 | struct buffer_head *bg_bh, | 824 | struct buffer_head *bg_bh, |
@@ -998,7 +998,7 @@ static int ocfs2_block_group_search(struct inode *inode, | |||
998 | } | 998 | } |
999 | 999 | ||
1000 | static int ocfs2_alloc_dinode_update_counts(struct inode *inode, | 1000 | static int ocfs2_alloc_dinode_update_counts(struct inode *inode, |
1001 | struct ocfs2_journal_handle *handle, | 1001 | handle_t *handle, |
1002 | struct buffer_head *di_bh, | 1002 | struct buffer_head *di_bh, |
1003 | u32 num_bits, | 1003 | u32 num_bits, |
1004 | u16 chain) | 1004 | u16 chain) |
@@ -1028,7 +1028,7 @@ out: | |||
1028 | } | 1028 | } |
1029 | 1029 | ||
1030 | static int ocfs2_search_one_group(struct ocfs2_alloc_context *ac, | 1030 | static int ocfs2_search_one_group(struct ocfs2_alloc_context *ac, |
1031 | struct ocfs2_journal_handle *handle, | 1031 | handle_t *handle, |
1032 | u32 bits_wanted, | 1032 | u32 bits_wanted, |
1033 | u32 min_bits, | 1033 | u32 min_bits, |
1034 | u16 *bit_off, | 1034 | u16 *bit_off, |
@@ -1088,7 +1088,7 @@ out: | |||
1088 | } | 1088 | } |
1089 | 1089 | ||
1090 | static int ocfs2_search_chain(struct ocfs2_alloc_context *ac, | 1090 | static int ocfs2_search_chain(struct ocfs2_alloc_context *ac, |
1091 | struct ocfs2_journal_handle *handle, | 1091 | handle_t *handle, |
1092 | u32 bits_wanted, | 1092 | u32 bits_wanted, |
1093 | u32 min_bits, | 1093 | u32 min_bits, |
1094 | u16 *bit_off, | 1094 | u16 *bit_off, |
@@ -1245,7 +1245,7 @@ bail: | |||
1245 | /* will give out up to bits_wanted contiguous bits. */ | 1245 | /* will give out up to bits_wanted contiguous bits. */ |
1246 | static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, | 1246 | static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, |
1247 | struct ocfs2_alloc_context *ac, | 1247 | struct ocfs2_alloc_context *ac, |
1248 | struct ocfs2_journal_handle *handle, | 1248 | handle_t *handle, |
1249 | u32 bits_wanted, | 1249 | u32 bits_wanted, |
1250 | u32 min_bits, | 1250 | u32 min_bits, |
1251 | u16 *bit_off, | 1251 | u16 *bit_off, |
@@ -1362,7 +1362,7 @@ bail: | |||
1362 | } | 1362 | } |
1363 | 1363 | ||
1364 | int ocfs2_claim_metadata(struct ocfs2_super *osb, | 1364 | int ocfs2_claim_metadata(struct ocfs2_super *osb, |
1365 | struct ocfs2_journal_handle *handle, | 1365 | handle_t *handle, |
1366 | struct ocfs2_alloc_context *ac, | 1366 | struct ocfs2_alloc_context *ac, |
1367 | u32 bits_wanted, | 1367 | u32 bits_wanted, |
1368 | u16 *suballoc_bit_start, | 1368 | u16 *suballoc_bit_start, |
@@ -1399,7 +1399,7 @@ bail: | |||
1399 | } | 1399 | } |
1400 | 1400 | ||
1401 | int ocfs2_claim_new_inode(struct ocfs2_super *osb, | 1401 | int ocfs2_claim_new_inode(struct ocfs2_super *osb, |
1402 | struct ocfs2_journal_handle *handle, | 1402 | handle_t *handle, |
1403 | struct ocfs2_alloc_context *ac, | 1403 | struct ocfs2_alloc_context *ac, |
1404 | u16 *suballoc_bit, | 1404 | u16 *suballoc_bit, |
1405 | u64 *fe_blkno) | 1405 | u64 *fe_blkno) |
@@ -1502,7 +1502,7 @@ static inline void ocfs2_block_to_cluster_group(struct inode *inode, | |||
1502 | * of any size. | 1502 | * of any size. |
1503 | */ | 1503 | */ |
1504 | int ocfs2_claim_clusters(struct ocfs2_super *osb, | 1504 | int ocfs2_claim_clusters(struct ocfs2_super *osb, |
1505 | struct ocfs2_journal_handle *handle, | 1505 | handle_t *handle, |
1506 | struct ocfs2_alloc_context *ac, | 1506 | struct ocfs2_alloc_context *ac, |
1507 | u32 min_clusters, | 1507 | u32 min_clusters, |
1508 | u32 *cluster_start, | 1508 | u32 *cluster_start, |
@@ -1572,7 +1572,7 @@ bail: | |||
1572 | return status; | 1572 | return status; |
1573 | } | 1573 | } |
1574 | 1574 | ||
1575 | static inline int ocfs2_block_group_clear_bits(struct ocfs2_journal_handle *handle, | 1575 | static inline int ocfs2_block_group_clear_bits(handle_t *handle, |
1576 | struct inode *alloc_inode, | 1576 | struct inode *alloc_inode, |
1577 | struct ocfs2_group_desc *bg, | 1577 | struct ocfs2_group_desc *bg, |
1578 | struct buffer_head *group_bh, | 1578 | struct buffer_head *group_bh, |
@@ -1627,7 +1627,7 @@ bail: | |||
1627 | /* | 1627 | /* |
1628 | * expects the suballoc inode to already be locked. | 1628 | * expects the suballoc inode to already be locked. |
1629 | */ | 1629 | */ |
1630 | static int ocfs2_free_suballoc_bits(struct ocfs2_journal_handle *handle, | 1630 | static int ocfs2_free_suballoc_bits(handle_t *handle, |
1631 | struct inode *alloc_inode, | 1631 | struct inode *alloc_inode, |
1632 | struct buffer_head *alloc_bh, | 1632 | struct buffer_head *alloc_bh, |
1633 | unsigned int start_bit, | 1633 | unsigned int start_bit, |
@@ -1711,7 +1711,7 @@ static inline u64 ocfs2_which_suballoc_group(u64 block, unsigned int bit) | |||
1711 | return group; | 1711 | return group; |
1712 | } | 1712 | } |
1713 | 1713 | ||
1714 | int ocfs2_free_dinode(struct ocfs2_journal_handle *handle, | 1714 | int ocfs2_free_dinode(handle_t *handle, |
1715 | struct inode *inode_alloc_inode, | 1715 | struct inode *inode_alloc_inode, |
1716 | struct buffer_head *inode_alloc_bh, | 1716 | struct buffer_head *inode_alloc_bh, |
1717 | struct ocfs2_dinode *di) | 1717 | struct ocfs2_dinode *di) |
@@ -1724,7 +1724,7 @@ int ocfs2_free_dinode(struct ocfs2_journal_handle *handle, | |||
1724 | inode_alloc_bh, bit, bg_blkno, 1); | 1724 | inode_alloc_bh, bit, bg_blkno, 1); |
1725 | } | 1725 | } |
1726 | 1726 | ||
1727 | int ocfs2_free_extent_block(struct ocfs2_journal_handle *handle, | 1727 | int ocfs2_free_extent_block(handle_t *handle, |
1728 | struct inode *eb_alloc_inode, | 1728 | struct inode *eb_alloc_inode, |
1729 | struct buffer_head *eb_alloc_bh, | 1729 | struct buffer_head *eb_alloc_bh, |
1730 | struct ocfs2_extent_block *eb) | 1730 | struct ocfs2_extent_block *eb) |
@@ -1737,7 +1737,7 @@ int ocfs2_free_extent_block(struct ocfs2_journal_handle *handle, | |||
1737 | bit, bg_blkno, 1); | 1737 | bit, bg_blkno, 1); |
1738 | } | 1738 | } |
1739 | 1739 | ||
1740 | int ocfs2_free_clusters(struct ocfs2_journal_handle *handle, | 1740 | int ocfs2_free_clusters(handle_t *handle, |
1741 | struct inode *bitmap_inode, | 1741 | struct inode *bitmap_inode, |
1742 | struct buffer_head *bitmap_bh, | 1742 | struct buffer_head *bitmap_bh, |
1743 | u64 start_blk, | 1743 | u64 start_blk, |
diff --git a/fs/ocfs2/suballoc.h b/fs/ocfs2/suballoc.h index e7c4b277c8d6..1a3c94cb9250 100644 --- a/fs/ocfs2/suballoc.h +++ b/fs/ocfs2/suballoc.h | |||
@@ -68,33 +68,33 @@ int ocfs2_reserve_clusters(struct ocfs2_super *osb, | |||
68 | struct ocfs2_alloc_context **ac); | 68 | struct ocfs2_alloc_context **ac); |
69 | 69 | ||
70 | int ocfs2_claim_metadata(struct ocfs2_super *osb, | 70 | int ocfs2_claim_metadata(struct ocfs2_super *osb, |
71 | struct ocfs2_journal_handle *handle, | 71 | handle_t *handle, |
72 | struct ocfs2_alloc_context *ac, | 72 | struct ocfs2_alloc_context *ac, |
73 | u32 bits_wanted, | 73 | u32 bits_wanted, |
74 | u16 *suballoc_bit_start, | 74 | u16 *suballoc_bit_start, |
75 | u32 *num_bits, | 75 | u32 *num_bits, |
76 | u64 *blkno_start); | 76 | u64 *blkno_start); |
77 | int ocfs2_claim_new_inode(struct ocfs2_super *osb, | 77 | int ocfs2_claim_new_inode(struct ocfs2_super *osb, |
78 | struct ocfs2_journal_handle *handle, | 78 | handle_t *handle, |
79 | struct ocfs2_alloc_context *ac, | 79 | struct ocfs2_alloc_context *ac, |
80 | u16 *suballoc_bit, | 80 | u16 *suballoc_bit, |
81 | u64 *fe_blkno); | 81 | u64 *fe_blkno); |
82 | int ocfs2_claim_clusters(struct ocfs2_super *osb, | 82 | int ocfs2_claim_clusters(struct ocfs2_super *osb, |
83 | struct ocfs2_journal_handle *handle, | 83 | handle_t *handle, |
84 | struct ocfs2_alloc_context *ac, | 84 | struct ocfs2_alloc_context *ac, |
85 | u32 min_clusters, | 85 | u32 min_clusters, |
86 | u32 *cluster_start, | 86 | u32 *cluster_start, |
87 | u32 *num_clusters); | 87 | u32 *num_clusters); |
88 | 88 | ||
89 | int ocfs2_free_dinode(struct ocfs2_journal_handle *handle, | 89 | int ocfs2_free_dinode(handle_t *handle, |
90 | struct inode *inode_alloc_inode, | 90 | struct inode *inode_alloc_inode, |
91 | struct buffer_head *inode_alloc_bh, | 91 | struct buffer_head *inode_alloc_bh, |
92 | struct ocfs2_dinode *di); | 92 | struct ocfs2_dinode *di); |
93 | int ocfs2_free_extent_block(struct ocfs2_journal_handle *handle, | 93 | int ocfs2_free_extent_block(handle_t *handle, |
94 | struct inode *eb_alloc_inode, | 94 | struct inode *eb_alloc_inode, |
95 | struct buffer_head *eb_alloc_bh, | 95 | struct buffer_head *eb_alloc_bh, |
96 | struct ocfs2_extent_block *eb); | 96 | struct ocfs2_extent_block *eb); |
97 | int ocfs2_free_clusters(struct ocfs2_journal_handle *handle, | 97 | int ocfs2_free_clusters(handle_t *handle, |
98 | struct inode *bitmap_inode, | 98 | struct inode *bitmap_inode, |
99 | struct buffer_head *bitmap_bh, | 99 | struct buffer_head *bitmap_bh, |
100 | u64 start_blk, | 100 | u64 start_blk, |