diff options
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/aops.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/dir.c | 5 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmmaster.c | 6 | ||||
-rw-r--r-- | fs/ocfs2/dlmglue.c | 8 | ||||
-rw-r--r-- | fs/ocfs2/dlmglue.h | 2 | ||||
-rw-r--r-- | fs/ocfs2/heartbeat.c | 26 | ||||
-rw-r--r-- | fs/ocfs2/heartbeat.h | 5 | ||||
-rw-r--r-- | fs/ocfs2/localalloc.c | 6 |
8 files changed, 24 insertions, 36 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 82243127eebf..90383ed61005 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -257,7 +257,7 @@ static int ocfs2_readpage_inline(struct inode *inode, struct page *page) | |||
257 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 257 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
258 | 258 | ||
259 | BUG_ON(!PageLocked(page)); | 259 | BUG_ON(!PageLocked(page)); |
260 | BUG_ON(!OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL); | 260 | BUG_ON(!(OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL)); |
261 | 261 | ||
262 | ret = ocfs2_read_block(osb, OCFS2_I(inode)->ip_blkno, &di_bh, | 262 | ret = ocfs2_read_block(osb, OCFS2_I(inode)->ip_blkno, &di_bh, |
263 | OCFS2_BH_CACHED, inode); | 263 | OCFS2_BH_CACHED, inode); |
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index e280833ceb9a..8a1875848080 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c | |||
@@ -390,9 +390,8 @@ static int __ocfs2_delete_entry(handle_t *handle, struct inode *dir, | |||
390 | goto bail; | 390 | goto bail; |
391 | } | 391 | } |
392 | if (pde) | 392 | if (pde) |
393 | pde->rec_len = | 393 | le16_add_cpu(&pde->rec_len, |
394 | cpu_to_le16(le16_to_cpu(pde->rec_len) + | 394 | le16_to_cpu(de->rec_len)); |
395 | le16_to_cpu(de->rec_len)); | ||
396 | else | 395 | else |
397 | de->inode = 0; | 396 | de->inode = 0; |
398 | dir->i_version++; | 397 | dir->i_version++; |
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index a54d33d95ada..c92d1b19fc0b 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c | |||
@@ -1695,9 +1695,9 @@ send_response: | |||
1695 | * can periodically run all locks owned by this node | 1695 | * can periodically run all locks owned by this node |
1696 | * and re-assert across the cluster... | 1696 | * and re-assert across the cluster... |
1697 | */ | 1697 | */ |
1698 | int dlm_do_assert_master(struct dlm_ctxt *dlm, | 1698 | static int dlm_do_assert_master(struct dlm_ctxt *dlm, |
1699 | struct dlm_lock_resource *res, | 1699 | struct dlm_lock_resource *res, |
1700 | void *nodemap, u32 flags) | 1700 | void *nodemap, u32 flags) |
1701 | { | 1701 | { |
1702 | struct dlm_assert_master assert; | 1702 | struct dlm_assert_master assert; |
1703 | int to, tmpret; | 1703 | int to, tmpret; |
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index 351130c9b734..f7794306b2bd 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c | |||
@@ -3042,7 +3042,7 @@ static int ocfs2_data_convert_worker(struct ocfs2_lock_res *lockres, | |||
3042 | inode = ocfs2_lock_res_inode(lockres); | 3042 | inode = ocfs2_lock_res_inode(lockres); |
3043 | mapping = inode->i_mapping; | 3043 | mapping = inode->i_mapping; |
3044 | 3044 | ||
3045 | if (S_ISREG(inode->i_mode)) | 3045 | if (!S_ISREG(inode->i_mode)) |
3046 | goto out; | 3046 | goto out; |
3047 | 3047 | ||
3048 | /* | 3048 | /* |
@@ -3219,8 +3219,8 @@ static int ocfs2_dentry_convert_worker(struct ocfs2_lock_res *lockres, | |||
3219 | return UNBLOCK_CONTINUE_POST; | 3219 | return UNBLOCK_CONTINUE_POST; |
3220 | } | 3220 | } |
3221 | 3221 | ||
3222 | void ocfs2_process_blocked_lock(struct ocfs2_super *osb, | 3222 | static void ocfs2_process_blocked_lock(struct ocfs2_super *osb, |
3223 | struct ocfs2_lock_res *lockres) | 3223 | struct ocfs2_lock_res *lockres) |
3224 | { | 3224 | { |
3225 | int status; | 3225 | int status; |
3226 | struct ocfs2_unblock_ctl ctl = {0, 0,}; | 3226 | struct ocfs2_unblock_ctl ctl = {0, 0,}; |
@@ -3356,7 +3356,7 @@ static int ocfs2_downconvert_thread_should_wake(struct ocfs2_super *osb) | |||
3356 | return should_wake; | 3356 | return should_wake; |
3357 | } | 3357 | } |
3358 | 3358 | ||
3359 | int ocfs2_downconvert_thread(void *arg) | 3359 | static int ocfs2_downconvert_thread(void *arg) |
3360 | { | 3360 | { |
3361 | int status = 0; | 3361 | int status = 0; |
3362 | struct ocfs2_super *osb = arg; | 3362 | struct ocfs2_super *osb = arg; |
diff --git a/fs/ocfs2/dlmglue.h b/fs/ocfs2/dlmglue.h index 1d5b0699d0a9..e3cf902404b4 100644 --- a/fs/ocfs2/dlmglue.h +++ b/fs/ocfs2/dlmglue.h | |||
@@ -109,8 +109,6 @@ void ocfs2_simple_drop_lockres(struct ocfs2_super *osb, | |||
109 | struct ocfs2_lock_res *lockres); | 109 | struct ocfs2_lock_res *lockres); |
110 | 110 | ||
111 | /* for the downconvert thread */ | 111 | /* for the downconvert thread */ |
112 | void ocfs2_process_blocked_lock(struct ocfs2_super *osb, | ||
113 | struct ocfs2_lock_res *lockres); | ||
114 | void ocfs2_wake_downconvert_thread(struct ocfs2_super *osb); | 112 | void ocfs2_wake_downconvert_thread(struct ocfs2_super *osb); |
115 | 113 | ||
116 | struct ocfs2_dlm_debug *ocfs2_new_dlm_debug(void); | 114 | struct ocfs2_dlm_debug *ocfs2_new_dlm_debug(void); |
diff --git a/fs/ocfs2/heartbeat.c b/fs/ocfs2/heartbeat.c index c0efd9489fe8..0758daf64da0 100644 --- a/fs/ocfs2/heartbeat.c +++ b/fs/ocfs2/heartbeat.c | |||
@@ -49,10 +49,15 @@ static inline void __ocfs2_node_map_set_bit(struct ocfs2_node_map *map, | |||
49 | static inline void __ocfs2_node_map_clear_bit(struct ocfs2_node_map *map, | 49 | static inline void __ocfs2_node_map_clear_bit(struct ocfs2_node_map *map, |
50 | int bit); | 50 | int bit); |
51 | static inline int __ocfs2_node_map_is_empty(struct ocfs2_node_map *map); | 51 | static inline int __ocfs2_node_map_is_empty(struct ocfs2_node_map *map); |
52 | static void __ocfs2_node_map_dup(struct ocfs2_node_map *target, | 52 | |
53 | struct ocfs2_node_map *from); | 53 | /* special case -1 for now |
54 | static void __ocfs2_node_map_set(struct ocfs2_node_map *target, | 54 | * TODO: should *really* make sure the calling func never passes -1!! */ |
55 | struct ocfs2_node_map *from); | 55 | static void ocfs2_node_map_init(struct ocfs2_node_map *map) |
56 | { | ||
57 | map->num_nodes = OCFS2_NODE_MAP_MAX_NODES; | ||
58 | memset(map->map, 0, BITS_TO_LONGS(OCFS2_NODE_MAP_MAX_NODES) * | ||
59 | sizeof(unsigned long)); | ||
60 | } | ||
56 | 61 | ||
57 | void ocfs2_init_node_maps(struct ocfs2_super *osb) | 62 | void ocfs2_init_node_maps(struct ocfs2_super *osb) |
58 | { | 63 | { |
@@ -136,15 +141,6 @@ void ocfs2_stop_heartbeat(struct ocfs2_super *osb) | |||
136 | mlog_errno(ret); | 141 | mlog_errno(ret); |
137 | } | 142 | } |
138 | 143 | ||
139 | /* special case -1 for now | ||
140 | * TODO: should *really* make sure the calling func never passes -1!! */ | ||
141 | void ocfs2_node_map_init(struct ocfs2_node_map *map) | ||
142 | { | ||
143 | map->num_nodes = OCFS2_NODE_MAP_MAX_NODES; | ||
144 | memset(map->map, 0, BITS_TO_LONGS(OCFS2_NODE_MAP_MAX_NODES) * | ||
145 | sizeof(unsigned long)); | ||
146 | } | ||
147 | |||
148 | static inline void __ocfs2_node_map_set_bit(struct ocfs2_node_map *map, | 144 | static inline void __ocfs2_node_map_set_bit(struct ocfs2_node_map *map, |
149 | int bit) | 145 | int bit) |
150 | { | 146 | { |
@@ -216,6 +212,8 @@ int ocfs2_node_map_is_empty(struct ocfs2_super *osb, | |||
216 | return ret; | 212 | return ret; |
217 | } | 213 | } |
218 | 214 | ||
215 | #if 0 | ||
216 | |||
219 | static void __ocfs2_node_map_dup(struct ocfs2_node_map *target, | 217 | static void __ocfs2_node_map_dup(struct ocfs2_node_map *target, |
220 | struct ocfs2_node_map *from) | 218 | struct ocfs2_node_map *from) |
221 | { | 219 | { |
@@ -254,6 +252,8 @@ static void __ocfs2_node_map_set(struct ocfs2_node_map *target, | |||
254 | target->map[i] = from->map[i]; | 252 | target->map[i] = from->map[i]; |
255 | } | 253 | } |
256 | 254 | ||
255 | #endif /* 0 */ | ||
256 | |||
257 | /* Returns whether the recovery bit was actually set - it may not be | 257 | /* Returns whether the recovery bit was actually set - it may not be |
258 | * if a node is still marked as needing recovery */ | 258 | * if a node is still marked as needing recovery */ |
259 | int ocfs2_recovery_map_set(struct ocfs2_super *osb, | 259 | int ocfs2_recovery_map_set(struct ocfs2_super *osb, |
diff --git a/fs/ocfs2/heartbeat.h b/fs/ocfs2/heartbeat.h index 56859211888a..eac63aed7611 100644 --- a/fs/ocfs2/heartbeat.h +++ b/fs/ocfs2/heartbeat.h | |||
@@ -33,7 +33,6 @@ void ocfs2_stop_heartbeat(struct ocfs2_super *osb); | |||
33 | 33 | ||
34 | /* node map functions - used to keep track of mounted and in-recovery | 34 | /* node map functions - used to keep track of mounted and in-recovery |
35 | * nodes. */ | 35 | * nodes. */ |
36 | void ocfs2_node_map_init(struct ocfs2_node_map *map); | ||
37 | int ocfs2_node_map_is_empty(struct ocfs2_super *osb, | 36 | int ocfs2_node_map_is_empty(struct ocfs2_super *osb, |
38 | struct ocfs2_node_map *map); | 37 | struct ocfs2_node_map *map); |
39 | void ocfs2_node_map_set_bit(struct ocfs2_super *osb, | 38 | void ocfs2_node_map_set_bit(struct ocfs2_super *osb, |
@@ -57,9 +56,5 @@ int ocfs2_recovery_map_set(struct ocfs2_super *osb, | |||
57 | int num); | 56 | int num); |
58 | void ocfs2_recovery_map_clear(struct ocfs2_super *osb, | 57 | void ocfs2_recovery_map_clear(struct ocfs2_super *osb, |
59 | int num); | 58 | int num); |
60 | /* returns 1 if bit is the only bit set in target, 0 otherwise */ | ||
61 | int ocfs2_node_map_is_only(struct ocfs2_super *osb, | ||
62 | struct ocfs2_node_map *target, | ||
63 | int bit); | ||
64 | 59 | ||
65 | #endif /* OCFS2_HEARTBEAT_H */ | 60 | #endif /* OCFS2_HEARTBEAT_H */ |
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index add1ffdc5c6c..ab83fd562429 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c | |||
@@ -120,9 +120,6 @@ int ocfs2_load_local_alloc(struct ocfs2_super *osb) | |||
120 | 120 | ||
121 | mlog_entry_void(); | 121 | mlog_entry_void(); |
122 | 122 | ||
123 | if (ocfs2_mount_local(osb)) | ||
124 | goto bail; | ||
125 | |||
126 | if (osb->local_alloc_size == 0) | 123 | if (osb->local_alloc_size == 0) |
127 | goto bail; | 124 | goto bail; |
128 | 125 | ||
@@ -588,8 +585,7 @@ int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, | |||
588 | while(bits_wanted--) | 585 | while(bits_wanted--) |
589 | ocfs2_set_bit(start++, bitmap); | 586 | ocfs2_set_bit(start++, bitmap); |
590 | 587 | ||
591 | alloc->id1.bitmap1.i_used = cpu_to_le32(*num_bits + | 588 | le32_add_cpu(&alloc->id1.bitmap1.i_used, *num_bits); |
592 | le32_to_cpu(alloc->id1.bitmap1.i_used)); | ||
593 | 589 | ||
594 | status = ocfs2_journal_dirty(handle, osb->local_alloc_bh); | 590 | status = ocfs2_journal_dirty(handle, osb->local_alloc_bh); |
595 | if (status < 0) { | 591 | if (status < 0) { |