dect
/
linux-2.6
Archived
13
0
Fork 0

Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  [PATCH] fs/ocfs2/aops.c: Correct use of ! and &
  [2.6 patch] ocfs2: make dlm_do_assert_master() static
  [2.6 patch] make ocfs2_downconvert_thread() static
  [2.6 patch] fs/ocfs2/: possible cleanups
  [PATCH] ocfs2: le*_add_cpu conversion
  ocfs2: Fix writeout in ocfs2_data_convert_worker()
  ocfs2: Enable localalloc for local mounts
This commit is contained in:
Linus Torvalds 2008-03-04 11:27:32 -08:00
commit c5750ee69f
8 changed files with 24 additions and 36 deletions

View File

@ -257,7 +257,7 @@ static int ocfs2_readpage_inline(struct inode *inode, struct page *page)
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
BUG_ON(!PageLocked(page)); BUG_ON(!PageLocked(page));
BUG_ON(!OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL); BUG_ON(!(OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL));
ret = ocfs2_read_block(osb, OCFS2_I(inode)->ip_blkno, &di_bh, ret = ocfs2_read_block(osb, OCFS2_I(inode)->ip_blkno, &di_bh,
OCFS2_BH_CACHED, inode); OCFS2_BH_CACHED, inode);

View File

@ -390,8 +390,7 @@ static int __ocfs2_delete_entry(handle_t *handle, struct inode *dir,
goto bail; goto bail;
} }
if (pde) if (pde)
pde->rec_len = le16_add_cpu(&pde->rec_len,
cpu_to_le16(le16_to_cpu(pde->rec_len) +
le16_to_cpu(de->rec_len)); le16_to_cpu(de->rec_len));
else else
de->inode = 0; de->inode = 0;

View File

@ -1695,7 +1695,7 @@ send_response:
* can periodically run all locks owned by this node * can periodically run all locks owned by this node
* and re-assert across the cluster... * and re-assert across the cluster...
*/ */
int dlm_do_assert_master(struct dlm_ctxt *dlm, static int dlm_do_assert_master(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res, struct dlm_lock_resource *res,
void *nodemap, u32 flags) void *nodemap, u32 flags)
{ {

View File

@ -3042,7 +3042,7 @@ static int ocfs2_data_convert_worker(struct ocfs2_lock_res *lockres,
inode = ocfs2_lock_res_inode(lockres); inode = ocfs2_lock_res_inode(lockres);
mapping = inode->i_mapping; mapping = inode->i_mapping;
if (S_ISREG(inode->i_mode)) if (!S_ISREG(inode->i_mode))
goto out; goto out;
/* /*
@ -3219,7 +3219,7 @@ static int ocfs2_dentry_convert_worker(struct ocfs2_lock_res *lockres,
return UNBLOCK_CONTINUE_POST; return UNBLOCK_CONTINUE_POST;
} }
void ocfs2_process_blocked_lock(struct ocfs2_super *osb, static void ocfs2_process_blocked_lock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres) struct ocfs2_lock_res *lockres)
{ {
int status; int status;
@ -3356,7 +3356,7 @@ static int ocfs2_downconvert_thread_should_wake(struct ocfs2_super *osb)
return should_wake; return should_wake;
} }
int ocfs2_downconvert_thread(void *arg) static int ocfs2_downconvert_thread(void *arg)
{ {
int status = 0; int status = 0;
struct ocfs2_super *osb = arg; struct ocfs2_super *osb = arg;

View File

@ -109,8 +109,6 @@ void ocfs2_simple_drop_lockres(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres); struct ocfs2_lock_res *lockres);
/* for the downconvert thread */ /* for the downconvert thread */
void ocfs2_process_blocked_lock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres);
void ocfs2_wake_downconvert_thread(struct ocfs2_super *osb); void ocfs2_wake_downconvert_thread(struct ocfs2_super *osb);
struct ocfs2_dlm_debug *ocfs2_new_dlm_debug(void); struct ocfs2_dlm_debug *ocfs2_new_dlm_debug(void);

View File

@ -49,10 +49,15 @@ static inline void __ocfs2_node_map_set_bit(struct ocfs2_node_map *map,
static inline void __ocfs2_node_map_clear_bit(struct ocfs2_node_map *map, static inline void __ocfs2_node_map_clear_bit(struct ocfs2_node_map *map,
int bit); int bit);
static inline int __ocfs2_node_map_is_empty(struct ocfs2_node_map *map); static inline int __ocfs2_node_map_is_empty(struct ocfs2_node_map *map);
static void __ocfs2_node_map_dup(struct ocfs2_node_map *target,
struct ocfs2_node_map *from); /* special case -1 for now
static void __ocfs2_node_map_set(struct ocfs2_node_map *target, * TODO: should *really* make sure the calling func never passes -1!! */
struct ocfs2_node_map *from); static void ocfs2_node_map_init(struct ocfs2_node_map *map)
{
map->num_nodes = OCFS2_NODE_MAP_MAX_NODES;
memset(map->map, 0, BITS_TO_LONGS(OCFS2_NODE_MAP_MAX_NODES) *
sizeof(unsigned long));
}
void ocfs2_init_node_maps(struct ocfs2_super *osb) void ocfs2_init_node_maps(struct ocfs2_super *osb)
{ {
@ -136,15 +141,6 @@ void ocfs2_stop_heartbeat(struct ocfs2_super *osb)
mlog_errno(ret); mlog_errno(ret);
} }
/* special case -1 for now
* TODO: should *really* make sure the calling func never passes -1!! */
void ocfs2_node_map_init(struct ocfs2_node_map *map)
{
map->num_nodes = OCFS2_NODE_MAP_MAX_NODES;
memset(map->map, 0, BITS_TO_LONGS(OCFS2_NODE_MAP_MAX_NODES) *
sizeof(unsigned long));
}
static inline void __ocfs2_node_map_set_bit(struct ocfs2_node_map *map, static inline void __ocfs2_node_map_set_bit(struct ocfs2_node_map *map,
int bit) int bit)
{ {
@ -216,6 +212,8 @@ int ocfs2_node_map_is_empty(struct ocfs2_super *osb,
return ret; return ret;
} }
#if 0
static void __ocfs2_node_map_dup(struct ocfs2_node_map *target, static void __ocfs2_node_map_dup(struct ocfs2_node_map *target,
struct ocfs2_node_map *from) struct ocfs2_node_map *from)
{ {
@ -254,6 +252,8 @@ static void __ocfs2_node_map_set(struct ocfs2_node_map *target,
target->map[i] = from->map[i]; target->map[i] = from->map[i];
} }
#endif /* 0 */
/* Returns whether the recovery bit was actually set - it may not be /* Returns whether the recovery bit was actually set - it may not be
* if a node is still marked as needing recovery */ * if a node is still marked as needing recovery */
int ocfs2_recovery_map_set(struct ocfs2_super *osb, int ocfs2_recovery_map_set(struct ocfs2_super *osb,

View File

@ -33,7 +33,6 @@ void ocfs2_stop_heartbeat(struct ocfs2_super *osb);
/* node map functions - used to keep track of mounted and in-recovery /* node map functions - used to keep track of mounted and in-recovery
* nodes. */ * nodes. */
void ocfs2_node_map_init(struct ocfs2_node_map *map);
int ocfs2_node_map_is_empty(struct ocfs2_super *osb, int ocfs2_node_map_is_empty(struct ocfs2_super *osb,
struct ocfs2_node_map *map); struct ocfs2_node_map *map);
void ocfs2_node_map_set_bit(struct ocfs2_super *osb, void ocfs2_node_map_set_bit(struct ocfs2_super *osb,
@ -57,9 +56,5 @@ int ocfs2_recovery_map_set(struct ocfs2_super *osb,
int num); int num);
void ocfs2_recovery_map_clear(struct ocfs2_super *osb, void ocfs2_recovery_map_clear(struct ocfs2_super *osb,
int num); int num);
/* returns 1 if bit is the only bit set in target, 0 otherwise */
int ocfs2_node_map_is_only(struct ocfs2_super *osb,
struct ocfs2_node_map *target,
int bit);
#endif /* OCFS2_HEARTBEAT_H */ #endif /* OCFS2_HEARTBEAT_H */

View File

@ -120,9 +120,6 @@ int ocfs2_load_local_alloc(struct ocfs2_super *osb)
mlog_entry_void(); mlog_entry_void();
if (ocfs2_mount_local(osb))
goto bail;
if (osb->local_alloc_size == 0) if (osb->local_alloc_size == 0)
goto bail; goto bail;
@ -588,8 +585,7 @@ int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb,
while(bits_wanted--) while(bits_wanted--)
ocfs2_set_bit(start++, bitmap); ocfs2_set_bit(start++, bitmap);
alloc->id1.bitmap1.i_used = cpu_to_le32(*num_bits + le32_add_cpu(&alloc->id1.bitmap1.i_used, *num_bits);
le32_to_cpu(alloc->id1.bitmap1.i_used));
status = ocfs2_journal_dirty(handle, osb->local_alloc_bh); status = ocfs2_journal_dirty(handle, osb->local_alloc_bh);
if (status < 0) { if (status < 0) {