[Ocfs2-commits] mfasheh commits r2756 - in branches/ocfs2-1.2/fs/ocfs2: . cluster dlm
svn-commits@oss.oracle.com
svn-commits at oss.oracle.com
Mon Jan 23 16:38:31 CST 2006
Author: mfasheh
Signed-off-by: jlbec
Date: 2006-01-23 16:37:55 -0600 (Mon, 23 Jan 2006)
New Revision: 2756
Modified:
branches/ocfs2-1.2/fs/ocfs2/aio.c
branches/ocfs2-1.2/fs/ocfs2/aio.h
branches/ocfs2-1.2/fs/ocfs2/alloc.c
branches/ocfs2-1.2/fs/ocfs2/alloc.h
branches/ocfs2-1.2/fs/ocfs2/aops.c
branches/ocfs2-1.2/fs/ocfs2/buffer_head_io.c
branches/ocfs2-1.2/fs/ocfs2/buffer_head_io.h
branches/ocfs2-1.2/fs/ocfs2/cluster/tcp.c
branches/ocfs2-1.2/fs/ocfs2/cluster/tcp.h
branches/ocfs2-1.2/fs/ocfs2/dcache.c
branches/ocfs2-1.2/fs/ocfs2/dir.c
branches/ocfs2-1.2/fs/ocfs2/dir.h
branches/ocfs2-1.2/fs/ocfs2/dlm/dlmast.c
branches/ocfs2-1.2/fs/ocfs2/dlm/dlmcommon.h
branches/ocfs2-1.2/fs/ocfs2/dlm/dlmconvert.c
branches/ocfs2-1.2/fs/ocfs2/dlm/dlmdomain.c
branches/ocfs2-1.2/fs/ocfs2/dlm/dlmlock.c
branches/ocfs2-1.2/fs/ocfs2/dlm/dlmmaster.c
branches/ocfs2-1.2/fs/ocfs2/dlm/dlmrecovery.c
branches/ocfs2-1.2/fs/ocfs2/dlm/dlmunlock.c
branches/ocfs2-1.2/fs/ocfs2/dlmglue.c
branches/ocfs2-1.2/fs/ocfs2/dlmglue.h
branches/ocfs2-1.2/fs/ocfs2/extent_map.c
branches/ocfs2-1.2/fs/ocfs2/extent_map.h
branches/ocfs2-1.2/fs/ocfs2/file.c
branches/ocfs2-1.2/fs/ocfs2/file.h
branches/ocfs2-1.2/fs/ocfs2/heartbeat.c
branches/ocfs2-1.2/fs/ocfs2/heartbeat.h
branches/ocfs2-1.2/fs/ocfs2/inode.c
branches/ocfs2-1.2/fs/ocfs2/inode.h
branches/ocfs2-1.2/fs/ocfs2/journal.c
branches/ocfs2-1.2/fs/ocfs2/journal.h
branches/ocfs2-1.2/fs/ocfs2/localalloc.c
branches/ocfs2-1.2/fs/ocfs2/localalloc.h
branches/ocfs2-1.2/fs/ocfs2/mmap.c
branches/ocfs2-1.2/fs/ocfs2/namei.c
branches/ocfs2-1.2/fs/ocfs2/namei.h
branches/ocfs2-1.2/fs/ocfs2/ocfs1_fs_compat.h
branches/ocfs2-1.2/fs/ocfs2/ocfs2.h
branches/ocfs2-1.2/fs/ocfs2/ocfs2_fs.h
branches/ocfs2-1.2/fs/ocfs2/proc.c
branches/ocfs2-1.2/fs/ocfs2/proc.h
branches/ocfs2-1.2/fs/ocfs2/slot_map.c
branches/ocfs2-1.2/fs/ocfs2/slot_map.h
branches/ocfs2-1.2/fs/ocfs2/suballoc.c
branches/ocfs2-1.2/fs/ocfs2/suballoc.h
branches/ocfs2-1.2/fs/ocfs2/super.c
branches/ocfs2-1.2/fs/ocfs2/super.h
branches/ocfs2-1.2/fs/ocfs2/symlink.c
branches/ocfs2-1.2/fs/ocfs2/sysfile.c
branches/ocfs2-1.2/fs/ocfs2/sysfile.h
branches/ocfs2-1.2/fs/ocfs2/vote.c
branches/ocfs2-1.2/fs/ocfs2/vote.h
Log:
* typedef conversion. this will make diffing into the stable tree easier.
Signed-off-by: jlbec
Modified: branches/ocfs2-1.2/fs/ocfs2/aio.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/aio.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/aio.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -46,10 +46,9 @@
#include "mmap.h"
#include "suballoc.h"
-
struct ocfs2_kiocb_private {
struct ocfs2_kiocb_private *kp_teardown_next;
- ocfs2_super *kp_osb;
+ struct ocfs2_super *kp_osb;
unsigned kp_have_alloc_sem:1,
kp_have_write_locks:1;
struct inode *kp_inode;
@@ -74,7 +73,7 @@
void okp_teardown_from_list(void *data)
{
- ocfs2_super *osb = data;
+ struct ocfs2_super *osb = data;
struct ocfs2_kiocb_private *okp, *next;
for (okp = xchg(&osb->osb_okp_teardown_next, NULL); okp != NULL;
@@ -111,7 +110,7 @@
static void ocfs2_ki_dtor(struct kiocb *iocb)
{
struct ocfs2_kiocb_private *next, *okp = iocb->private;
- ocfs2_super *osb = okp->kp_osb;
+ struct ocfs2_super *osb = okp->kp_osb;
mlog(0, "iocb %p okp %p\n", iocb, okp);
@@ -137,7 +136,7 @@
}
/* see ocfs2_ki_dtor() */
-void ocfs2_wait_for_okp_destruction(ocfs2_super *osb)
+void ocfs2_wait_for_okp_destruction(struct ocfs2_super *osb)
{
/* first wait for okps to enter the work queue */
wait_event(osb->osb_okp_pending_wq,
@@ -166,7 +165,7 @@
{
struct inode *inode = iocb->ki_filp->f_dentry->d_inode;
struct ocfs2_kiocb_private *okp;
- ocfs2_super *osb;
+ struct ocfs2_super *osb;
okp = kcalloc(1, sizeof(*okp), GFP_KERNEL);
if (okp == NULL) {
Modified: branches/ocfs2-1.2/fs/ocfs2/aio.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/aio.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/aio.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -32,6 +32,6 @@
loff_t pos);
void okp_teardown_from_list(void *data);
-void ocfs2_wait_for_okp_destruction(ocfs2_super *osb);
+void ocfs2_wait_for_okp_destruction(struct ocfs2_super *osb);
#endif /* OCFS2_AIO_H */
Modified: branches/ocfs2-1.2/fs/ocfs2/alloc.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/alloc.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/alloc.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -48,52 +48,52 @@
#include "buffer_head_io.h"
static int ocfs2_extent_contig(struct inode *inode,
- ocfs2_extent_rec *ext,
+ struct ocfs2_extent_rec *ext,
u64 blkno);
-static int ocfs2_create_new_meta_bhs(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_create_new_meta_bhs(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *inode,
int wanted,
- ocfs2_alloc_context *meta_ac,
+ struct ocfs2_alloc_context *meta_ac,
struct buffer_head *bhs[]);
-static int ocfs2_add_branch(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_add_branch(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *inode,
struct buffer_head *fe_bh,
struct buffer_head *eb_bh,
struct buffer_head *last_eb_bh,
- ocfs2_alloc_context *meta_ac);
+ struct ocfs2_alloc_context *meta_ac);
-static int ocfs2_shift_tree_depth(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_shift_tree_depth(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *inode,
struct buffer_head *fe_bh,
- ocfs2_alloc_context *meta_ac,
+ struct ocfs2_alloc_context *meta_ac,
struct buffer_head **ret_new_eb_bh);
-static int ocfs2_do_insert_extent(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_do_insert_extent(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *inode,
struct buffer_head *fe_bh,
u64 blkno,
u32 new_clusters);
-static int ocfs2_find_branch_target(ocfs2_super *osb,
+static int ocfs2_find_branch_target(struct ocfs2_super *osb,
struct inode *inode,
struct buffer_head *fe_bh,
struct buffer_head **target_bh);
-static int ocfs2_find_new_last_ext_blk(ocfs2_super *osb,
+static int ocfs2_find_new_last_ext_blk(struct ocfs2_super *osb,
struct inode *inode,
- ocfs2_dinode *fe,
+ struct ocfs2_dinode *fe,
unsigned int new_i_clusters,
struct buffer_head *old_last_eb,
struct buffer_head **new_last_eb);
static int ocfs2_extent_contig(struct inode *inode,
- ocfs2_extent_rec *ext,
+ struct ocfs2_extent_rec *ext,
u64 blkno)
{
return blkno == (le64_to_cpu(ext->e_blkno) +
@@ -104,13 +104,13 @@
/*
* How many free extents have we got before we need more meta data?
*/
-int ocfs2_num_free_extents(ocfs2_super *osb,
+int ocfs2_num_free_extents(struct ocfs2_super *osb,
struct inode *inode,
- ocfs2_dinode *fe)
+ struct ocfs2_dinode *fe)
{
int retval;
- ocfs2_extent_list *el;
- ocfs2_extent_block *eb;
+ struct ocfs2_extent_list *el;
+ struct ocfs2_extent_block *eb;
struct buffer_head *eb_bh = NULL;
mlog_entry_void();
@@ -128,7 +128,7 @@
mlog_errno(retval);
goto bail;
}
- eb = (ocfs2_extent_block *) eb_bh->b_data;
+ eb = (struct ocfs2_extent_block *) eb_bh->b_data;
el = &eb->h_list;
} else
el = &fe->id2.i_list;
@@ -149,18 +149,18 @@
* sets h_signature, h_blkno, h_suballoc_bit, h_suballoc_slot, and
* l_count for you
*/
-static int ocfs2_create_new_meta_bhs(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_create_new_meta_bhs(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *inode,
int wanted,
- ocfs2_alloc_context *meta_ac,
+ struct ocfs2_alloc_context *meta_ac,
struct buffer_head *bhs[])
{
int count, status, i;
u16 suballoc_bit_start;
u32 num_got;
u64 first_blkno;
- ocfs2_extent_block *eb;
+ struct ocfs2_extent_block *eb;
mlog_entry_void();
@@ -195,7 +195,7 @@
}
memset(bhs[i]->b_data, 0, osb->sb->s_blocksize);
- eb = (ocfs2_extent_block *) bhs[i]->b_data;
+ eb = (struct ocfs2_extent_block *) bhs[i]->b_data;
/* Ok, setup the minimal stuff here. */
strcpy(eb->h_signature, OCFS2_EXTENT_BLOCK_SIGNATURE);
eb->h_blkno = cpu_to_le64(first_blkno);
@@ -250,31 +250,31 @@
* the new branch will be 'empty' in the sense that every block will
* contain a single record with e_clusters == 0.
*/
-static int ocfs2_add_branch(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_add_branch(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *inode,
struct buffer_head *fe_bh,
struct buffer_head *eb_bh,
struct buffer_head *last_eb_bh,
- ocfs2_alloc_context *meta_ac)
+ struct ocfs2_alloc_context *meta_ac)
{
int status, new_blocks, i;
u64 next_blkno, new_last_eb_blk;
struct buffer_head *bh;
struct buffer_head **new_eb_bhs = NULL;
- ocfs2_dinode *fe;
- ocfs2_extent_block *eb;
- ocfs2_extent_list *eb_el;
- ocfs2_extent_list *el;
+ struct ocfs2_dinode *fe;
+ struct ocfs2_extent_block *eb;
+ struct ocfs2_extent_list *eb_el;
+ struct ocfs2_extent_list *el;
mlog_entry_void();
BUG_ON(!last_eb_bh);
- fe = (ocfs2_dinode *) fe_bh->b_data;
+ fe = (struct ocfs2_dinode *) fe_bh->b_data;
if (eb_bh) {
- eb = (ocfs2_extent_block *) eb_bh->b_data;
+ eb = (struct ocfs2_extent_block *) eb_bh->b_data;
el = &eb->h_list;
} else
el = &fe->id2.i_list;
@@ -310,7 +310,7 @@
next_blkno = new_last_eb_blk = 0;
for(i = 0; i < new_blocks; i++) {
bh = new_eb_bhs[i];
- eb = (ocfs2_extent_block *) bh->b_data;
+ eb = (struct ocfs2_extent_block *) bh->b_data;
if (!OCFS2_IS_VALID_EXTENT_BLOCK(eb)) {
OCFS2_RO_ON_INVALID_EXTENT_BLOCK(inode->i_sb, eb);
status = -EIO;
@@ -382,7 +382,7 @@
* next_leaf on the previously last-extent-block. */
fe->i_last_eb_blk = cpu_to_le64(new_last_eb_blk);
- eb = (ocfs2_extent_block *) last_eb_bh->b_data;
+ eb = (struct ocfs2_extent_block *) last_eb_bh->b_data;
eb->h_next_leaf_blk = cpu_to_le64(new_last_eb_blk);
status = ocfs2_journal_dirty(handle, last_eb_bh);
@@ -415,19 +415,19 @@
* returns back the new extent block so you can add a branch to it
* after this call.
*/
-static int ocfs2_shift_tree_depth(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_shift_tree_depth(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *inode,
struct buffer_head *fe_bh,
- ocfs2_alloc_context *meta_ac,
+ struct ocfs2_alloc_context *meta_ac,
struct buffer_head **ret_new_eb_bh)
{
int status, i;
struct buffer_head *new_eb_bh = NULL;
- ocfs2_dinode *fe;
- ocfs2_extent_block *eb;
- ocfs2_extent_list *fe_el;
- ocfs2_extent_list *eb_el;
+ struct ocfs2_dinode *fe;
+ struct ocfs2_extent_block *eb;
+ struct ocfs2_extent_list *fe_el;
+ struct ocfs2_extent_list *eb_el;
mlog_entry_void();
@@ -438,7 +438,7 @@
goto bail;
}
- eb = (ocfs2_extent_block *) new_eb_bh->b_data;
+ eb = (struct ocfs2_extent_block *) new_eb_bh->b_data;
if (!OCFS2_IS_VALID_EXTENT_BLOCK(eb)) {
OCFS2_RO_ON_INVALID_EXTENT_BLOCK(inode->i_sb, eb);
status = -EIO;
@@ -446,7 +446,7 @@
}
eb_el = &eb->h_list;
- fe = (ocfs2_dinode *) fe_bh->b_data;
+ fe = (struct ocfs2_dinode *) fe_bh->b_data;
fe_el = &fe->id2.i_list;
status = ocfs2_journal_access(handle, inode, new_eb_bh,
@@ -517,8 +517,8 @@
* extent. Updates all the extent blocks (and the dinode) on the way
* down.
*/
-static int ocfs2_do_insert_extent(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_do_insert_extent(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *inode,
struct buffer_head *fe_bh,
u64 start_blk,
@@ -528,9 +528,9 @@
u64 next_blkno;
u16 next_free;
struct buffer_head **eb_bhs = NULL;
- ocfs2_dinode *fe;
- ocfs2_extent_block *eb;
- ocfs2_extent_list *el;
+ struct ocfs2_dinode *fe;
+ struct ocfs2_extent_block *eb;
+ struct ocfs2_extent_list *el;
mlog_entry_void();
@@ -541,7 +541,7 @@
goto bail;
}
- fe = (ocfs2_dinode *) fe_bh->b_data;
+ fe = (struct ocfs2_dinode *) fe_bh->b_data;
el = &fe->id2.i_list;
if (el->l_tree_depth) {
/* This is another operation where we want to be
@@ -579,7 +579,7 @@
mlog_errno(status);
goto bail;
}
- eb = (ocfs2_extent_block *) eb_bhs[i]->b_data;
+ eb = (struct ocfs2_extent_block *) eb_bhs[i]->b_data;
if (!OCFS2_IS_VALID_EXTENT_BLOCK(eb)) {
OCFS2_RO_ON_INVALID_EXTENT_BLOCK(inode->i_sb,
eb);
@@ -619,7 +619,7 @@
new_clusters);
/* (num_bhs - 1) to avoid the leaf */
for(i = 0; i < (num_bhs - 1); i++) {
- eb = (ocfs2_extent_block *) eb_bhs[i]->b_data;
+ eb = (struct ocfs2_extent_block *) eb_bhs[i]->b_data;
el = &eb->h_list;
/* finally, make our actual change to the
@@ -635,7 +635,7 @@
BUG_ON(i != (num_bhs - 1));
/* note that the leaf block wasn't touched in
* the loop above */
- eb = (ocfs2_extent_block *) eb_bhs[num_bhs - 1]->b_data;
+ eb = (struct ocfs2_extent_block *) eb_bhs[num_bhs - 1]->b_data;
el = &eb->h_list;
BUG_ON(el->l_tree_depth);
}
@@ -723,16 +723,16 @@
*
* return status < 0 indicates an error.
*/
-static int ocfs2_find_branch_target(ocfs2_super *osb,
+static int ocfs2_find_branch_target(struct ocfs2_super *osb,
struct inode *inode,
struct buffer_head *fe_bh,
struct buffer_head **target_bh)
{
int status = 0, i;
u64 blkno;
- ocfs2_dinode *fe;
- ocfs2_extent_block *eb;
- ocfs2_extent_list *el;
+ struct ocfs2_dinode *fe;
+ struct ocfs2_extent_block *eb;
+ struct ocfs2_extent_list *el;
struct buffer_head *bh = NULL;
struct buffer_head *lowest_bh = NULL;
@@ -740,7 +740,7 @@
*target_bh = NULL;
- fe = (ocfs2_dinode *) fe_bh->b_data;
+ fe = (struct ocfs2_dinode *) fe_bh->b_data;
el = &fe->id2.i_list;
while(le16_to_cpu(el->l_tree_depth) > 1) {
@@ -774,7 +774,7 @@
goto bail;
}
- eb = (ocfs2_extent_block *) bh->b_data;
+ eb = (struct ocfs2_extent_block *) bh->b_data;
if (!OCFS2_IS_VALID_EXTENT_BLOCK(eb)) {
OCFS2_RO_ON_INVALID_EXTENT_BLOCK(inode->i_sb, eb);
status = -EIO;
@@ -807,20 +807,20 @@
}
/* the caller needs to update fe->i_clusters */
-int ocfs2_insert_extent(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+int ocfs2_insert_extent(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *inode,
struct buffer_head *fe_bh,
u64 start_blk,
u32 new_clusters,
- ocfs2_alloc_context *meta_ac)
+ struct ocfs2_alloc_context *meta_ac)
{
int status, i, shift;
struct buffer_head *last_eb_bh = NULL;
struct buffer_head *bh = NULL;
- ocfs2_dinode *fe;
- ocfs2_extent_block *eb;
- ocfs2_extent_list *el;
+ struct ocfs2_dinode *fe;
+ struct ocfs2_extent_block *eb;
+ struct ocfs2_extent_list *el;
mlog_entry_void();
@@ -828,7 +828,7 @@
"inode %"MLFu64"\n",
new_clusters, start_blk, OCFS2_I(inode)->ip_blkno);
- fe = (ocfs2_dinode *) fe_bh->b_data;
+ fe = (struct ocfs2_dinode *) fe_bh->b_data;
el = &fe->id2.i_list;
if (el->l_tree_depth) {
@@ -839,7 +839,7 @@
mlog_exit(status);
goto bail;
}
- eb = (ocfs2_extent_block *) last_eb_bh->b_data;
+ eb = (struct ocfs2_extent_block *) last_eb_bh->b_data;
el = &eb->h_list;
}
@@ -916,13 +916,13 @@
return status;
}
-static inline int ocfs2_truncate_log_needs_flush(ocfs2_super *osb)
+static inline int ocfs2_truncate_log_needs_flush(struct ocfs2_super *osb)
{
struct buffer_head *tl_bh = osb->osb_tl_bh;
- ocfs2_dinode *di;
- ocfs2_truncate_log *tl;
+ struct ocfs2_dinode *di;
+ struct ocfs2_truncate_log *tl;
- di = (ocfs2_dinode *) tl_bh->b_data;
+ di = (struct ocfs2_dinode *) tl_bh->b_data;
tl = &di->id2.i_dealloc;
mlog_bug_on_msg(le16_to_cpu(tl->tl_used) > le16_to_cpu(tl->tl_count),
@@ -932,7 +932,7 @@
return le16_to_cpu(tl->tl_used) == le16_to_cpu(tl->tl_count);
}
-static int ocfs2_truncate_log_can_coalesce(ocfs2_truncate_log *tl,
+static int ocfs2_truncate_log_can_coalesce(struct ocfs2_truncate_log *tl,
unsigned int new_start)
{
unsigned int tail_index;
@@ -949,8 +949,8 @@
return current_tail == new_start;
}
-static int ocfs2_truncate_log_append(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_truncate_log_append(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
u64 start_blk,
unsigned int num_clusters)
{
@@ -958,8 +958,8 @@
unsigned int start_cluster, tl_count;
struct inode *tl_inode = osb->osb_tl_inode;
struct buffer_head *tl_bh = osb->osb_tl_bh;
- ocfs2_dinode *di;
- ocfs2_truncate_log *tl;
+ struct ocfs2_dinode *di;
+ struct ocfs2_truncate_log *tl;
mlog_entry("start_blk = %"MLFu64", num_clusters = %u\n", start_blk,
num_clusters);
@@ -968,7 +968,7 @@
start_cluster = ocfs2_blocks_to_clusters(osb->sb, start_blk);
- di = (ocfs2_dinode *) tl_bh->b_data;
+ di = (struct ocfs2_dinode *) tl_bh->b_data;
tl = &di->id2.i_dealloc;
if (!OCFS2_IS_VALID_DINODE(di)) {
OCFS2_RO_ON_INVALID_DINODE(osb->sb, di);
@@ -1031,8 +1031,8 @@
return status;
}
-static int ocfs2_replay_truncate_records(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_replay_truncate_records(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *data_alloc_inode,
struct buffer_head *data_alloc_bh)
{
@@ -1040,15 +1040,15 @@
int i;
unsigned int num_clusters;
u64 start_blk;
- ocfs2_truncate_rec rec;
- ocfs2_dinode *di;
- ocfs2_truncate_log *tl;
+ struct ocfs2_truncate_rec rec;
+ struct ocfs2_dinode *di;
+ struct ocfs2_truncate_log *tl;
struct inode *tl_inode = osb->osb_tl_inode;
struct buffer_head *tl_bh = osb->osb_tl_bh;
mlog_entry_void();
- di = (ocfs2_dinode *) tl_bh->b_data;
+ di = (struct ocfs2_dinode *) tl_bh->b_data;
tl = &di->id2.i_dealloc;
i = le16_to_cpu(tl->tl_used) - 1;
while (i >= 0) {
@@ -1107,23 +1107,23 @@
}
/* Expects you to already be holding tl_inode->i_mutex */
-static int __ocfs2_flush_truncate_log(ocfs2_super *osb)
+static int __ocfs2_flush_truncate_log(struct ocfs2_super *osb)
{
int status;
unsigned int num_to_flush;
- ocfs2_journal_handle *handle = NULL;
+ struct ocfs2_journal_handle *handle = NULL;
struct inode *tl_inode = osb->osb_tl_inode;
struct inode *data_alloc_inode = NULL;
struct buffer_head *tl_bh = osb->osb_tl_bh;
struct buffer_head *data_alloc_bh = NULL;
- ocfs2_dinode *di;
- ocfs2_truncate_log *tl;
+ struct ocfs2_dinode *di;
+ struct ocfs2_truncate_log *tl;
mlog_entry_void();
BUG_ON(mutex_trylock(&tl_inode->i_mutex));
- di = (ocfs2_dinode *) tl_bh->b_data;
+ di = (struct ocfs2_dinode *) tl_bh->b_data;
tl = &di->id2.i_dealloc;
if (!OCFS2_IS_VALID_DINODE(di)) {
OCFS2_RO_ON_INVALID_DINODE(osb->sb, di);
@@ -1191,7 +1191,7 @@
return status;
}
-int ocfs2_flush_truncate_log(ocfs2_super *osb)
+int ocfs2_flush_truncate_log(struct ocfs2_super *osb)
{
int status;
struct inode *tl_inode = osb->osb_tl_inode;
@@ -1206,7 +1206,7 @@
static void ocfs2_truncate_log_worker(void *data)
{
int status;
- ocfs2_super *osb = data;
+ struct ocfs2_super *osb = data;
mlog_entry_void();
@@ -1218,7 +1218,7 @@
}
#define OCFS2_TRUNCATE_LOG_FLUSH_INTERVAL (2 * HZ)
-void ocfs2_schedule_truncate_log_flush(ocfs2_super *osb,
+void ocfs2_schedule_truncate_log_flush(struct ocfs2_super *osb,
int cancel)
{
if (osb->osb_tl_inode) {
@@ -1232,7 +1232,7 @@
}
}
-static int ocfs2_get_truncate_log_info(ocfs2_super *osb,
+static int ocfs2_get_truncate_log_info(struct ocfs2_super *osb,
int slot_num,
struct inode **tl_inode,
struct buffer_head **tl_bh)
@@ -1269,15 +1269,15 @@
* truncate log and pass back a copy for processing later. if the
* truncate log does not require processing, a *tl_copy is set to
* NULL. */
-int ocfs2_begin_truncate_log_recovery(ocfs2_super *osb,
+int ocfs2_begin_truncate_log_recovery(struct ocfs2_super *osb,
int slot_num,
- ocfs2_dinode **tl_copy)
+ struct ocfs2_dinode **tl_copy)
{
int status;
struct inode *tl_inode = NULL;
struct buffer_head *tl_bh = NULL;
- ocfs2_dinode *di;
- ocfs2_truncate_log *tl;
+ struct ocfs2_dinode *di;
+ struct ocfs2_truncate_log *tl;
*tl_copy = NULL;
@@ -1289,7 +1289,7 @@
goto bail;
}
- di = (ocfs2_dinode *) tl_bh->b_data;
+ di = (struct ocfs2_dinode *) tl_bh->b_data;
tl = &di->id2.i_dealloc;
if (!OCFS2_IS_VALID_DINODE(di)) {
OCFS2_RO_ON_INVALID_DINODE(tl_inode->i_sb, di);
@@ -1338,16 +1338,16 @@
return status;
}
-int ocfs2_complete_truncate_log_recovery(ocfs2_super *osb,
- ocfs2_dinode *tl_copy)
+int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb,
+ struct ocfs2_dinode *tl_copy)
{
int status = 0;
int i;
unsigned int clusters, num_recs, start_cluster;
u64 start_blk;
- ocfs2_journal_handle *handle;
+ struct ocfs2_journal_handle *handle;
struct inode *tl_inode = osb->osb_tl_inode;
- ocfs2_truncate_log *tl;
+ struct ocfs2_truncate_log *tl;
mlog_entry_void();
@@ -1399,7 +1399,7 @@
return status;
}
-void ocfs2_truncate_log_shutdown(ocfs2_super *osb)
+void ocfs2_truncate_log_shutdown(struct ocfs2_super *osb)
{
int status;
struct inode *tl_inode = osb->osb_tl_inode;
@@ -1421,7 +1421,7 @@
mlog_exit_void();
}
-int ocfs2_truncate_log_init(ocfs2_super *osb)
+int ocfs2_truncate_log_init(struct ocfs2_super *osb)
{
int status;
struct inode *tl_inode = NULL;
@@ -1451,17 +1451,17 @@
* block will be deleted, and if it will, what the new last extent
* block will be so we can update his h_next_leaf_blk field, as well
* as the dinodes i_last_eb_blk */
-static int ocfs2_find_new_last_ext_blk(ocfs2_super *osb,
- struct inode *inode,
- ocfs2_dinode *fe,
- u32 new_i_clusters,
- struct buffer_head *old_last_eb,
- struct buffer_head **new_last_eb)
+static int ocfs2_find_new_last_ext_blk(struct ocfs2_super *osb,
+ struct inode *inode,
+ struct ocfs2_dinode *fe,
+ u32 new_i_clusters,
+ struct buffer_head *old_last_eb,
+ struct buffer_head **new_last_eb)
{
int i, status = 0;
u64 block = 0;
- ocfs2_extent_block *eb;
- ocfs2_extent_list *el;
+ struct ocfs2_extent_block *eb;
+ struct ocfs2_extent_list *el;
struct buffer_head *bh = NULL;
*new_last_eb = NULL;
@@ -1481,7 +1481,7 @@
if (!new_i_clusters)
goto bail;
- eb = (ocfs2_extent_block *) old_last_eb->b_data;
+ eb = (struct ocfs2_extent_block *) old_last_eb->b_data;
el = &(eb->h_list);
BUG_ON(!el->l_next_free_rec);
@@ -1516,7 +1516,7 @@
mlog_errno(status);
goto bail;
}
- eb = (ocfs2_extent_block *) bh->b_data;
+ eb = (struct ocfs2_extent_block *) bh->b_data;
el = &eb->h_list;
if (!OCFS2_IS_VALID_EXTENT_BLOCK(eb)) {
OCFS2_RO_ON_INVALID_EXTENT_BLOCK(inode->i_sb, eb);
@@ -1535,25 +1535,25 @@
return status;
}
-static int ocfs2_do_truncate(ocfs2_super *osb,
- unsigned int clusters_to_del,
- struct inode *inode,
- struct buffer_head *fe_bh,
- struct buffer_head *old_last_eb_bh,
- ocfs2_journal_handle *handle,
- struct ocfs2_truncate_context *tc)
+static int ocfs2_do_truncate(struct ocfs2_super *osb,
+ unsigned int clusters_to_del,
+ struct inode *inode,
+ struct buffer_head *fe_bh,
+ struct buffer_head *old_last_eb_bh,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_truncate_context *tc)
{
int status, i, depth;
- ocfs2_dinode *fe;
- ocfs2_extent_block *eb;
- ocfs2_extent_block *last_eb = NULL;
- ocfs2_extent_list *el;
+ struct ocfs2_dinode *fe;
+ struct ocfs2_extent_block *eb;
+ struct ocfs2_extent_block *last_eb = NULL;
+ struct ocfs2_extent_list *el;
struct buffer_head *eb_bh = NULL;
struct buffer_head *last_eb_bh = NULL;
u64 next_eb = 0;
u64 delete_blk = 0;
- fe = (ocfs2_dinode *) fe_bh->b_data;
+ fe = (struct ocfs2_dinode *) fe_bh->b_data;
status = ocfs2_find_new_last_ext_blk(osb,
inode,
@@ -1567,7 +1567,7 @@
goto bail;
}
if (last_eb_bh)
- last_eb = (ocfs2_extent_block *) last_eb_bh->b_data;
+ last_eb = (struct ocfs2_extent_block *) last_eb_bh->b_data;
status = ocfs2_journal_access(handle, inode, fe_bh,
OCFS2_JOURNAL_ACCESS_WRITE);
@@ -1652,7 +1652,7 @@
mlog_errno(status);
goto bail;
}
- eb = (ocfs2_extent_block *)eb_bh->b_data;
+ eb = (struct ocfs2_extent_block *)eb_bh->b_data;
if (!OCFS2_IS_VALID_EXTENT_BLOCK(eb)) {
OCFS2_RO_ON_INVALID_EXTENT_BLOCK(inode->i_sb, eb);
status = -EIO;
@@ -1755,7 +1755,7 @@
*
* WARNING: This will kfree the truncate context
*/
-int ocfs2_commit_truncate(ocfs2_super *osb,
+int ocfs2_commit_truncate(struct ocfs2_super *osb,
struct inode *inode,
struct buffer_head *fe_bh,
struct ocfs2_truncate_context *tc)
@@ -1763,11 +1763,11 @@
int status, i, credits, tl_sem = 0;
u32 clusters_to_del, target_i_clusters;
u64 last_eb = 0;
- ocfs2_dinode *fe;
- ocfs2_extent_block *eb;
- ocfs2_extent_list *el;
+ struct ocfs2_dinode *fe;
+ struct ocfs2_extent_block *eb;
+ struct ocfs2_extent_list *el;
struct buffer_head *last_eb_bh;
- ocfs2_journal_handle *handle = NULL;
+ struct ocfs2_journal_handle *handle = NULL;
struct inode *tl_inode = osb->osb_tl_inode;
mlog_entry_void();
@@ -1780,10 +1780,10 @@
last_eb_bh = tc->tc_last_eb_bh;
tc->tc_last_eb_bh = NULL;
- fe = (ocfs2_dinode *) fe_bh->b_data;
+ fe = (struct ocfs2_dinode *) fe_bh->b_data;
if (fe->id2.i_list.l_tree_depth) {
- eb = (ocfs2_extent_block *) last_eb_bh->b_data;
+ eb = (struct ocfs2_extent_block *) last_eb_bh->b_data;
el = &eb->h_list;
} else
el = &fe->id2.i_list;
@@ -1817,7 +1817,7 @@
mlog_errno(status);
goto bail;
}
- eb = (ocfs2_extent_block *) last_eb_bh->b_data;
+ eb = (struct ocfs2_extent_block *) last_eb_bh->b_data;
if (!OCFS2_IS_VALID_EXTENT_BLOCK(eb)) {
OCFS2_RO_ON_INVALID_EXTENT_BLOCK(inode->i_sb, eb);
status = -EIO;
@@ -1909,16 +1909,16 @@
* inodes need to be locked and will put them on the returned truncate
* context.
*/
-int ocfs2_prepare_truncate(ocfs2_super *osb,
+int ocfs2_prepare_truncate(struct ocfs2_super *osb,
struct inode *inode,
struct buffer_head *fe_bh,
struct ocfs2_truncate_context **tc)
{
int status, metadata_delete;
unsigned int new_i_clusters;
- ocfs2_dinode *fe;
- ocfs2_extent_block *eb;
- ocfs2_extent_list *el;
+ struct ocfs2_dinode *fe;
+ struct ocfs2_extent_block *eb;
+ struct ocfs2_extent_list *el;
struct buffer_head *last_eb_bh = NULL;
struct inode *ext_alloc_inode = NULL;
struct buffer_head *ext_alloc_bh = NULL;
@@ -1929,7 +1929,7 @@
new_i_clusters = ocfs2_clusters_for_bytes(osb->sb,
i_size_read(inode));
- fe = (ocfs2_dinode *) fe_bh->b_data;
+ fe = (struct ocfs2_dinode *) fe_bh->b_data;
mlog(0, "fe->i_clusters = %u, new_i_clusters = %u, fe->i_size ="
"%"MLFu64"\n", fe->i_clusters, new_i_clusters, fe->i_size);
@@ -1967,7 +1967,7 @@
mlog_errno(status);
goto bail;
}
- eb = (ocfs2_extent_block *) last_eb_bh->b_data;
+ eb = (struct ocfs2_extent_block *) last_eb_bh->b_data;
if (!OCFS2_IS_VALID_EXTENT_BLOCK(eb)) {
OCFS2_RO_ON_INVALID_EXTENT_BLOCK(inode->i_sb, eb);
Modified: branches/ocfs2-1.2/fs/ocfs2/alloc.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/alloc.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/alloc.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -26,19 +26,19 @@
#ifndef OCFS2_ALLOC_H
#define OCFS2_ALLOC_H
-struct _ocfs2_alloc_context;
-int ocfs2_insert_extent(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+struct ocfs2_alloc_context;
+int ocfs2_insert_extent(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *inode,
struct buffer_head *fe_bh,
u64 blkno,
u32 new_clusters,
- struct _ocfs2_alloc_context *meta_ac);
-int ocfs2_num_free_extents(ocfs2_super *osb,
+ struct ocfs2_alloc_context *meta_ac);
+int ocfs2_num_free_extents(struct ocfs2_super *osb,
struct inode *inode,
- ocfs2_dinode *fe);
+ struct ocfs2_dinode *fe);
/* how many new metadata chunks would an allocation need at maximum? */
-static inline int ocfs2_extend_meta_needed(ocfs2_dinode *fe)
+static inline int ocfs2_extend_meta_needed(struct ocfs2_dinode *fe)
{
/*
* Rather than do all the work of determining how much we need
@@ -51,16 +51,16 @@
return le16_to_cpu(fe->id2.i_list.l_tree_depth) + 2;
}
-int ocfs2_truncate_log_init(ocfs2_super *osb);
-void ocfs2_truncate_log_shutdown(ocfs2_super *osb);
-void ocfs2_schedule_truncate_log_flush(ocfs2_super *osb,
+int ocfs2_truncate_log_init(struct ocfs2_super *osb);
+void ocfs2_truncate_log_shutdown(struct ocfs2_super *osb);
+void ocfs2_schedule_truncate_log_flush(struct ocfs2_super *osb,
int cancel);
-int ocfs2_flush_truncate_log(ocfs2_super *osb);
-int ocfs2_begin_truncate_log_recovery(ocfs2_super *osb,
+int ocfs2_flush_truncate_log(struct ocfs2_super *osb);
+int ocfs2_begin_truncate_log_recovery(struct ocfs2_super *osb,
int slot_num,
- ocfs2_dinode **tl_copy);
-int ocfs2_complete_truncate_log_recovery(ocfs2_super *osb,
- ocfs2_dinode *tl_copy);
+ struct ocfs2_dinode **tl_copy);
+int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb,
+ struct ocfs2_dinode *tl_copy);
struct ocfs2_truncate_context {
struct inode *tc_ext_alloc_inode;
@@ -72,11 +72,11 @@
void ocfs2_free_truncate_context(struct ocfs2_truncate_context *tc);
-int ocfs2_prepare_truncate(ocfs2_super *osb,
+int ocfs2_prepare_truncate(struct ocfs2_super *osb,
struct inode *inode,
struct buffer_head *fe_bh,
struct ocfs2_truncate_context **tc);
-int ocfs2_commit_truncate(ocfs2_super *osb,
+int ocfs2_commit_truncate(struct ocfs2_super *osb,
struct inode *inode,
struct buffer_head *fe_bh,
struct ocfs2_truncate_context *tc);
Modified: branches/ocfs2-1.2/fs/ocfs2/aops.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/aops.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/aops.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -45,10 +45,10 @@
{
int err = -EIO;
int status;
- ocfs2_dinode *fe = NULL;
+ struct ocfs2_dinode *fe = NULL;
struct buffer_head *bh = NULL;
struct buffer_head *buffer_cache_bh = NULL;
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
void *kaddr;
mlog_entry("(0x%p, %llu, 0x%p, %d)\n", inode,
@@ -69,7 +69,7 @@
mlog_errno(status);
goto bail;
}
- fe = (ocfs2_dinode *) bh->b_data;
+ fe = (struct ocfs2_dinode *) bh->b_data;
if (!OCFS2_IS_VALID_DINODE(fe)) {
mlog(ML_ERROR, "Invalid dinode #%"MLFu64": signature = %.*s\n",
Modified: branches/ocfs2-1.2/fs/ocfs2/buffer_head_io.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/buffer_head_io.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/buffer_head_io.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -52,7 +52,7 @@
unlock_buffer(bh);
}
-int ocfs2_write_blocks(ocfs2_super *osb, struct buffer_head *bhs[],
+int ocfs2_write_blocks(struct ocfs2_super *osb, struct buffer_head *bhs[],
int nr, struct inode *inode)
{
int status = 0;
@@ -144,7 +144,7 @@
return status;
}
-int ocfs2_read_blocks(ocfs2_super *osb, u64 block, int nr,
+int ocfs2_read_blocks(struct ocfs2_super *osb, u64 block, int nr,
struct buffer_head *bhs[], int flags,
struct inode *inode)
{
Modified: branches/ocfs2-1.2/fs/ocfs2/buffer_head_io.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/buffer_head_io.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/buffer_head_io.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -32,20 +32,20 @@
int uptodate);
/* Yosh made me do it. */
-static inline int ocfs2_write_block(ocfs2_super *osb,
+static inline int ocfs2_write_block(struct ocfs2_super *osb,
struct buffer_head *bh,
struct inode *inode);
-static inline int ocfs2_read_block(ocfs2_super *osb,
+static inline int ocfs2_read_block(struct ocfs2_super *osb,
u64 off,
struct buffer_head **bh,
int flags,
struct inode *inode);
-int ocfs2_write_blocks(ocfs2_super *osb,
+int ocfs2_write_blocks(struct ocfs2_super *osb,
struct buffer_head *bh[],
int nr,
struct inode *inode);
-int ocfs2_read_blocks(ocfs2_super *osb,
+int ocfs2_read_blocks(struct ocfs2_super *osb,
u64 block,
int nr,
struct buffer_head *bhs[],
@@ -56,7 +56,7 @@
#define OCFS2_BH_CACHED 1
#define OCFS2_BH_READAHEAD 8 /* use this to pass READA down to submit_bh */
-static inline int ocfs2_write_block(ocfs2_super * osb, struct buffer_head *bh,
+static inline int ocfs2_write_block(struct ocfs2_super * osb, struct buffer_head *bh,
struct inode *inode)
{
int status;
@@ -66,7 +66,7 @@
return status;
}
-static inline int ocfs2_read_block(ocfs2_super * osb, u64 off,
+static inline int ocfs2_read_block(struct ocfs2_super * osb, u64 off,
struct buffer_head **bh, int flags,
struct inode *inode)
{
Modified: branches/ocfs2-1.2/fs/ocfs2/cluster/tcp.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/cluster/tcp.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/cluster/tcp.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -131,7 +131,7 @@
#define O2NET_HB_PRI 0x1
static struct o2net_handshake *o2net_hand;
-static o2net_msg *o2net_keep_req, *o2net_keep_resp;
+static struct o2net_msg *o2net_keep_req, *o2net_keep_resp;
static int o2net_sys_err_translations[O2NET_ERR_MAX] =
{[O2NET_ERR_NONE] = 0,
@@ -840,9 +840,9 @@
}
}
-static void o2net_init_msg(o2net_msg *msg, u16 data_len, u16 msg_type, u32 key)
+static void o2net_init_msg(struct o2net_msg *msg, u16 data_len, u16 msg_type, u32 key)
{
- memset(msg, 0, sizeof(o2net_msg));
+ memset(msg, 0, sizeof(struct o2net_msg));
msg->magic = cpu_to_be16(O2NET_MSG_MAGIC);
msg->data_len = cpu_to_be16(data_len);
msg->msg_type = cpu_to_be16(msg_type);
@@ -878,7 +878,7 @@
size_t caller_veclen, u8 target_node, int *status)
{
int ret, error = 0;
- o2net_msg *msg = NULL;
+ struct o2net_msg *msg = NULL;
size_t veclen, caller_bytes = 0;
struct kvec *vec = NULL;
struct o2net_sock_container *sc = NULL;
@@ -938,7 +938,7 @@
goto out;
}
- msg = kmalloc(sizeof(o2net_msg), GFP_ATOMIC);
+ msg = kmalloc(sizeof(struct o2net_msg), GFP_ATOMIC);
if (!msg) {
mlog(0, "failed to allocate a o2net_msg!\n");
ret = -ENOMEM;
@@ -947,7 +947,7 @@
o2net_init_msg(msg, caller_bytes, msg_type, key);
- vec[0].iov_len = sizeof(o2net_msg);
+ vec[0].iov_len = sizeof(struct o2net_msg);
vec[0].iov_base = msg;
memcpy(&vec[1], caller_vec, caller_veclen * sizeof(struct kvec));
@@ -961,7 +961,7 @@
/* finally, convert the message header to network byte-order
* and send */
ret = o2net_send_tcp_msg(sc->sc_sock, vec, veclen,
- sizeof(o2net_msg) + caller_bytes);
+ sizeof(struct o2net_msg) + caller_bytes);
msglog(msg, "sending returned %d\n", ret);
if (ret < 0) {
mlog(0, "error returned from o2net_send_tcp_msg=%d\n", ret);
@@ -1006,12 +1006,12 @@
}
EXPORT_SYMBOL_GPL(o2net_send_message);
-static int o2net_send_status_magic(struct socket *sock, o2net_msg *hdr,
+static int o2net_send_status_magic(struct socket *sock, struct o2net_msg *hdr,
enum o2net_system_error syserr, int err)
{
struct kvec vec = {
.iov_base = hdr,
- .iov_len = sizeof(o2net_msg),
+ .iov_len = sizeof(struct o2net_msg),
};
BUG_ON(syserr >= O2NET_ERR_MAX);
@@ -1025,13 +1025,13 @@
msglog(hdr, "about to send status magic %d\n", err);
/* hdr has been in host byteorder this whole time */
- return o2net_send_tcp_msg(sock, &vec, 1, sizeof(o2net_msg));
+ return o2net_send_tcp_msg(sock, &vec, 1, sizeof(struct o2net_msg));
}
/* this returns -errno if the header was unknown or too large, etc.
* after this is called the buffer us reused for the next message */
static int o2net_process_message(struct o2net_sock_container *sc,
- o2net_msg *hdr)
+ struct o2net_msg *hdr)
{
struct o2net_node *nn = o2net_nn_from_num(sc->sc_node->nd_num);
int ret = 0, handler_status;
@@ -1087,7 +1087,7 @@
do_gettimeofday(&sc->sc_tv_func_start);
sc->sc_msg_key = be32_to_cpu(hdr->key);
sc->sc_msg_type = be16_to_cpu(hdr->msg_type);
- handler_status = (nmh->nh_func)(hdr, sizeof(o2net_msg) +
+ handler_status = (nmh->nh_func)(hdr, sizeof(struct o2net_msg) +
be16_to_cpu(hdr->data_len),
nmh->nh_func_data);
do_gettimeofday(&sc->sc_tv_func_stop);
@@ -1147,7 +1147,7 @@
* == 0 eof, or > 0 for progress made.*/
static int o2net_advance_rx(struct o2net_sock_container *sc)
{
- o2net_msg *hdr;
+ struct o2net_msg *hdr;
int ret = 0;
void *data;
size_t datalen;
@@ -1156,9 +1156,9 @@
do_gettimeofday(&sc->sc_tv_advance_start);
/* do we need more header? */
- if (sc->sc_page_off < sizeof(o2net_msg)) {
+ if (sc->sc_page_off < sizeof(struct o2net_msg)) {
data = page_address(sc->sc_page) + sc->sc_page_off;
- datalen = sizeof(o2net_msg) - sc->sc_page_off;
+ datalen = sizeof(struct o2net_msg) - sc->sc_page_off;
ret = o2net_recv_tcp_msg(sc->sc_sock, data, datalen);
if (ret > 0) {
sc->sc_page_off += ret;
@@ -1174,7 +1174,7 @@
/* only swab incoming here.. we can
* only get here once as we cross from
* being under to over */
- if (sc->sc_page_off == sizeof(o2net_msg)) {
+ if (sc->sc_page_off == sizeof(struct o2net_msg)) {
hdr = page_address(sc->sc_page);
if (be16_to_cpu(hdr->data_len) >
O2NET_MAX_PAYLOAD_BYTES)
@@ -1185,7 +1185,7 @@
goto out;
}
- if (sc->sc_page_off < sizeof(o2net_msg)) {
+ if (sc->sc_page_off < sizeof(struct o2net_msg)) {
/* oof, still don't have a header */
goto out;
}
@@ -1196,10 +1196,10 @@
msglog(hdr, "at page_off %zu\n", sc->sc_page_off);
/* do we need more payload? */
- if (sc->sc_page_off - sizeof(o2net_msg) < be16_to_cpu(hdr->data_len)) {
+ if (sc->sc_page_off - sizeof(struct o2net_msg) < be16_to_cpu(hdr->data_len)) {
/* need more payload */
data = page_address(sc->sc_page) + sc->sc_page_off;
- datalen = (sizeof(o2net_msg) + be16_to_cpu(hdr->data_len)) -
+ datalen = (sizeof(struct o2net_msg) + be16_to_cpu(hdr->data_len)) -
sc->sc_page_off;
ret = o2net_recv_tcp_msg(sc->sc_sock, data, datalen);
if (ret > 0)
@@ -1208,7 +1208,7 @@
goto out;
}
- if (sc->sc_page_off - sizeof(o2net_msg) == be16_to_cpu(hdr->data_len)) {
+ if (sc->sc_page_off - sizeof(struct o2net_msg) == be16_to_cpu(hdr->data_len)) {
/* we can only get here once, the first time we read
* the payload.. so set ret to progress if the handler
* works out. after calling this the message is toast */
@@ -1830,8 +1830,8 @@
o2quo_init();
o2net_hand = kcalloc(1, sizeof(struct o2net_handshake), GFP_KERNEL);
- o2net_keep_req = kcalloc(1, sizeof(o2net_msg), GFP_KERNEL);
- o2net_keep_resp = kcalloc(1, sizeof(o2net_msg), GFP_KERNEL);
+ o2net_keep_req = kcalloc(1, sizeof(struct o2net_msg), GFP_KERNEL);
+ o2net_keep_resp = kcalloc(1, sizeof(struct o2net_msg), GFP_KERNEL);
if (!o2net_hand || !o2net_keep_req || !o2net_keep_resp) {
kfree(o2net_hand);
kfree(o2net_keep_req);
Modified: branches/ocfs2-1.2/fs/ocfs2/cluster/tcp.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/cluster/tcp.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/cluster/tcp.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -37,7 +37,7 @@
#include <linux/inet.h>
#include <linux/in.h>
-typedef struct _o2net_msg
+struct o2net_msg
{
__be16 magic;
__be16 data_len;
@@ -48,11 +48,11 @@
__be32 key;
__be32 msg_num;
__u8 buf[0];
-} o2net_msg;
+};
-typedef int (o2net_msg_handler_func)(o2net_msg *msg, u32 len, void *data);
+typedef int (o2net_msg_handler_func)(struct o2net_msg *msg, u32 len, void *data);
-#define O2NET_MAX_PAYLOAD_BYTES (4096 - sizeof(o2net_msg))
+#define O2NET_MAX_PAYLOAD_BYTES (4096 - sizeof(struct o2net_msg))
/* TODO: figure this out.... */
static inline int o2net_link_down(int err, struct socket *sock)
Modified: branches/ocfs2-1.2/fs/ocfs2/dcache.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dcache.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/dcache.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -43,7 +43,7 @@
{
struct inode *inode = dentry->d_inode;
int ret = 0; /* if all else fails, just return false */
- ocfs2_super *osb;
+ struct ocfs2_super *osb;
mlog_entry("(0x%p, '%.*s')\n", dentry,
dentry->d_name.len, dentry->d_name.name);
Modified: branches/ocfs2-1.2/fs/ocfs2/dir.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dir.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/dir.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -63,10 +63,10 @@
DT_UNKNOWN, DT_REG, DT_DIR, DT_CHR, DT_BLK, DT_FIFO, DT_SOCK, DT_LNK
};
-static int ocfs2_extend_dir(ocfs2_super *osb,
- struct inode *dir,
- struct buffer_head *parent_fe_bh,
- struct buffer_head **new_de_bh);
+static int ocfs2_extend_dir(struct ocfs2_super *osb,
+ struct inode *dir,
+ struct buffer_head *parent_fe_bh,
+ struct buffer_head **new_de_bh);
/*
* ocfs2_readdir()
*
@@ -212,7 +212,7 @@
struct ocfs2_dir_entry **dirent)
{
int status = -ENOENT;
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
mlog_entry("(osb=%p, parent=%"MLFu64", name='%.*s', blkno=%p, "
"inode=%p)\n",
@@ -340,11 +340,11 @@
/* returns a bh of the 1st new block in the allocation. */
int ocfs2_do_extend_dir(struct super_block *sb,
- ocfs2_journal_handle *handle,
+ struct ocfs2_journal_handle *handle,
struct inode *dir,
struct buffer_head *parent_fe_bh,
- ocfs2_alloc_context *data_ac,
- ocfs2_alloc_context *meta_ac,
+ struct ocfs2_alloc_context *data_ac,
+ struct ocfs2_alloc_context *meta_ac,
struct buffer_head **new_bh)
{
int status;
@@ -387,7 +387,7 @@
}
/* assumes you already have a cluster lock on the directory. */
-static int ocfs2_extend_dir(ocfs2_super *osb,
+static int ocfs2_extend_dir(struct ocfs2_super *osb,
struct inode *dir,
struct buffer_head *parent_fe_bh,
struct buffer_head **new_de_bh)
@@ -395,10 +395,10 @@
int status = 0;
int credits, num_free_extents;
loff_t dir_i_size;
- ocfs2_dinode *fe = (ocfs2_dinode *) parent_fe_bh->b_data;
- ocfs2_alloc_context *data_ac = NULL;
- ocfs2_alloc_context *meta_ac = NULL;
- ocfs2_journal_handle *handle = NULL;
+ struct ocfs2_dinode *fe = (struct ocfs2_dinode *) parent_fe_bh->b_data;
+ struct ocfs2_alloc_context *data_ac = NULL;
+ struct ocfs2_alloc_context *meta_ac = NULL;
+ struct ocfs2_journal_handle *handle = NULL;
struct buffer_head *new_bh = NULL;
struct ocfs2_dir_entry * de;
struct super_block *sb = osb->sb;
@@ -514,7 +514,7 @@
* Search the dir for a good spot, extending it if necessary. The
* block containing an appropriate record is returned in ret_de_bh.
*/
-int ocfs2_prepare_dir_for_insert(ocfs2_super *osb,
+int ocfs2_prepare_dir_for_insert(struct ocfs2_super *osb,
struct inode *dir,
struct buffer_head *parent_fe_bh,
const char *name,
@@ -524,7 +524,7 @@
unsigned long offset;
struct buffer_head * bh = NULL;
unsigned short rec_len;
- ocfs2_dinode *fe;
+ struct ocfs2_dinode *fe;
struct ocfs2_dir_entry *de;
struct super_block *sb;
int status;
@@ -535,7 +535,7 @@
namelen, OCFS2_I(dir)->ip_blkno);
BUG_ON(!S_ISDIR(dir->i_mode));
- fe = (ocfs2_dinode *) parent_fe_bh->b_data;
+ fe = (struct ocfs2_dinode *) parent_fe_bh->b_data;
BUG_ON(le64_to_cpu(fe->i_size) != i_size_read(dir));
sb = dir->i_sb;
Modified: branches/ocfs2-1.2/fs/ocfs2/dir.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dir.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/dir.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -37,18 +37,18 @@
struct buffer_head **dirent_bh,
struct ocfs2_dir_entry **dirent);
int ocfs2_readdir(struct file *filp, void *dirent, filldir_t filldir);
-int ocfs2_prepare_dir_for_insert(ocfs2_super *osb,
+int ocfs2_prepare_dir_for_insert(struct ocfs2_super *osb,
struct inode *dir,
struct buffer_head *parent_fe_bh,
const char *name,
int namelen,
struct buffer_head **ret_de_bh);
-struct _ocfs2_alloc_context;
+struct ocfs2_alloc_context;
int ocfs2_do_extend_dir(struct super_block *sb,
- ocfs2_journal_handle *handle,
+ struct ocfs2_journal_handle *handle,
struct inode *dir,
struct buffer_head *parent_fe_bh,
- struct _ocfs2_alloc_context *data_ac,
- struct _ocfs2_alloc_context *meta_ac,
+ struct ocfs2_alloc_context *data_ac,
+ struct ocfs2_alloc_context *meta_ac,
struct buffer_head **new_bh);
#endif /* OCFS2_DIR_H */
Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmast.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmast.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmast.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -261,7 +261,7 @@
-int dlm_proxy_ast_handler(o2net_msg *msg, u32 len, void *data)
+int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data)
{
int ret;
unsigned int locklen;
Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmcommon.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmcommon.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmcommon.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -641,16 +641,16 @@
void dlm_lock_attach_lockres(struct dlm_lock *lock,
struct dlm_lock_resource *res);
-int dlm_create_lock_handler(o2net_msg *msg, u32 len, void *data);
-int dlm_convert_lock_handler(o2net_msg *msg, u32 len, void *data);
-int dlm_proxy_ast_handler(o2net_msg *msg, u32 len, void *data);
+int dlm_create_lock_handler(struct o2net_msg *msg, u32 len, void *data);
+int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data);
+int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data);
void dlm_revert_pending_convert(struct dlm_lock_resource *res,
struct dlm_lock *lock);
void dlm_revert_pending_lock(struct dlm_lock_resource *res,
struct dlm_lock *lock);
-int dlm_unlock_lock_handler(o2net_msg *msg, u32 len, void *data);
+int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data);
void dlm_commit_pending_cancel(struct dlm_lock_resource *res,
struct dlm_lock *lock);
void dlm_commit_pending_unlock(struct dlm_lock_resource *res,
@@ -767,15 +767,15 @@
struct dlm_lock_resource *res);
void __dlm_lockres_reserve_ast(struct dlm_lock_resource *res);
-int dlm_master_request_handler(o2net_msg *msg, u32 len, void *data);
-int dlm_assert_master_handler(o2net_msg *msg, u32 len, void *data);
-int dlm_migrate_request_handler(o2net_msg *msg, u32 len, void *data);
-int dlm_mig_lockres_handler(o2net_msg *msg, u32 len, void *data);
-int dlm_master_requery_handler(o2net_msg *msg, u32 len, void *data);
-int dlm_request_all_locks_handler(o2net_msg *msg, u32 len, void *data);
-int dlm_reco_data_done_handler(o2net_msg *msg, u32 len, void *data);
-int dlm_begin_reco_handler(o2net_msg *msg, u32 len, void *data);
-int dlm_finalize_reco_handler(o2net_msg *msg, u32 len, void *data);
+int dlm_master_request_handler(struct o2net_msg *msg, u32 len, void *data);
+int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data);
+int dlm_migrate_request_handler(struct o2net_msg *msg, u32 len, void *data);
+int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data);
+int dlm_master_requery_handler(struct o2net_msg *msg, u32 len, void *data);
+int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data);
+int dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data);
+int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data);
+int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data);
int dlm_dispatch_assert_master(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res,
Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmconvert.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmconvert.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmconvert.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -416,7 +416,7 @@
* returns: DLM_NORMAL, DLM_IVLOCKID, DLM_BADARGS,
* status from __dlmconvert_master
*/
-int dlm_convert_lock_handler(o2net_msg *msg, u32 len, void *data)
+int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data)
{
struct dlm_ctxt *dlm = data;
struct dlm_convert_lock *cnv = (struct dlm_convert_lock *)msg->buf;
Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmdomain.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmdomain.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmdomain.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -68,10 +68,10 @@
#define DLM_DOMAIN_BACKOFF_MS 200
-static int dlm_query_join_handler(o2net_msg *msg, u32 len, void *data);
-static int dlm_assert_joined_handler(o2net_msg *msg, u32 len, void *data);
-static int dlm_cancel_join_handler(o2net_msg *msg, u32 len, void *data);
-static int dlm_exit_domain_handler(o2net_msg *msg, u32 len, void *data);
+static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data);
+static int dlm_assert_joined_handler(struct o2net_msg *msg, u32 len, void *data);
+static int dlm_cancel_join_handler(struct o2net_msg *msg, u32 len, void *data);
+static int dlm_exit_domain_handler(struct o2net_msg *msg, u32 len, void *data);
static void dlm_unregister_domain_handlers(struct dlm_ctxt *dlm);
@@ -389,7 +389,7 @@
}
}
-static int dlm_exit_domain_handler(o2net_msg *msg, u32 len, void *data)
+static int dlm_exit_domain_handler(struct o2net_msg *msg, u32 len, void *data)
{
struct dlm_ctxt *dlm = data;
unsigned int node;
@@ -551,7 +551,7 @@
}
EXPORT_SYMBOL_GPL(dlm_unregister_domain);
-static int dlm_query_join_handler(o2net_msg *msg, u32 len, void *data)
+static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data)
{
struct dlm_query_join_request *query;
enum dlm_query_join_response response;
@@ -628,7 +628,7 @@
return response;
}
-static int dlm_assert_joined_handler(o2net_msg *msg, u32 len, void *data)
+static int dlm_assert_joined_handler(struct o2net_msg *msg, u32 len, void *data)
{
struct dlm_assert_joined *assert;
struct dlm_ctxt *dlm = NULL;
@@ -663,7 +663,7 @@
return 0;
}
-static int dlm_cancel_join_handler(o2net_msg *msg, u32 len, void *data)
+static int dlm_cancel_join_handler(struct o2net_msg *msg, u32 len, void *data)
{
struct dlm_cancel_join *cancel;
struct dlm_ctxt *dlm = NULL;
Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmlock.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmlock.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmlock.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -400,7 +400,7 @@
* held on exit: none
* returns: DLM_NORMAL, DLM_SYSERR, DLM_IVLOCKID, DLM_NOTQUEUED
*/
-int dlm_create_lock_handler(o2net_msg *msg, u32 len, void *data)
+int dlm_create_lock_handler(struct o2net_msg *msg, u32 len, void *data)
{
struct dlm_ctxt *dlm = data;
struct dlm_create_lock *create = (struct dlm_create_lock *)msg->buf;
Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmmaster.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmmaster.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmmaster.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -1234,7 +1234,7 @@
*
* if possible, TRIM THIS DOWN!!!
*/
-int dlm_master_request_handler(o2net_msg *msg, u32 len, void *data)
+int dlm_master_request_handler(struct o2net_msg *msg, u32 len, void *data)
{
u8 response = DLM_MASTER_RESP_MAYBE;
struct dlm_ctxt *dlm = data;
@@ -1513,7 +1513,7 @@
*
* if possible, TRIM THIS DOWN!!!
*/
-int dlm_assert_master_handler(o2net_msg *msg, u32 len, void *data)
+int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data)
{
struct dlm_ctxt *dlm = data;
struct dlm_master_list_entry *mle = NULL;
@@ -2284,7 +2284,7 @@
* we will have no mle in the list to start with. now we can add an mle for
* the migration and this should be the only one found for those scanning the
* list. */
-int dlm_migrate_request_handler(o2net_msg *msg, u32 len, void *data)
+int dlm_migrate_request_handler(struct o2net_msg *msg, u32 len, void *data)
{
struct dlm_ctxt *dlm = data;
struct dlm_lock_resource *res = NULL;
Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmrecovery.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmrecovery.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmrecovery.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -686,7 +686,7 @@
}
-int dlm_request_all_locks_handler(o2net_msg *msg, u32 len, void *data)
+int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data)
{
struct dlm_ctxt *dlm = data;
struct dlm_lock_request *lr = (struct dlm_lock_request *)msg->buf;
@@ -811,7 +811,7 @@
}
-int dlm_reco_data_done_handler(o2net_msg *msg, u32 len, void *data)
+int dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data)
{
struct dlm_ctxt *dlm = data;
struct dlm_reco_data_done *done = (struct dlm_reco_data_done *)msg->buf;
@@ -1120,7 +1120,7 @@
* do we spin? returning an error only delays the problem really
*/
-int dlm_mig_lockres_handler(o2net_msg *msg, u32 len, void *data)
+int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data)
{
struct dlm_ctxt *dlm = data;
struct dlm_migratable_lockres *mres =
@@ -1404,7 +1404,7 @@
/* this function cannot error, so unless the sending
* or receiving of the message failed, the owner can
* be trusted */
-int dlm_master_requery_handler(o2net_msg *msg, u32 len, void *data)
+int dlm_master_requery_handler(struct o2net_msg *msg, u32 len, void *data)
{
struct dlm_ctxt *dlm = data;
struct dlm_master_requery *req = (struct dlm_master_requery *)msg->buf;
@@ -2229,7 +2229,7 @@
return ret;
}
-int dlm_begin_reco_handler(o2net_msg *msg, u32 len, void *data)
+int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data)
{
struct dlm_ctxt *dlm = data;
struct dlm_begin_reco *br = (struct dlm_begin_reco *)msg->buf;
@@ -2326,7 +2326,7 @@
return ret;
}
-int dlm_finalize_reco_handler(o2net_msg *msg, u32 len, void *data)
+int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data)
{
struct dlm_ctxt *dlm = data;
struct dlm_finalize_reco *fr = (struct dlm_finalize_reco *)msg->buf;
Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmunlock.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmunlock.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmunlock.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -375,7 +375,7 @@
* returns: DLM_NORMAL, DLM_BADARGS, DLM_IVLOCKID,
* return value from dlmunlock_master
*/
-int dlm_unlock_lock_handler(o2net_msg *msg, u32 len, void *data)
+int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data)
{
struct dlm_ctxt *dlm = data;
struct dlm_unlock_lock *unlock = (struct dlm_unlock_lock *)msg->buf;
Modified: branches/ocfs2-1.2/fs/ocfs2/dlmglue.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlmglue.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/dlmglue.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -79,7 +79,7 @@
static int ocfs2_unblock_osb_lock(struct ocfs2_lock_res *lockres,
int *requeue);
typedef void (ocfs2_convert_worker_t)(struct ocfs2_lock_res *, int);
-static int ocfs2_generic_unblock_lock(ocfs2_super *osb,
+static int ocfs2_generic_unblock_lock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres,
int *requeue,
ocfs2_convert_worker_t *worker);
@@ -138,12 +138,12 @@
return lockres->l_type == OCFS2_LOCK_TYPE_RENAME;
}
-static inline ocfs2_super *ocfs2_lock_res_super(struct ocfs2_lock_res *lockres)
+static inline struct ocfs2_super *ocfs2_lock_res_super(struct ocfs2_lock_res *lockres)
{
BUG_ON(!ocfs2_is_super_lock(lockres)
&& !ocfs2_is_rename_lock(lockres));
- return (ocfs2_super *) lockres->l_priv;
+ return (struct ocfs2_super *) lockres->l_priv;
}
static inline struct inode *ocfs2_lock_res_inode(struct ocfs2_lock_res *lockres)
@@ -153,26 +153,26 @@
return (struct inode *) lockres->l_priv;
}
-static int ocfs2_lock_create(ocfs2_super *osb,
+static int ocfs2_lock_create(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres,
int level,
int flags);
static inline int ocfs2_may_continue_on_blocked_lock(struct ocfs2_lock_res *lockres,
int wanted);
-static int ocfs2_cluster_lock(ocfs2_super *osb,
+static int ocfs2_cluster_lock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres,
int level,
int lkm_flags,
ocfs2_lock_callback cb,
unsigned long cb_data);
-static void ocfs2_cluster_unlock(ocfs2_super *osb,
+static void ocfs2_cluster_unlock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres,
int level);
static inline void ocfs2_generic_handle_downconvert_action(struct ocfs2_lock_res *lockres);
static inline void ocfs2_generic_handle_convert_action(struct ocfs2_lock_res *lockres);
static inline void ocfs2_generic_handle_attach_action(struct ocfs2_lock_res *lockres);
static int ocfs2_generic_handle_bast(struct ocfs2_lock_res *lockres, int level);
-static void ocfs2_schedule_blocked_lock(ocfs2_super *osb,
+static void ocfs2_schedule_blocked_lock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres);
static inline void ocfs2_recover_from_dlm_error(struct ocfs2_lock_res *lockres,
int convert);
@@ -181,17 +181,17 @@
"resource %s: %s\n", dlm_errname(_stat), _func, \
_lockres->l_name, dlm_errmsg(_stat)); \
} while (0)
-static void ocfs2_vote_on_unlock(ocfs2_super *osb,
+static void ocfs2_vote_on_unlock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres);
static int ocfs2_meta_lock_update(struct inode *inode,
struct buffer_head **bh);
-static void ocfs2_drop_osb_locks(ocfs2_super *osb);
+static void ocfs2_drop_osb_locks(struct ocfs2_super *osb);
static inline int ocfs2_highest_compat_lock_level(int level);
-static int __ocfs2_downconvert_lock(ocfs2_super *osb,
+static int __ocfs2_downconvert_lock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres,
int new_level,
int lvb);
-static int __ocfs2_cancel_convert(ocfs2_super *osb,
+static int __ocfs2_cancel_convert(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres);
static inline int ocfs2_can_downconvert_meta_lock(struct inode *inode,
struct ocfs2_lock_res *lockres,
@@ -239,7 +239,7 @@
spin_unlock(&ocfs2_dlm_tracking_lock);
}
-static void ocfs2_lock_res_init_common(ocfs2_super *osb,
+static void ocfs2_lock_res_init_common(struct ocfs2_super *osb,
struct ocfs2_lock_res *res,
enum ocfs2_lock_type type,
u64 blkno,
@@ -294,7 +294,7 @@
}
static void ocfs2_super_lock_res_init(struct ocfs2_lock_res *res,
- ocfs2_super *osb)
+ struct ocfs2_super *osb)
{
/* Superblock lockres doesn't come from a slab so we call init
* once on it manually. */
@@ -305,7 +305,7 @@
}
static void ocfs2_rename_lock_res_init(struct ocfs2_lock_res *res,
- ocfs2_super *osb)
+ struct ocfs2_super *osb)
{
/* Rename lockres doesn't come from a slab so we call init
* once on it manually. */
@@ -581,7 +581,7 @@
return needs_downconvert;
}
-static void ocfs2_generic_bast_func(ocfs2_super *osb,
+static void ocfs2_generic_bast_func(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres,
int level)
{
@@ -607,7 +607,7 @@
{
struct ocfs2_lock_res *lockres = opaque;
struct inode *inode;
- ocfs2_super *osb;
+ struct ocfs2_super *osb;
mlog_entry_void();
@@ -682,7 +682,7 @@
int level)
{
struct ocfs2_lock_res *lockres = opaque;
- ocfs2_super *osb;
+ struct ocfs2_super *osb;
mlog_entry_void();
mlog(0, "Superblock BAST fired\n");
@@ -713,7 +713,7 @@
int level)
{
struct ocfs2_lock_res *lockres = opaque;
- ocfs2_super *osb;
+ struct ocfs2_super *osb;
mlog_entry_void();
@@ -747,7 +747,7 @@
* OCFS2_LOCK_BUSY), we'll bail out returning 0. It's up to the caller
* to do the right thing in that case.
*/
-static int ocfs2_lock_create(ocfs2_super *osb,
+static int ocfs2_lock_create(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres,
int level,
int flags)
@@ -886,7 +886,7 @@
ocfs2_init_fcb(fcb, ocfs2_status_completion_cb, (unsigned long) sc, 1);
}
-static int ocfs2_cluster_lock(ocfs2_super *osb,
+static int ocfs2_cluster_lock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres,
int level,
int lkm_flags,
@@ -1048,7 +1048,7 @@
return ret;
}
-static void ocfs2_cluster_unlock(ocfs2_super *osb,
+static void ocfs2_cluster_unlock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres,
int level)
{
@@ -1069,7 +1069,7 @@
int ocfs2_create_new_inode_locks(struct inode *inode)
{
int status;
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct ocfs2_lock_res *lockres;
BUG_ON(!inode);
@@ -1157,7 +1157,7 @@
return status;
}
-static void ocfs2_vote_on_unlock(ocfs2_super *osb,
+static void ocfs2_vote_on_unlock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres)
{
int kick = 0;
@@ -1384,7 +1384,7 @@
int status = 0;
struct ocfs2_inode_info *oi = OCFS2_I(inode);
struct ocfs2_lock_res *lockres;
- ocfs2_dinode *fe;
+ struct ocfs2_dinode *fe;
mlog_entry_void();
@@ -1425,7 +1425,7 @@
mlog_errno(status);
goto bail_refresh;
}
- fe = (ocfs2_dinode *) (*bh)->b_data;
+ fe = (struct ocfs2_dinode *) (*bh)->b_data;
/* This is a good chance to make sure we're not
* locking an invalid object.
@@ -1510,7 +1510,7 @@
* the result of the lock will be communicated via the callback.
*/
int ocfs2_meta_lock_full(struct inode *inode,
- ocfs2_journal_handle *handle,
+ struct ocfs2_journal_handle *handle,
struct buffer_head **ret_bh,
int ex,
int flags,
@@ -1519,7 +1519,7 @@
{
int status, level, dlm_flags, acquired;
struct ocfs2_lock_res *lockres;
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct buffer_head *local_bh = NULL;
BUG_ON(!inode);
@@ -1631,7 +1631,7 @@
mlog_exit_void();
}
-int ocfs2_super_lock(ocfs2_super *osb,
+int ocfs2_super_lock(struct ocfs2_super *osb,
int ex)
{
int status;
@@ -1677,7 +1677,7 @@
return status;
}
-void ocfs2_super_unlock(ocfs2_super *osb,
+void ocfs2_super_unlock(struct ocfs2_super *osb,
int ex)
{
int level = ex ? LKM_EXMODE : LKM_PRMODE;
@@ -1686,7 +1686,7 @@
ocfs2_cluster_unlock(osb, lockres, level);
}
-int ocfs2_rename_lock(ocfs2_super *osb)
+int ocfs2_rename_lock(struct ocfs2_super *osb)
{
int status;
struct ocfs2_lock_res *lockres = &osb->osb_rename_lockres;
@@ -1701,7 +1701,7 @@
return status;
}
-void ocfs2_rename_unlock(ocfs2_super *osb)
+void ocfs2_rename_unlock(struct ocfs2_super *osb)
{
struct ocfs2_lock_res *lockres = &osb->osb_rename_lockres;
@@ -1892,7 +1892,7 @@
int ret;
struct ocfs2_dlm_seq_priv *priv;
struct seq_file *seq;
- ocfs2_super *osb;
+ struct ocfs2_super *osb;
priv = kzalloc(sizeof(struct ocfs2_dlm_seq_priv), GFP_KERNEL);
if (!priv) {
@@ -1900,7 +1900,7 @@
mlog_errno(ret);
goto out;
}
- osb = (ocfs2_super *) inode->u.generic_ip;
+ osb = (struct ocfs2_super *) inode->u.generic_ip;
ocfs2_get_dlm_debug(osb->osb_dlm_debug);
priv->p_dlm_debug = osb->osb_dlm_debug;
INIT_LIST_HEAD(&priv->p_iter_res.l_debug_list);
@@ -1929,7 +1929,7 @@
.llseek = seq_lseek,
};
-static int ocfs2_dlm_init_debug(ocfs2_super *osb)
+static int ocfs2_dlm_init_debug(struct ocfs2_super *osb)
{
int ret = 0;
struct ocfs2_dlm_debug *dlm_debug = osb->osb_dlm_debug;
@@ -1951,7 +1951,7 @@
return ret;
}
-static void ocfs2_dlm_shutdown_debug(ocfs2_super *osb)
+static void ocfs2_dlm_shutdown_debug(struct ocfs2_super *osb)
{
struct ocfs2_dlm_debug *dlm_debug = osb->osb_dlm_debug;
@@ -1961,7 +1961,7 @@
}
}
-int ocfs2_dlm_init(ocfs2_super *osb)
+int ocfs2_dlm_init(struct ocfs2_super *osb)
{
int status;
u32 dlm_key;
@@ -2016,7 +2016,7 @@
return status;
}
-void ocfs2_dlm_shutdown(ocfs2_super *osb)
+void ocfs2_dlm_shutdown(struct ocfs2_super *osb)
{
mlog_entry_void();
@@ -2097,7 +2097,7 @@
/* BEWARE: called with lockres lock, and always drops it. Caller
* should not be calling us with a busy lock... */
-static int __ocfs2_drop_lock(ocfs2_super *osb,
+static int __ocfs2_drop_lock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres)
{
int ret = 0;
@@ -2154,7 +2154,7 @@
void *drop_data;
};
-static int ocfs2_drop_lock(ocfs2_super *osb,
+static int ocfs2_drop_lock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres,
struct drop_lock_cb *dcb)
{
@@ -2223,7 +2223,7 @@
spin_unlock(&lockres->l_lock);
}
-static void ocfs2_drop_osb_locks(ocfs2_super *osb)
+static void ocfs2_drop_osb_locks(struct ocfs2_super *osb)
{
int status;
@@ -2287,7 +2287,7 @@
}
/* called with the spinlock held, and WILL drop it. */
-static int __ocfs2_downconvert_lock(ocfs2_super *osb,
+static int __ocfs2_downconvert_lock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres,
int new_level,
int lvb)
@@ -2338,7 +2338,7 @@
}
/* called with the spinlock held, and WILL drop it. */
-static int __ocfs2_cancel_convert(ocfs2_super *osb,
+static int __ocfs2_cancel_convert(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres)
{
int ret;
@@ -2378,7 +2378,7 @@
return ret;
}
-static int ocfs2_cancel_convert(ocfs2_super *osb,
+static int ocfs2_cancel_convert(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres)
{
assert_spin_locked(&lockres->l_lock);
@@ -2429,7 +2429,7 @@
int set_lvb = 0;
int ret = 0;
struct ocfs2_lock_res *lockres = &OCFS2_I(inode)->ip_meta_lockres;
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
mlog_entry_void();
@@ -2490,7 +2490,7 @@
return ret;
}
-static int ocfs2_generic_unblock_lock(ocfs2_super *osb,
+static int ocfs2_generic_unblock_lock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres,
int *requeue,
ocfs2_convert_worker_t *worker)
@@ -2602,7 +2602,7 @@
{
int status;
struct inode *inode;
- ocfs2_super *osb;
+ struct ocfs2_super *osb;
mlog_entry_void();
@@ -2654,7 +2654,7 @@
int *requeue)
{
int status;
- ocfs2_super *osb;
+ struct ocfs2_super *osb;
mlog_entry_void();
@@ -2673,7 +2673,7 @@
return status;
}
-void ocfs2_process_blocked_lock(ocfs2_super *osb,
+void ocfs2_process_blocked_lock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres)
{
int status;
@@ -2719,7 +2719,7 @@
mlog_exit_void();
}
-static void ocfs2_schedule_blocked_lock(ocfs2_super *osb,
+static void ocfs2_schedule_blocked_lock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres)
{
mlog_entry_void();
Modified: branches/ocfs2-1.2/fs/ocfs2/dlmglue.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlmglue.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/dlmglue.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -44,8 +44,8 @@
__be32 lvb_reserved[2];
};
-int ocfs2_dlm_init(ocfs2_super *osb);
-void ocfs2_dlm_shutdown(ocfs2_super *osb);
+int ocfs2_dlm_init(struct ocfs2_super *osb);
+void ocfs2_dlm_shutdown(struct ocfs2_super *osb);
void ocfs2_lock_res_init_once(struct ocfs2_lock_res *res);
void ocfs2_inode_lock_res_init(struct ocfs2_lock_res *res,
enum ocfs2_lock_type type,
@@ -62,7 +62,7 @@
/* Instruct the dlm not to queue ourselves on the other node. */
#define OCFS2_META_LOCK_NOQUEUE (0x02)
int ocfs2_meta_lock_full(struct inode *inode,
- ocfs2_journal_handle *handle,
+ struct ocfs2_journal_handle *handle,
struct buffer_head **ret_bh,
int ex,
int flags,
@@ -73,16 +73,16 @@
#define ocfs2_meta_lock(i, h, b, e) ocfs2_meta_lock_full(i, h, b, e, 0, NULL, 0)
void ocfs2_meta_unlock(struct inode *inode,
int ex);
-int ocfs2_super_lock(ocfs2_super *osb,
+int ocfs2_super_lock(struct ocfs2_super *osb,
int ex);
-void ocfs2_super_unlock(ocfs2_super *osb,
+void ocfs2_super_unlock(struct ocfs2_super *osb,
int ex);
-int ocfs2_rename_lock(ocfs2_super *osb);
-void ocfs2_rename_unlock(ocfs2_super *osb);
+int ocfs2_rename_lock(struct ocfs2_super *osb);
+void ocfs2_rename_unlock(struct ocfs2_super *osb);
void ocfs2_mark_lockres_freeing(struct ocfs2_lock_res *lockres);
/* for the vote thread */
-void ocfs2_process_blocked_lock(ocfs2_super *osb,
+void ocfs2_process_blocked_lock(struct ocfs2_super *osb,
struct ocfs2_lock_res *lockres);
struct ocfs2_dlm_debug *ocfs2_new_dlm_debug(void);
Modified: branches/ocfs2-1.2/fs/ocfs2/extent_map.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/extent_map.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/extent_map.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -49,7 +49,7 @@
struct ocfs2_extent_map_entry {
struct rb_node e_node;
int e_tree_depth;
- ocfs2_extent_rec e_rec;
+ struct ocfs2_extent_rec e_rec;
};
struct ocfs2_em_insert_context {
@@ -73,19 +73,19 @@
struct ocfs2_extent_map_entry *ent);
static int ocfs2_extent_map_find_leaf(struct inode *inode,
u32 cpos, u32 clusters,
- ocfs2_extent_list *el);
+ struct ocfs2_extent_list *el);
static int ocfs2_extent_map_lookup_read(struct inode *inode,
u32 cpos, u32 clusters,
struct ocfs2_extent_map_entry **ret_ent);
static int ocfs2_extent_map_try_insert(struct inode *inode,
- ocfs2_extent_rec *rec,
+ struct ocfs2_extent_rec *rec,
int tree_depth,
struct ocfs2_em_insert_context *ctxt);
/* returns 1 only if the rec contains all the given clusters -- that is that
* rec's cpos is <= the cluster cpos and that the rec endpoint (cpos +
* clusters) is >= the argument's endpoint */
-static int ocfs2_extent_rec_contains_clusters(ocfs2_extent_rec *rec,
+static int ocfs2_extent_rec_contains_clusters(struct ocfs2_extent_rec *rec,
u32 cpos, u32 clusters)
{
if (le32_to_cpu(rec->e_cpos) > cpos)
@@ -153,14 +153,14 @@
*/
static int ocfs2_extent_map_find_leaf(struct inode *inode,
u32 cpos, u32 clusters,
- ocfs2_extent_list *el)
+ struct ocfs2_extent_list *el)
{
int i, ret;
struct buffer_head *eb_bh = NULL;
u64 blkno;
u32 rec_end;
- ocfs2_extent_block *eb;
- ocfs2_extent_rec *rec;
+ struct ocfs2_extent_block *eb;
+ struct ocfs2_extent_rec *rec;
/*
* The bh data containing the el cannot change here, because
@@ -236,7 +236,7 @@
inode);
if (ret)
goto out_free;
- eb = (ocfs2_extent_block *)eb_bh->b_data;
+ eb = (struct ocfs2_extent_block *)eb_bh->b_data;
if (!OCFS2_IS_VALID_EXTENT_BLOCK(eb)) {
OCFS2_RO_ON_INVALID_EXTENT_BLOCK(inode->i_sb, eb);
ret = -EIO;
@@ -280,9 +280,9 @@
struct ocfs2_extent_map *em = &OCFS2_I(inode)->ip_map;
struct ocfs2_extent_map_entry *ent;
struct buffer_head *bh = NULL;
- ocfs2_extent_block *eb;
- ocfs2_dinode *di;
- ocfs2_extent_list *el;
+ struct ocfs2_extent_block *eb;
+ struct ocfs2_dinode *di;
+ struct ocfs2_extent_list *el;
spin_lock(&OCFS2_I(inode)->ip_lock);
ent = ocfs2_extent_map_lookup(em, cpos, clusters, NULL, NULL);
@@ -302,7 +302,7 @@
brelse(bh);
return ret;
}
- eb = (ocfs2_extent_block *)bh->b_data;
+ eb = (struct ocfs2_extent_block *)bh->b_data;
if (!OCFS2_IS_VALID_EXTENT_BLOCK(eb)) {
OCFS2_RO_ON_INVALID_EXTENT_BLOCK(inode->i_sb, eb);
brelse(bh);
@@ -320,7 +320,7 @@
brelse(bh);
return ret;
}
- di = (ocfs2_dinode *)bh->b_data;
+ di = (struct ocfs2_dinode *)bh->b_data;
if (!OCFS2_IS_VALID_DINODE(di)) {
brelse(bh);
OCFS2_RO_ON_INVALID_DINODE(inode->i_sb, di);
@@ -374,7 +374,7 @@
* in the insert_context will be freed.
*/
static int ocfs2_extent_map_try_insert(struct inode *inode,
- ocfs2_extent_rec *rec,
+ struct ocfs2_extent_rec *rec,
int tree_depth,
struct ocfs2_em_insert_context *ctxt)
{
@@ -406,7 +406,7 @@
if (old_ent->e_tree_depth == tree_depth) {
if (!memcmp(rec, &old_ent->e_rec,
- sizeof(ocfs2_extent_rec)))
+ sizeof(struct ocfs2_extent_rec)))
ret = 0;
/* FIXME: Should this be ESRCH/EBADR??? */
@@ -482,7 +482,7 @@
}
-int ocfs2_extent_map_insert(struct inode *inode, ocfs2_extent_rec *rec,
+int ocfs2_extent_map_insert(struct inode *inode, struct ocfs2_extent_rec *rec,
int tree_depth)
{
int ret;
@@ -565,13 +565,14 @@
* rec->e_clusters. If the append is an entirely new extent, then
* rec->e_clusters is == new_clusters.
*/
-int ocfs2_extent_map_append(struct inode *inode, ocfs2_extent_rec *rec,
+int ocfs2_extent_map_append(struct inode *inode,
+ struct ocfs2_extent_rec *rec,
u32 new_clusters)
{
int ret;
struct ocfs2_extent_map *em = &OCFS2_I(inode)->ip_map;
struct ocfs2_extent_map_entry *ent;
- ocfs2_extent_rec *old;
+ struct ocfs2_extent_rec *old;
BUG_ON(!new_clusters);
BUG_ON(le32_to_cpu(rec->e_clusters) < new_clusters);
@@ -650,7 +651,7 @@
* dropped. After that, truncate and extend can happen. Caveat Emptor.
*/
int ocfs2_extent_map_get_rec(struct inode *inode, u32 cpos,
- ocfs2_extent_rec **rec,
+ struct ocfs2_extent_rec **rec,
int *tree_depth)
{
int ret = -ENOENT;
@@ -746,7 +747,7 @@
int bpc = ocfs2_clusters_to_blocks(inode->i_sb, 1);
struct ocfs2_extent_map_entry *ent = NULL;
struct ocfs2_extent_map *em = &OCFS2_I(inode)->ip_map;
- ocfs2_extent_rec *rec;
+ struct ocfs2_extent_rec *rec;
*p_blkno = 0;
Modified: branches/ocfs2-1.2/fs/ocfs2/extent_map.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/extent_map.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/extent_map.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -34,12 +34,12 @@
* in the process of being updated.
*/
int ocfs2_extent_map_init(struct inode *inode);
-int ocfs2_extent_map_insert(struct inode *inode, ocfs2_extent_rec *rec,
+int ocfs2_extent_map_insert(struct inode *inode, struct ocfs2_extent_rec *rec,
int tree_depth);
-int ocfs2_extent_map_append(struct inode *inode, ocfs2_extent_rec *rec,
+int ocfs2_extent_map_append(struct inode *inode, struct ocfs2_extent_rec *rec,
u32 new_clusters);
int ocfs2_extent_map_get_rec(struct inode *inode, u32 cpos,
- ocfs2_extent_rec **rec,
+ struct ocfs2_extent_rec **rec,
int *tree_depth);
int ocfs2_extent_map_get_clusters(struct inode *inode,
u32 v_cpos, int count,
Modified: branches/ocfs2-1.2/fs/ocfs2/file.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/file.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/file.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -51,7 +51,7 @@
#include "buffer_head_io.h"
static int ocfs2_zero_extend(struct inode *inode);
-static int ocfs2_orphan_for_truncate(ocfs2_super *osb,
+static int ocfs2_orphan_for_truncate(struct ocfs2_super *osb,
struct inode *inode,
struct buffer_head *fe_bh,
u64 new_i_size);
@@ -130,7 +130,7 @@
int err = 0;
journal_t *journal;
struct inode *inode = dentry->d_inode;
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
mlog_entry("(0x%p, 0x%p, %d, '%.*s')\n", file, dentry, datasync,
dentry->d_name.len, dentry->d_name.name);
@@ -195,7 +195,7 @@
struct iovec local_iov = { .iov_base = (void __user *)buf,
.iov_len = count };
int ret = 0;
- ocfs2_super *osb = NULL;
+ struct ocfs2_super *osb = NULL;
struct dentry *dentry = filp->f_dentry;
struct inode *inode = dentry->d_inode;
struct ocfs2_write_lock_info info = {0, };
@@ -266,7 +266,7 @@
loff_t *ppos)
{
int ret = 0;
- ocfs2_super *osb = NULL;
+ struct ocfs2_super *osb = NULL;
struct dentry *dentry = filp->f_dentry;
struct inode *inode = dentry->d_inode;
struct ocfs2_backing_inode *target_binode;
@@ -397,7 +397,7 @@
.fsync = ocfs2_sync_file,
};
-int ocfs2_set_inode_size(ocfs2_journal_handle *handle,
+int ocfs2_set_inode_size(struct ocfs2_journal_handle *handle,
struct inode *inode,
struct buffer_head *fe_bh,
u64 new_i_size)
@@ -428,13 +428,13 @@
return status;
}
-static int ocfs2_orphan_for_truncate(ocfs2_super *osb,
+static int ocfs2_orphan_for_truncate(struct ocfs2_super *osb,
struct inode *inode,
struct buffer_head *fe_bh,
u64 new_i_size)
{
int status;
- ocfs2_journal_handle *handle;
+ struct ocfs2_journal_handle *handle;
mlog_entry_void();
@@ -458,14 +458,14 @@
return status;
}
-static int ocfs2_truncate_file(ocfs2_super *osb,
+static int ocfs2_truncate_file(struct ocfs2_super *osb,
u64 new_i_size,
struct inode *inode)
{
int status = 0;
- ocfs2_dinode *fe = NULL;
+ struct ocfs2_dinode *fe = NULL;
struct buffer_head *fe_bh = NULL;
- ocfs2_journal_handle *handle = NULL;
+ struct ocfs2_journal_handle *handle = NULL;
struct ocfs2_truncate_context *tc = NULL;
mlog_entry("(inode = %"MLFu64", new_i_size = %"MLFu64"\n",
@@ -480,7 +480,7 @@
goto bail;
}
- fe = (ocfs2_dinode *) fe_bh->b_data;
+ fe = (struct ocfs2_dinode *) fe_bh->b_data;
if (!OCFS2_IS_VALID_DINODE(fe)) {
OCFS2_RO_ON_INVALID_DINODE(inode->i_sb, fe);
status = -EIO;
@@ -620,18 +620,18 @@
* metadata reservations in the contexts. I'll return -EAGAIN, if we
* run out of transaction credits, so the caller can restart us.
*/
-int ocfs2_extend_allocation(ocfs2_super *osb,
+int ocfs2_extend_allocation(struct ocfs2_super *osb,
struct inode *inode,
u32 clusters_to_add,
struct buffer_head *fe_bh,
- ocfs2_journal_handle *handle,
- ocfs2_alloc_context *data_ac,
- ocfs2_alloc_context *meta_ac,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_alloc_context *data_ac,
+ struct ocfs2_alloc_context *meta_ac,
enum ocfs2_alloc_restarted *reason)
{
int status = 0;
int free_extents;
- ocfs2_dinode *fe = (ocfs2_dinode *) fe_bh->b_data;
+ struct ocfs2_dinode *fe = (struct ocfs2_dinode *) fe_bh->b_data;
u32 bit_off, num_bits;
u64 block;
@@ -727,7 +727,7 @@
* dinode->i_size, NOT how much allocated was actually added to the
* file. It will always be correct, even when we return an error.
*/
-int ocfs2_extend_file(ocfs2_super *osb,
+int ocfs2_extend_file(struct ocfs2_super *osb,
struct inode *inode,
u64 new_i_size,
u64 *bytes_extended)
@@ -739,10 +739,10 @@
u32 clusters_to_add;
u64 new_fe_size;
struct buffer_head *bh = NULL;
- ocfs2_dinode *fe;
- ocfs2_journal_handle *handle = NULL;
- ocfs2_alloc_context *data_ac = NULL;
- ocfs2_alloc_context *meta_ac = NULL;
+ struct ocfs2_dinode *fe;
+ struct ocfs2_journal_handle *handle = NULL;
+ struct ocfs2_alloc_context *data_ac = NULL;
+ struct ocfs2_alloc_context *meta_ac = NULL;
enum ocfs2_alloc_restarted why;
mlog_entry("(Inode %"MLFu64" new_i_size=%"MLFu64")\n",
@@ -769,7 +769,7 @@
goto leave;
}
- fe = (ocfs2_dinode *) bh->b_data;
+ fe = (struct ocfs2_dinode *) bh->b_data;
if (!OCFS2_IS_VALID_DINODE(fe)) {
OCFS2_RO_ON_INVALID_DINODE(inode->i_sb, fe);
status = -EIO;
@@ -988,9 +988,9 @@
u64 newsize, bytes_added;
struct inode *inode = dentry->d_inode;
struct super_block *sb = inode->i_sb;
- ocfs2_super *osb = OCFS2_SB(sb);
+ struct ocfs2_super *osb = OCFS2_SB(sb);
struct buffer_head *bh = NULL;
- ocfs2_journal_handle *handle = NULL;
+ struct ocfs2_journal_handle *handle = NULL;
mlog_entry("(0x%p, '%.*s', inode %"MLFu64")\n", dentry,
dentry->d_name.len, dentry->d_name.name,
@@ -1109,7 +1109,7 @@
{
struct inode *inode = dentry->d_inode;
struct super_block *sb = dentry->d_inode->i_sb;
- ocfs2_super *osb = sb->s_fs_info;
+ struct ocfs2_super *osb = sb->s_fs_info;
int err;
mlog_entry_void();
Modified: branches/ocfs2-1.2/fs/ocfs2/file.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/file.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/file.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -30,30 +30,29 @@
extern struct file_operations ocfs2_dops;
extern struct inode_operations ocfs2_file_iops;
extern struct inode_operations ocfs2_special_file_iops;
-struct _ocfs2_alloc_context;
enum ocfs2_alloc_restarted {
RESTART_TRANS = 0,
RESTART_META
};
-int ocfs2_extend_allocation(ocfs2_super *osb,
+int ocfs2_extend_allocation(struct ocfs2_super *osb,
struct inode *inode,
u32 clusters_to_add,
struct buffer_head *fe_bh,
- ocfs2_journal_handle *handle,
- struct _ocfs2_alloc_context *data_ac,
- struct _ocfs2_alloc_context *meta_ac,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_alloc_context *data_ac,
+ struct ocfs2_alloc_context *meta_ac,
enum ocfs2_alloc_restarted *reason);
int ocfs2_setattr(struct dentry *dentry, struct iattr *attr);
int ocfs2_getattr(struct vfsmount *mnt, struct dentry *dentry,
struct kstat *stat);
int ocfs2_sync_inode(struct inode *inode);
-int ocfs2_extend_file(ocfs2_super *osb,
+int ocfs2_extend_file(struct ocfs2_super *osb,
struct inode *inode,
u64 new_i_size,
u64 *bytes_extended);
-int ocfs2_set_inode_size(ocfs2_journal_handle *handle,
+int ocfs2_set_inode_size(struct ocfs2_journal_handle *handle,
struct inode *inode,
struct buffer_head *fe_bh,
u64 new_i_size);
Modified: branches/ocfs2-1.2/fs/ocfs2/heartbeat.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/heartbeat.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/heartbeat.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -61,7 +61,7 @@
static void __ocfs2_node_map_set(struct ocfs2_node_map *target,
struct ocfs2_node_map *from);
-void ocfs2_init_node_maps(ocfs2_super *osb)
+void ocfs2_init_node_maps(struct ocfs2_super *osb)
{
spin_lock_init(&osb->node_map_lock);
ocfs2_node_map_init(&osb->mounted_map);
@@ -70,7 +70,7 @@
}
static void ocfs2_do_node_down(int node_num,
- ocfs2_super *osb)
+ struct ocfs2_super *osb)
{
BUG_ON(osb->node_num == node_num);
@@ -103,7 +103,7 @@
int node_num,
void *data)
{
- ocfs2_do_node_down(node_num, (ocfs2_super *) data);
+ ocfs2_do_node_down(node_num, (struct ocfs2_super *) data);
}
/* Called from the dlm when it's about to evict a node. We may also
@@ -111,7 +111,7 @@
static void ocfs2_dlm_eviction_cb(int node_num,
void *data)
{
- ocfs2_super *osb = (ocfs2_super *) data;
+ struct ocfs2_super *osb = (struct ocfs2_super *) data;
struct super_block *sb = osb->sb;
mlog(ML_NOTICE, "device (%u,%u): dlm has evicted node %d\n",
@@ -124,7 +124,7 @@
int node_num,
void *data)
{
- ocfs2_super *osb = data;
+ struct ocfs2_super *osb = data;
BUG_ON(osb->node_num == node_num);
@@ -132,7 +132,7 @@
ocfs2_node_map_clear_bit(osb, &osb->umount_map, node_num);
}
-void ocfs2_setup_hb_callbacks(ocfs2_super *osb)
+void ocfs2_setup_hb_callbacks(struct ocfs2_super *osb)
{
o2hb_setup_callback(&osb->osb_hb_down, O2HB_NODE_DOWN_CB,
ocfs2_hb_node_down_cb, osb,
@@ -149,7 +149,7 @@
}
/* Most functions here are just stubs for now... */
-int ocfs2_register_hb_callbacks(ocfs2_super *osb)
+int ocfs2_register_hb_callbacks(struct ocfs2_super *osb)
{
int status;
@@ -167,7 +167,7 @@
return status;
}
-void ocfs2_clear_hb_callbacks(ocfs2_super *osb)
+void ocfs2_clear_hb_callbacks(struct ocfs2_super *osb)
{
int status;
@@ -180,7 +180,7 @@
mlog_errno(status);
}
-void ocfs2_stop_heartbeat(ocfs2_super *osb)
+void ocfs2_stop_heartbeat(struct ocfs2_super *osb)
{
int ret;
char *argv[5], *envp[3];
@@ -224,7 +224,7 @@
set_bit(bit, map->map);
}
-void ocfs2_node_map_set_bit(ocfs2_super *osb,
+void ocfs2_node_map_set_bit(struct ocfs2_super *osb,
struct ocfs2_node_map *map,
int bit)
{
@@ -242,7 +242,7 @@
clear_bit(bit, map->map);
}
-void ocfs2_node_map_clear_bit(ocfs2_super *osb,
+void ocfs2_node_map_clear_bit(struct ocfs2_super *osb,
struct ocfs2_node_map *map,
int bit)
{
@@ -254,7 +254,7 @@
spin_unlock(&osb->node_map_lock);
}
-int ocfs2_node_map_test_bit(ocfs2_super *osb,
+int ocfs2_node_map_test_bit(struct ocfs2_super *osb,
struct ocfs2_node_map *map,
int bit)
{
@@ -278,7 +278,7 @@
return 1;
}
-int ocfs2_node_map_is_empty(ocfs2_super *osb,
+int ocfs2_node_map_is_empty(struct ocfs2_super *osb,
struct ocfs2_node_map *map)
{
int ret;
@@ -298,7 +298,7 @@
}
/* returns 1 if bit is the only bit set in target, 0 otherwise */
-int ocfs2_node_map_is_only(ocfs2_super *osb,
+int ocfs2_node_map_is_only(struct ocfs2_super *osb,
struct ocfs2_node_map *target,
int bit)
{
@@ -329,7 +329,7 @@
/* Returns whether the recovery bit was actually set - it may not be
* if a node is still marked as needing recovery */
-int ocfs2_recovery_map_set(ocfs2_super *osb,
+int ocfs2_recovery_map_set(struct ocfs2_super *osb,
int num)
{
int set = 0;
@@ -348,13 +348,13 @@
return set;
}
-void ocfs2_recovery_map_clear(ocfs2_super *osb,
+void ocfs2_recovery_map_clear(struct ocfs2_super *osb,
int num)
{
ocfs2_node_map_clear_bit(osb, &osb->recovery_map, num);
}
-int ocfs2_node_map_iterate(ocfs2_super *osb,
+int ocfs2_node_map_iterate(struct ocfs2_super *osb,
struct ocfs2_node_map *map,
int idx)
{
Modified: branches/ocfs2-1.2/fs/ocfs2/heartbeat.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/heartbeat.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/heartbeat.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -26,41 +26,41 @@
#ifndef OCFS2_HEARTBEAT_H
#define OCFS2_HEARTBEAT_H
-void ocfs2_init_node_maps(ocfs2_super *osb);
+void ocfs2_init_node_maps(struct ocfs2_super *osb);
-void ocfs2_setup_hb_callbacks(ocfs2_super *osb);
-int ocfs2_register_hb_callbacks(ocfs2_super *osb);
-void ocfs2_clear_hb_callbacks(ocfs2_super *osb);
-void ocfs2_stop_heartbeat(ocfs2_super *osb);
+void ocfs2_setup_hb_callbacks(struct ocfs2_super *osb);
+int ocfs2_register_hb_callbacks(struct ocfs2_super *osb);
+void ocfs2_clear_hb_callbacks(struct ocfs2_super *osb);
+void ocfs2_stop_heartbeat(struct ocfs2_super *osb);
/* node map functions - used to keep track of mounted and in-recovery
* nodes. */
void ocfs2_node_map_init(struct ocfs2_node_map *map);
-int ocfs2_node_map_is_empty(ocfs2_super *osb,
+int ocfs2_node_map_is_empty(struct ocfs2_super *osb,
struct ocfs2_node_map *map);
-void ocfs2_node_map_set_bit(ocfs2_super *osb,
+void ocfs2_node_map_set_bit(struct ocfs2_super *osb,
struct ocfs2_node_map *map,
int bit);
-void ocfs2_node_map_clear_bit(ocfs2_super *osb,
+void ocfs2_node_map_clear_bit(struct ocfs2_super *osb,
struct ocfs2_node_map *map,
int bit);
-int ocfs2_node_map_test_bit(ocfs2_super *osb,
+int ocfs2_node_map_test_bit(struct ocfs2_super *osb,
struct ocfs2_node_map *map,
int bit);
-int ocfs2_node_map_iterate(ocfs2_super *osb,
+int ocfs2_node_map_iterate(struct ocfs2_super *osb,
struct ocfs2_node_map *map,
int idx);
-static inline int ocfs2_node_map_first_set_bit(ocfs2_super *osb,
+static inline int ocfs2_node_map_first_set_bit(struct ocfs2_super *osb,
struct ocfs2_node_map *map)
{
return ocfs2_node_map_iterate(osb, map, 0);
}
-int ocfs2_recovery_map_set(ocfs2_super *osb,
+int ocfs2_recovery_map_set(struct ocfs2_super *osb,
int num);
-void ocfs2_recovery_map_clear(ocfs2_super *osb,
+void ocfs2_recovery_map_clear(struct ocfs2_super *osb,
int num);
/* returns 1 if bit is the only bit set in target, 0 otherwise */
-int ocfs2_node_map_is_only(ocfs2_super *osb,
+int ocfs2_node_map_is_only(struct ocfs2_super *osb,
struct ocfs2_node_map *target,
int bit);
Modified: branches/ocfs2-1.2/fs/ocfs2/inode.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/inode.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/inode.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -66,11 +66,11 @@
struct ocfs2_find_inode_args *args);
static int ocfs2_init_locked_inode(struct inode *inode, void *opaque);
static int ocfs2_find_actor(struct inode *inode, void *opaque);
-static int ocfs2_truncate_for_delete(ocfs2_super *osb,
+static int ocfs2_truncate_for_delete(struct ocfs2_super *osb,
struct inode *inode,
struct buffer_head *fe_bh);
-struct inode *ocfs2_ilookup_for_vote(ocfs2_super *osb,
+struct inode *ocfs2_ilookup_for_vote(struct ocfs2_super *osb,
u64 blkno,
int delete_vote)
{
@@ -88,7 +88,7 @@
return ilookup5(osb->sb, args.fi_ino, ocfs2_find_actor, &args);
}
-struct inode *ocfs2_iget(ocfs2_super *osb, u64 blkno)
+struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno)
{
struct inode *inode = NULL;
struct super_block *sb = osb->sb;
@@ -211,11 +211,11 @@
return 0;
}
-int ocfs2_populate_inode(struct inode *inode, ocfs2_dinode *fe,
+int ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,
int create_ino)
{
struct super_block *sb;
- ocfs2_super *osb;
+ struct ocfs2_super *osb;
int status = -EINVAL;
mlog_entry("(0x%p, size:%"MLFu64")\n", inode, fe->i_size);
@@ -335,8 +335,8 @@
struct ocfs2_find_inode_args *args)
{
struct super_block *sb;
- ocfs2_super *osb;
- ocfs2_dinode *fe;
+ struct ocfs2_super *osb;
+ struct ocfs2_dinode *fe;
struct buffer_head *bh = NULL;
int status;
int sysfile = 0;
@@ -367,7 +367,7 @@
goto bail;
}
- fe = (ocfs2_dinode *) bh->b_data;
+ fe = (struct ocfs2_dinode *) bh->b_data;
if (!OCFS2_IS_VALID_DINODE(fe)) {
mlog(ML_ERROR, "Invalid dinode #%"MLFu64": signature = %.*s\n",
fe->i_blkno, 7, fe->i_signature);
@@ -410,18 +410,18 @@
sync_blockdev(sb->s_bdev);
}
-static int ocfs2_truncate_for_delete(ocfs2_super *osb,
+static int ocfs2_truncate_for_delete(struct ocfs2_super *osb,
struct inode *inode,
struct buffer_head *fe_bh)
{
int status = 0;
- ocfs2_journal_handle *handle = NULL;
+ struct ocfs2_journal_handle *handle = NULL;
struct ocfs2_truncate_context *tc = NULL;
- ocfs2_dinode *fe;
+ struct ocfs2_dinode *fe;
mlog_entry_void();
- fe = (ocfs2_dinode *) fe_bh->b_data;
+ fe = (struct ocfs2_dinode *) fe_bh->b_data;
/* zero allocation, zero truncate :) */
if (!fe->i_clusters)
@@ -471,9 +471,9 @@
int status;
struct inode *inode_alloc_inode = NULL;
struct buffer_head *inode_alloc_bh = NULL;
- ocfs2_journal_handle *handle;
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
- ocfs2_dinode *di = (ocfs2_dinode *) di_bh->b_data;
+ struct ocfs2_journal_handle *handle;
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_dinode *di = (struct ocfs2_dinode *) di_bh->b_data;
inode_alloc_inode =
ocfs2_get_system_file_inode(osb, INODE_ALLOC_SYSTEM_INODE,
@@ -549,7 +549,7 @@
int status, orphaned_slot;
struct inode *orphan_dir_inode = NULL;
struct buffer_head *orphan_dir_bh = NULL;
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
/* We've already voted on this so it should be readonly - no
* spinlock needed. */
@@ -606,7 +606,7 @@
{
int ret = 0;
struct ocfs2_inode_info *oi = OCFS2_I(inode);
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
/* We shouldn't be getting here for the root directory
* inode.. */
@@ -663,7 +663,7 @@
{
int status = 0;
struct ocfs2_inode_info *oi = OCFS2_I(inode);
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
*wipe = 0;
@@ -685,7 +685,7 @@
}
/* Do some basic inode verification... */
- di = (ocfs2_dinode *) di_bh->b_data;
+ di = (struct ocfs2_dinode *) di_bh->b_data;
if (!(di->i_flags & cpu_to_le32(OCFS2_ORPHANED_FL))) {
/* for lack of a better error? */
status = -EEXIST;
@@ -1057,12 +1057,12 @@
* struct inode.
* Only takes ip_lock.
*/
-int ocfs2_mark_inode_dirty(ocfs2_journal_handle *handle,
+int ocfs2_mark_inode_dirty(struct ocfs2_journal_handle *handle,
struct inode *inode,
struct buffer_head *bh)
{
int status;
- ocfs2_dinode *fe = (ocfs2_dinode *) bh->b_data;
+ struct ocfs2_dinode *fe = (struct ocfs2_dinode *) bh->b_data;
mlog_entry("(inode %"MLFu64")\n", OCFS2_I(inode)->ip_blkno);
@@ -1106,9 +1106,9 @@
* does no i/o, only takes ip_lock.
*/
void ocfs2_refresh_inode(struct inode *inode,
- ocfs2_dinode *fe)
+ struct ocfs2_dinode *fe)
{
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
spin_lock(&OCFS2_I(inode)->ip_lock);
Modified: branches/ocfs2-1.2/fs/ocfs2/inode.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/inode.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/inode.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -53,7 +53,7 @@
* out other I/O to the inode until we either commit or
* abort. */
struct list_head ip_handle_list;
- ocfs2_journal_handle *ip_handle;
+ struct ocfs2_journal_handle *ip_handle;
u32 ip_flags; /* see below */
@@ -121,13 +121,13 @@
void ocfs2_clear_inode(struct inode *inode);
void ocfs2_delete_inode(struct inode *inode);
void ocfs2_drop_inode(struct inode *inode);
-struct inode *ocfs2_iget(ocfs2_super *osb, u64 feoff);
-struct inode *ocfs2_ilookup_for_vote(ocfs2_super *osb,
+struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 feoff);
+struct inode *ocfs2_ilookup_for_vote(struct ocfs2_super *osb,
u64 blkno,
int delete_vote);
int ocfs2_inode_init_private(struct inode *inode);
int ocfs2_inode_revalidate(struct dentry *dentry);
-int ocfs2_populate_inode(struct inode *inode, ocfs2_dinode *fe,
+int ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,
int create_ino);
void ocfs2_read_inode(struct inode *inode);
void ocfs2_read_inode2(struct inode *inode, void *opaque);
@@ -135,8 +135,8 @@
size_t size, loff_t *offp);
void ocfs2_sync_blockdev(struct super_block *sb);
void ocfs2_refresh_inode(struct inode *inode,
- ocfs2_dinode *fe);
-int ocfs2_mark_inode_dirty(ocfs2_journal_handle *handle,
+ struct ocfs2_dinode *fe);
+int ocfs2_mark_inode_dirty(struct ocfs2_journal_handle *handle,
struct inode *inode,
struct buffer_head *bh);
int ocfs2_aio_read(struct file *file, struct kiocb *req, struct iocb *iocb);
Modified: branches/ocfs2-1.2/fs/ocfs2/journal.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/journal.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/journal.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -52,28 +52,28 @@
spinlock_t trans_inc_lock = SPIN_LOCK_UNLOCKED;
static int ocfs2_force_read_journal(struct inode *inode);
-static int ocfs2_recover_node(ocfs2_super *osb,
- int node_num);
+static int ocfs2_recover_node(struct ocfs2_super *osb,
+ int node_num);
static int __ocfs2_recovery_thread(void *arg);
-static int ocfs2_commit_cache(ocfs2_super *osb);
-static int ocfs2_wait_on_mount(ocfs2_super *osb);
-static void ocfs2_handle_cleanup_locks(ocfs2_journal *journal,
- ocfs2_journal_handle *handle);
-static void ocfs2_commit_unstarted_handle(ocfs2_journal_handle *handle);
-static int ocfs2_journal_toggle_dirty(ocfs2_super *osb,
- int dirty);
-static int ocfs2_trylock_journal(ocfs2_super *osb,
+static int ocfs2_commit_cache(struct ocfs2_super *osb);
+static int ocfs2_wait_on_mount(struct ocfs2_super *osb);
+static void ocfs2_handle_cleanup_locks(struct ocfs2_journal *journal,
+ struct ocfs2_journal_handle *handle);
+static void ocfs2_commit_unstarted_handle(struct ocfs2_journal_handle *handle);
+static int ocfs2_journal_toggle_dirty(struct ocfs2_super *osb,
+ int dirty);
+static int ocfs2_trylock_journal(struct ocfs2_super *osb,
int slot_num);
-static int ocfs2_recover_orphans(ocfs2_super *osb,
- int slot);
+static int ocfs2_recover_orphans(struct ocfs2_super *osb,
+ int slot);
static int ocfs2_commit_thread(void *arg);
-static int ocfs2_commit_cache(ocfs2_super *osb)
+static int ocfs2_commit_cache(struct ocfs2_super *osb)
{
int status = 0;
unsigned int flushed;
unsigned long old_id;
- ocfs2_journal *journal = NULL;
+ struct ocfs2_journal *journal = NULL;
mlog_entry_void();
@@ -113,9 +113,9 @@
return status;
}
-ocfs2_journal_handle *ocfs2_alloc_handle(ocfs2_super *osb)
+struct ocfs2_journal_handle *ocfs2_alloc_handle(struct ocfs2_super *osb)
{
- ocfs2_journal_handle *retval = NULL;
+ struct ocfs2_journal_handle *retval = NULL;
retval = kcalloc(1, sizeof(*retval), GFP_KERNEL);
if (!retval) {
@@ -138,9 +138,9 @@
/* pass it NULL and it will allocate a new handle object for you. If
* you pass it a handle however, it may still return error, in which
* case it has free'd the passed handle for you. */
-ocfs2_journal_handle *ocfs2_start_trans(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- int max_buffs)
+struct ocfs2_journal_handle *ocfs2_start_trans(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ int max_buffs)
{
int ret;
journal_t *journal = osb->journal->j_journal;
@@ -207,7 +207,7 @@
return ERR_PTR(ret);
}
-void ocfs2_handle_add_inode(ocfs2_journal_handle *handle,
+void ocfs2_handle_add_inode(struct ocfs2_journal_handle *handle,
struct inode *inode)
{
BUG_ON(!handle);
@@ -227,7 +227,7 @@
list_add_tail(&(OCFS2_I(inode)->ip_handle_list), &(handle->inode_list));
}
-static void ocfs2_handle_unlock_inodes(ocfs2_journal_handle *handle)
+static void ocfs2_handle_unlock_inodes(struct ocfs2_journal_handle *handle)
{
struct list_head *p, *n;
struct inode *inode;
@@ -248,7 +248,7 @@
/* This is trivial so we do it out of the main commit
* paths. Beware, it can be called from start_trans too! */
-static void ocfs2_commit_unstarted_handle(ocfs2_journal_handle *handle)
+static void ocfs2_commit_unstarted_handle(struct ocfs2_journal_handle *handle)
{
mlog_entry_void();
@@ -264,11 +264,11 @@
mlog_exit_void();
}
-void ocfs2_commit_trans(ocfs2_journal_handle *handle)
+void ocfs2_commit_trans(struct ocfs2_journal_handle *handle)
{
handle_t *jbd_handle;
int retval;
- ocfs2_journal *journal = handle->journal;
+ struct ocfs2_journal *journal = handle->journal;
mlog_entry_void();
@@ -328,7 +328,7 @@
* good because transaction ids haven't yet been recorded on the
* cluster locks associated with this handle.
*/
-int ocfs2_extend_trans(ocfs2_journal_handle *handle,
+int ocfs2_extend_trans(struct ocfs2_journal_handle *handle,
int nblocks)
{
int status;
@@ -366,7 +366,7 @@
return status;
}
-int ocfs2_journal_access(ocfs2_journal_handle *handle,
+int ocfs2_journal_access(struct ocfs2_journal_handle *handle,
struct inode *inode,
struct buffer_head *bh,
int type)
@@ -426,7 +426,7 @@
return status;
}
-int ocfs2_journal_dirty(ocfs2_journal_handle *handle,
+int ocfs2_journal_dirty(struct ocfs2_journal_handle *handle,
struct buffer_head *bh)
{
int status;
@@ -447,11 +447,11 @@
}
/* We always assume you're adding a metadata lock at level 'ex' */
-int ocfs2_handle_add_lock(ocfs2_journal_handle *handle,
+int ocfs2_handle_add_lock(struct ocfs2_journal_handle *handle,
struct inode *inode)
{
int status;
- ocfs2_journal_lock *lock;
+ struct ocfs2_journal_lock *lock;
BUG_ON(!inode);
@@ -475,15 +475,16 @@
return status;
}
-static void ocfs2_handle_cleanup_locks(ocfs2_journal *journal,
- ocfs2_journal_handle *handle)
+static void ocfs2_handle_cleanup_locks(struct ocfs2_journal *journal,
+ struct ocfs2_journal_handle *handle)
{
struct list_head *p, *n;
- ocfs2_journal_lock *lock;
+ struct ocfs2_journal_lock *lock;
struct inode *inode;
list_for_each_safe(p, n, &(handle->locks)) {
- lock = list_entry(p, ocfs2_journal_lock, jl_lock_list);
+ lock = list_entry(p, struct ocfs2_journal_lock,
+ jl_lock_list);
list_del(&lock->jl_lock_list);
handle->num_locks--;
@@ -500,7 +501,7 @@
#define OCFS2_DEFAULT_COMMIT_INTERVAL (HZ * 5)
-void ocfs2_set_journal_params(ocfs2_super *osb)
+void ocfs2_set_journal_params(struct ocfs2_super *osb)
{
journal_t *journal = osb->journal->j_journal;
@@ -513,14 +514,14 @@
spin_unlock(&journal->j_state_lock);
}
-int ocfs2_journal_init(ocfs2_journal *journal, int *dirty)
+int ocfs2_journal_init(struct ocfs2_journal *journal, int *dirty)
{
int status = -1;
struct inode *inode = NULL; /* the journal inode */
journal_t *j_journal = NULL;
- ocfs2_dinode *di = NULL;
+ struct ocfs2_dinode *di = NULL;
struct buffer_head *bh = NULL;
- ocfs2_super *osb;
+ struct ocfs2_super *osb;
int meta_lock = 0;
mlog_entry_void();
@@ -560,7 +561,7 @@
}
meta_lock = 1;
- di = (ocfs2_dinode *)bh->b_data;
+ di = (struct ocfs2_dinode *)bh->b_data;
if (inode->i_size < OCFS2_MIN_JOURNAL_SIZE) {
mlog(ML_ERROR, "Journal file size (%lld) is too small!\n",
@@ -612,18 +613,18 @@
return status;
}
-static int ocfs2_journal_toggle_dirty(ocfs2_super *osb,
+static int ocfs2_journal_toggle_dirty(struct ocfs2_super *osb,
int dirty)
{
int status;
unsigned int flags;
- ocfs2_journal *journal = osb->journal;
+ struct ocfs2_journal *journal = osb->journal;
struct buffer_head *bh = journal->j_bh;
- ocfs2_dinode *fe;
+ struct ocfs2_dinode *fe;
mlog_entry_void();
- fe = (ocfs2_dinode *)bh->b_data;
+ fe = (struct ocfs2_dinode *)bh->b_data;
if (!OCFS2_IS_VALID_DINODE(fe)) {
/* This is called from startup/shutdown which will
* handle the errors in a specific manner, so no need
@@ -654,9 +655,9 @@
* If the journal has been kmalloc'd it needs to be freed after this
* call.
*/
-void ocfs2_journal_shutdown(ocfs2_super *osb)
+void ocfs2_journal_shutdown(struct ocfs2_super *osb)
{
- ocfs2_journal *journal = NULL;
+ struct ocfs2_journal *journal = NULL;
int status = 0;
struct inode *inode = NULL;
int num_running_trans = 0;
@@ -745,10 +746,10 @@
}
}
-int ocfs2_journal_load(ocfs2_journal *journal)
+int ocfs2_journal_load(struct ocfs2_journal *journal)
{
int status = 0;
- ocfs2_super *osb;
+ struct ocfs2_super *osb;
mlog_entry_void();
@@ -790,7 +791,7 @@
/* 'full' flag tells us whether we clear out all blocks or if we just
* mark the journal clean */
-int ocfs2_journal_wipe(ocfs2_journal *journal, int full)
+int ocfs2_journal_wipe(struct ocfs2_journal *journal, int full)
{
int status;
@@ -884,8 +885,8 @@
struct ocfs2_la_recovery_item {
struct list_head lri_list;
int lri_slot;
- ocfs2_dinode *lri_la_dinode;
- ocfs2_dinode *lri_tl_dinode;
+ struct ocfs2_dinode *lri_la_dinode;
+ struct ocfs2_dinode *lri_tl_dinode;
};
/* Does the second half of the recovery process. By this point, the
@@ -901,9 +902,9 @@
void ocfs2_complete_recovery(void *data)
{
int ret;
- ocfs2_super *osb = data;
- ocfs2_journal *journal = osb->journal;
- ocfs2_dinode *la_dinode, *tl_dinode;
+ struct ocfs2_super *osb = data;
+ struct ocfs2_journal *journal = osb->journal;
+ struct ocfs2_dinode *la_dinode, *tl_dinode;
struct ocfs2_la_recovery_item *item;
struct list_head *p, *n;
LIST_HEAD(tmp_la_list);
@@ -962,10 +963,10 @@
/* NOTE: This function always eats your references to la_dinode and
* tl_dinode, either manually on error, or by passing them to
* ocfs2_complete_recovery */
-static void ocfs2_queue_recovery_completion(ocfs2_journal *journal,
+static void ocfs2_queue_recovery_completion(struct ocfs2_journal *journal,
int slot_num,
- ocfs2_dinode *la_dinode,
- ocfs2_dinode *tl_dinode)
+ struct ocfs2_dinode *la_dinode,
+ struct ocfs2_dinode *tl_dinode)
{
struct ocfs2_la_recovery_item *item;
@@ -997,9 +998,9 @@
/* Called by the mount code to queue recovery the last part of
* recovery for it's own slot. */
-void ocfs2_complete_mount_recovery(ocfs2_super *osb)
+void ocfs2_complete_mount_recovery(struct ocfs2_super *osb)
{
- ocfs2_journal *journal = osb->journal;
+ struct ocfs2_journal *journal = osb->journal;
if (osb->dirty) {
/* No need to queue up our truncate_log as regular
@@ -1018,7 +1019,7 @@
static int __ocfs2_recovery_thread(void *arg)
{
int status, node_num;
- ocfs2_super *osb = arg;
+ struct ocfs2_super *osb = arg;
mlog_entry_void();
@@ -1084,7 +1085,7 @@
return status;
}
-void ocfs2_recovery_thread(ocfs2_super *osb, int node_num)
+void ocfs2_recovery_thread(struct ocfs2_super *osb, int node_num)
{
mlog_entry("(node_num=%d, osb->node_num = %d)\n",
node_num, osb->node_num);
@@ -1119,7 +1120,7 @@
/* Does the actual journal replay and marks the journal inode as
* clean. Will only replay if the journal inode is marked dirty. */
-static int ocfs2_replay_journal(ocfs2_super *osb,
+static int ocfs2_replay_journal(struct ocfs2_super *osb,
int node_num,
int slot_num)
{
@@ -1127,7 +1128,7 @@
int got_lock = 0;
unsigned int flags;
struct inode *inode = NULL;
- ocfs2_dinode *fe;
+ struct ocfs2_dinode *fe;
journal_t *journal = NULL;
struct buffer_head *bh = NULL;
@@ -1157,7 +1158,7 @@
}
got_lock = 1;
- fe = (ocfs2_dinode *) bh->b_data;
+ fe = (struct ocfs2_dinode *) bh->b_data;
flags = le32_to_cpu(fe->id1.journal1.ij_flags);
@@ -1246,14 +1247,14 @@
* second part of a nodes recovery process (local alloc recovery) is
* far less concerning.
*/
-static int ocfs2_recover_node(ocfs2_super *osb,
- int node_num)
+static int ocfs2_recover_node(struct ocfs2_super *osb,
+ int node_num)
{
int status = 0;
int slot_num;
struct ocfs2_slot_info *si = osb->slot_info;
- ocfs2_dinode *la_copy = NULL;
- ocfs2_dinode *tl_copy = NULL;
+ struct ocfs2_dinode *la_copy = NULL;
+ struct ocfs2_dinode *tl_copy = NULL;
mlog_entry("(node_num=%d, osb->node_num = %d)\n",
node_num, osb->node_num);
@@ -1315,7 +1316,7 @@
/* Test node liveness by trylocking his journal. If we get the lock,
* we drop it here. Return 0 if we got the lock, -EAGAIN if node is
* still alive (we couldn't get the lock) and < 0 on error. */
-static int ocfs2_trylock_journal(ocfs2_super *osb,
+static int ocfs2_trylock_journal(struct ocfs2_super *osb,
int slot_num)
{
int status, flags;
@@ -1355,7 +1356,7 @@
/* Call this underneath ocfs2_super_lock. It also assumes that the
* slot info struct has been updated from disk. */
-int ocfs2_mark_dead_nodes(ocfs2_super *osb)
+int ocfs2_mark_dead_nodes(struct ocfs2_super *osb)
{
int status, i, node_num;
struct ocfs2_slot_info *si = osb->slot_info;
@@ -1399,7 +1400,7 @@
return status;
}
-static int ocfs2_recover_orphans(ocfs2_super *osb,
+static int ocfs2_recover_orphans(struct ocfs2_super *osb,
int slot)
{
int status = 0;
@@ -1542,7 +1543,7 @@
return status;
}
-static int ocfs2_wait_on_mount(ocfs2_super *osb)
+static int ocfs2_wait_on_mount(struct ocfs2_super *osb)
{
/* This check is good because ocfs2 will wait on our recovery
* thread before changing it to something other than MOUNTED
@@ -1565,8 +1566,8 @@
static int ocfs2_commit_thread(void *arg)
{
int status;
- ocfs2_super *osb = arg;
- ocfs2_journal *journal = osb->journal;
+ struct ocfs2_super *osb = arg;
+ struct ocfs2_journal *journal = osb->journal;
/* we can trust j_num_trans here because _should_stop() is only set in
* shutdown and nobody other than ourselves should be able to start
@@ -1598,12 +1599,12 @@
/* Look for a dirty journal without taking any cluster locks. Used for
* hard readonly access to determine whether the file system journals
* require recovery. */
-int ocfs2_check_journals_nolocks(ocfs2_super *osb)
+int ocfs2_check_journals_nolocks(struct ocfs2_super *osb)
{
int ret = 0;
unsigned int slot;
struct buffer_head *di_bh;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
struct inode *journal = NULL;
for(slot = 0; slot < osb->max_slots; slot++) {
@@ -1624,7 +1625,7 @@
goto out;
}
- di = (ocfs2_dinode *) di_bh->b_data;
+ di = (struct ocfs2_dinode *) di_bh->b_data;
if (le32_to_cpu(di->id1.journal1.ij_flags) &
OCFS2_JOURNAL_DIRTY_FL)
Modified: branches/ocfs2-1.2/fs/ocfs2/journal.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/journal.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/journal.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -37,18 +37,17 @@
OCFS2_JOURNAL_IN_SHUTDOWN,
};
-struct _ocfs2_super;
-struct _ocfs2_dinode;
-struct _ocfs2_journal_handle;
+struct ocfs2_super;
+struct ocfs2_dinode;
+struct ocfs2_journal_handle;
-typedef struct _ocfs2_journal ocfs2_journal;
-struct _ocfs2_journal {
+struct ocfs2_journal {
enum ocfs2_journal_state j_state; /* Journals current state */
journal_t *j_journal; /* The kernels journal type */
struct inode *j_inode; /* Kernel inode pointing to
* this journal */
- struct _ocfs2_super *j_osb; /* pointer to the super
+ struct ocfs2_super *j_osb; /* pointer to the super
* block for the node
* we're currently
* running on -- not
@@ -72,7 +71,7 @@
extern spinlock_t trans_inc_lock;
/* wrap j_trans_id so we never have it equal to zero. */
-static inline unsigned long ocfs2_inc_trans_id(ocfs2_journal *j)
+static inline unsigned long ocfs2_inc_trans_id(struct ocfs2_journal *j)
{
unsigned long old_id;
spin_lock(&trans_inc_lock);
@@ -83,7 +82,7 @@
return old_id;
}
-static inline void ocfs2_set_inode_lock_trans(ocfs2_journal *journal,
+static inline void ocfs2_set_inode_lock_trans(struct ocfs2_journal *journal,
struct inode *inode)
{
spin_lock(&trans_inc_lock);
@@ -99,7 +98,7 @@
static inline int ocfs2_inode_fully_checkpointed(struct inode *inode)
{
int ret;
- ocfs2_journal *journal = OCFS2_SB(inode->i_sb)->journal;
+ struct ocfs2_journal *journal = OCFS2_SB(inode->i_sb)->journal;
spin_lock(&trans_inc_lock);
ret = time_after(journal->j_trans_id, OCFS2_I(inode)->ip_last_trans);
@@ -128,7 +127,7 @@
return ret;
}
-static inline void ocfs2_inode_set_new(ocfs2_super *osb,
+static inline void ocfs2_inode_set_new(struct ocfs2_super *osb,
struct inode *inode)
{
spin_lock(&trans_inc_lock);
@@ -138,15 +137,14 @@
extern kmem_cache_t *ocfs2_lock_cache;
-typedef struct _ocfs2_journal_lock ocfs2_journal_lock;
-struct _ocfs2_journal_lock {
+struct ocfs2_journal_lock {
struct inode *jl_inode;
struct list_head jl_lock_list;
};
-struct _ocfs2_journal_handle {
+struct ocfs2_journal_handle {
handle_t *k_handle; /* kernel handle. */
- ocfs2_journal *journal;
+ struct ocfs2_journal *journal;
u32 flags; /* see flags below. */
int max_buffs; /* Buffs reserved by this handle */
@@ -162,12 +160,12 @@
#define OCFS2_HANDLE_STARTED 1
/* should we sync-commit this handle? */
#define OCFS2_HANDLE_SYNC 2
-static inline int ocfs2_handle_started(ocfs2_journal_handle *handle)
+static inline int ocfs2_handle_started(struct ocfs2_journal_handle *handle)
{
return handle->flags & OCFS2_HANDLE_STARTED;
}
-static inline void ocfs2_handle_set_sync(ocfs2_journal_handle *handle, int sync)
+static inline void ocfs2_handle_set_sync(struct ocfs2_journal_handle *handle, int sync)
{
if (sync)
handle->flags |= OCFS2_HANDLE_SYNC;
@@ -194,20 +192,20 @@
* event on.
* ocfs2_start_checkpoint - Kick the commit thread to do a checkpoint.
*/
-void ocfs2_set_journal_params(ocfs2_super *osb);
-int ocfs2_journal_init(ocfs2_journal *journal,
+void ocfs2_set_journal_params(struct ocfs2_super *osb);
+int ocfs2_journal_init(struct ocfs2_journal *journal,
int *dirty);
-void ocfs2_journal_shutdown(struct _ocfs2_super *osb);
-int ocfs2_journal_wipe(ocfs2_journal *journal,
+void ocfs2_journal_shutdown(struct ocfs2_super *osb);
+int ocfs2_journal_wipe(struct ocfs2_journal *journal,
int full);
-int ocfs2_journal_load(ocfs2_journal *journal);
-int ocfs2_check_journals_nolocks(ocfs2_super *osb);
-void ocfs2_recovery_thread(struct _ocfs2_super *osb,
+int ocfs2_journal_load(struct ocfs2_journal *journal);
+int ocfs2_check_journals_nolocks(struct ocfs2_super *osb);
+void ocfs2_recovery_thread(struct ocfs2_super *osb,
int node_num);
-int ocfs2_mark_dead_nodes(ocfs2_super *osb);
-void ocfs2_complete_mount_recovery(ocfs2_super *osb);
+int ocfs2_mark_dead_nodes(struct ocfs2_super *osb);
+void ocfs2_complete_mount_recovery(struct ocfs2_super *osb);
-static inline void ocfs2_start_checkpoint(struct _ocfs2_super *osb)
+static inline void ocfs2_start_checkpoint(struct ocfs2_super *osb)
{
atomic_set(&osb->needs_checkpoint, 1);
wake_up(&osb->checkpoint_event);
@@ -215,7 +213,7 @@
static inline void ocfs2_checkpoint_inode(struct inode *inode)
{
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
if (!ocfs2_inode_fully_checkpointed(inode)) {
/* WARNING: This only kicks off a single
@@ -262,12 +260,12 @@
/* You must always start_trans with a number of buffs > 0, but it's
* perfectly legal to go through an entire transaction without having
* dirtied any buffers. */
-ocfs2_journal_handle *ocfs2_alloc_handle(ocfs2_super *osb);
-ocfs2_journal_handle *ocfs2_start_trans(struct _ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+struct ocfs2_journal_handle *ocfs2_alloc_handle(struct ocfs2_super *osb);
+struct ocfs2_journal_handle *ocfs2_start_trans(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
int max_buffs);
-void ocfs2_commit_trans(ocfs2_journal_handle *handle);
-int ocfs2_extend_trans(ocfs2_journal_handle *handle,
+void ocfs2_commit_trans(struct ocfs2_journal_handle *handle);
+int ocfs2_extend_trans(struct ocfs2_journal_handle *handle,
int nblocks);
/*
@@ -285,7 +283,7 @@
#define OCFS2_JOURNAL_ACCESS_WRITE 1
#define OCFS2_JOURNAL_ACCESS_UNDO 2
-int ocfs2_journal_access(ocfs2_journal_handle *handle,
+int ocfs2_journal_access(struct ocfs2_journal_handle *handle,
struct inode *inode,
struct buffer_head *bh,
int type);
@@ -308,15 +306,15 @@
* <modify the bh>
* ocfs2_journal_dirty(handle, bh);
*/
-int ocfs2_journal_dirty(ocfs2_journal_handle *handle,
+int ocfs2_journal_dirty(struct ocfs2_journal_handle *handle,
struct buffer_head *bh);
-int ocfs2_handle_add_lock(ocfs2_journal_handle *handle,
+int ocfs2_handle_add_lock(struct ocfs2_journal_handle *handle,
struct inode *inode);
/*
* Use this to protect from other processes reading buffer state while
* it's in flight.
*/
-void ocfs2_handle_add_inode(ocfs2_journal_handle *handle,
+void ocfs2_handle_add_inode(struct ocfs2_journal_handle *handle,
struct inode *inode);
/*
@@ -378,7 +376,7 @@
+ OCFS2_UNLINK_CREDITS)
static inline int ocfs2_calc_extend_credits(struct super_block *sb,
- ocfs2_dinode *fe,
+ struct ocfs2_dinode *fe,
u32 bits_wanted)
{
int bitmap_blocks, sysfile_bitmap_blocks, dinode_blocks;
@@ -428,8 +426,8 @@
static inline int ocfs2_calc_tree_trunc_credits(struct super_block *sb,
unsigned int clusters_to_del,
- ocfs2_dinode *fe,
- ocfs2_extent_list *last_el)
+ struct ocfs2_dinode *fe,
+ struct ocfs2_extent_list *last_el)
{
/* for dinode + all headers in this pass + update to next leaf */
u16 next_free = le16_to_cpu(last_el->l_next_free_rec);
Modified: branches/ocfs2-1.2/fs/ocfs2/localalloc.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/localalloc.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/localalloc.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -47,33 +47,33 @@
#define OCFS2_LOCAL_ALLOC(dinode) (&((dinode)->id2.i_lab))
-static inline int ocfs2_local_alloc_window_bits(ocfs2_super *osb);
+static inline int ocfs2_local_alloc_window_bits(struct ocfs2_super *osb);
-static u32 ocfs2_local_alloc_count_bits(ocfs2_dinode *alloc);
+static u32 ocfs2_local_alloc_count_bits(struct ocfs2_dinode *alloc);
-static int ocfs2_local_alloc_find_clear_bits(ocfs2_super *osb,
- ocfs2_dinode *alloc,
+static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb,
+ struct ocfs2_dinode *alloc,
u32 numbits);
-static void ocfs2_clear_local_alloc(ocfs2_dinode *alloc);
+static void ocfs2_clear_local_alloc(struct ocfs2_dinode *alloc);
-static int ocfs2_sync_local_to_main(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- ocfs2_dinode *alloc,
+static int ocfs2_sync_local_to_main(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_dinode *alloc,
struct inode *main_bm_inode,
struct buffer_head *main_bm_bh);
-static int ocfs2_local_alloc_reserve_for_window(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- ocfs2_alloc_context **ac,
+static int ocfs2_local_alloc_reserve_for_window(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_alloc_context **ac,
struct inode **bitmap_inode,
struct buffer_head **bitmap_bh);
-static int ocfs2_local_alloc_new_window(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- ocfs2_alloc_context *ac);
+static int ocfs2_local_alloc_new_window(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_alloc_context *ac);
-static int ocfs2_local_alloc_slide_window(ocfs2_super *osb,
+static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,
struct inode *local_alloc_inode);
/*
@@ -83,7 +83,7 @@
* been chosen so that most allocations, including new block groups go
* through local alloc.
*/
-static inline int ocfs2_local_alloc_window_bits(ocfs2_super *osb)
+static inline int ocfs2_local_alloc_window_bits(struct ocfs2_super *osb)
{
BUG_ON(osb->s_clustersize_bits < 12);
@@ -94,7 +94,7 @@
* Tell us whether a given allocation should use the local alloc
* file. Otherwise, it has to go to the main bitmap.
*/
-int ocfs2_alloc_should_use_local(ocfs2_super *osb, u64 bits)
+int ocfs2_alloc_should_use_local(struct ocfs2_super *osb, u64 bits)
{
int la_bits = ocfs2_local_alloc_window_bits(osb);
@@ -111,14 +111,14 @@
return 1;
}
-int ocfs2_load_local_alloc(ocfs2_super *osb)
+int ocfs2_load_local_alloc(struct ocfs2_super *osb)
{
int status = 0;
- ocfs2_dinode *alloc = NULL;
+ struct ocfs2_dinode *alloc = NULL;
struct buffer_head *alloc_bh = NULL;
u32 num_used;
struct inode *inode = NULL;
- ocfs2_local_alloc *la;
+ struct ocfs2_local_alloc *la;
mlog_entry_void();
@@ -138,7 +138,7 @@
goto bail;
}
- alloc = (ocfs2_dinode *) alloc_bh->b_data;
+ alloc = (struct ocfs2_dinode *) alloc_bh->b_data;
la = OCFS2_LOCAL_ALLOC(alloc);
if (!(le32_to_cpu(alloc->i_flags) &
@@ -193,16 +193,16 @@
* local_alloc_bh is optional. If not passed, we will simply use the
* one off osb. If you do pass it however, be warned that it *will* be
* returned brelse'd and NULL'd out.*/
-void ocfs2_shutdown_local_alloc(ocfs2_super *osb)
+void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb)
{
int status;
- ocfs2_journal_handle *handle = NULL;
+ struct ocfs2_journal_handle *handle = NULL;
struct inode *local_alloc_inode = NULL;
struct buffer_head *bh = NULL;
struct buffer_head *main_bm_bh = NULL;
struct inode *main_bm_inode = NULL;
- ocfs2_dinode *alloc_copy = NULL;
- ocfs2_dinode *alloc = NULL;
+ struct ocfs2_dinode *alloc_copy = NULL;
+ struct ocfs2_dinode *alloc = NULL;
mlog_entry_void();
@@ -253,7 +253,7 @@
}
bh = osb->local_alloc_bh;
- alloc = (ocfs2_dinode *) bh->b_data;
+ alloc = (struct ocfs2_dinode *) bh->b_data;
alloc_copy = kmalloc(bh->b_size, GFP_KERNEL);
if (!alloc_copy) {
@@ -312,14 +312,14 @@
* we kmalloc a copy of the local alloc before it's change for the
* caller to process with ocfs2_complete_local_alloc_recovery
*/
-int ocfs2_begin_local_alloc_recovery(ocfs2_super *osb,
+int ocfs2_begin_local_alloc_recovery(struct ocfs2_super *osb,
int slot_num,
- ocfs2_dinode **alloc_copy)
+ struct ocfs2_dinode **alloc_copy)
{
int status = 0;
struct buffer_head *alloc_bh = NULL;
struct inode *inode = NULL;
- ocfs2_dinode *alloc;
+ struct ocfs2_dinode *alloc;
mlog_entry("(slot_num = %d)\n", slot_num);
@@ -350,7 +350,7 @@
}
memcpy((*alloc_copy), alloc_bh->b_data, alloc_bh->b_size);
- alloc = (ocfs2_dinode *) alloc_bh->b_data;
+ alloc = (struct ocfs2_dinode *) alloc_bh->b_data;
ocfs2_clear_local_alloc(alloc);
status = ocfs2_write_block(osb, alloc_bh, inode);
@@ -381,11 +381,11 @@
* recovery map. Dlm locks will no longer stall, so lets clear out the
* main bitmap.
*/
-int ocfs2_complete_local_alloc_recovery(ocfs2_super *osb,
- ocfs2_dinode *alloc)
+int ocfs2_complete_local_alloc_recovery(struct ocfs2_super *osb,
+ struct ocfs2_dinode *alloc)
{
int status;
- ocfs2_journal_handle *handle = NULL;
+ struct ocfs2_journal_handle *handle = NULL;
struct buffer_head *main_bm_bh = NULL;
struct inode *main_bm_inode = NULL;
@@ -451,13 +451,13 @@
* We will add ourselves to the transaction passed in, but may start
* our own in order to shift windows.
*/
-int ocfs2_reserve_local_alloc_bits(ocfs2_super *osb,
- ocfs2_journal_handle *passed_handle,
+int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *passed_handle,
u32 bits_wanted,
- ocfs2_alloc_context *ac)
+ struct ocfs2_alloc_context *ac)
{
int status;
- ocfs2_dinode *alloc;
+ struct ocfs2_dinode *alloc;
struct inode *local_alloc_inode;
unsigned int free_bits;
@@ -489,7 +489,7 @@
goto bail;
}
- alloc = (ocfs2_dinode *) osb->local_alloc_bh->b_data;
+ alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data;
if (le32_to_cpu(alloc->id1.bitmap1.i_used) !=
ocfs2_local_alloc_count_bits(alloc)) {
@@ -528,9 +528,9 @@
return status;
}
-int ocfs2_claim_local_alloc_bits(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- ocfs2_alloc_context *ac,
+int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_alloc_context *ac,
u32 min_bits,
u32 *bit_off,
u32 *num_bits)
@@ -539,15 +539,15 @@
struct inode *local_alloc_inode;
u32 bits_wanted;
void *bitmap;
- ocfs2_dinode *alloc;
- ocfs2_local_alloc *la;
+ struct ocfs2_dinode *alloc;
+ struct ocfs2_local_alloc *la;
mlog_entry_void();
BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL);
bits_wanted = ac->ac_bits_wanted - ac->ac_bits_given;
local_alloc_inode = ac->ac_inode;
- alloc = (ocfs2_dinode *) osb->local_alloc_bh->b_data;
+ alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data;
la = OCFS2_LOCAL_ALLOC(alloc);
start = ocfs2_local_alloc_find_clear_bits(osb, alloc, bits_wanted);
@@ -590,12 +590,12 @@
return status;
}
-static u32 ocfs2_local_alloc_count_bits(ocfs2_dinode *alloc)
+static u32 ocfs2_local_alloc_count_bits(struct ocfs2_dinode *alloc)
{
int i;
u8 *buffer;
u32 count = 0;
- ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc);
+ struct ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc);
mlog_entry_void();
@@ -607,8 +607,8 @@
return count;
}
-static int ocfs2_local_alloc_find_clear_bits(ocfs2_super *osb,
- ocfs2_dinode *alloc,
+static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb,
+ struct ocfs2_dinode *alloc,
u32 numbits)
{
int numfound, bitoff, left, startoff, lastzero;
@@ -666,9 +666,9 @@
return bitoff;
}
-static void ocfs2_clear_local_alloc(ocfs2_dinode *alloc)
+static void ocfs2_clear_local_alloc(struct ocfs2_dinode *alloc)
{
- ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc);
+ struct ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc);
int i;
mlog_entry_void();
@@ -706,9 +706,9 @@
* assumes you've already locked the main bitmap -- the bitmap inode
* passed is used for caching.
*/
-static int ocfs2_sync_local_to_main(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- ocfs2_dinode *alloc,
+static int ocfs2_sync_local_to_main(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_dinode *alloc,
struct inode *main_bm_inode,
struct buffer_head *main_bm_bh)
{
@@ -717,7 +717,7 @@
u64 la_start_blk;
u64 blkno;
void *bitmap;
- ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc);
+ struct ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc);
mlog_entry("total = %u, COUNT = %u, used = %u\n",
le32_to_cpu(alloc->id1.bitmap1.i_total),
@@ -776,15 +776,15 @@
return status;
}
-static int ocfs2_local_alloc_reserve_for_window(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- ocfs2_alloc_context **ac,
+static int ocfs2_local_alloc_reserve_for_window(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_alloc_context **ac,
struct inode **bitmap_inode,
struct buffer_head **bitmap_bh)
{
int status;
- *ac = kcalloc(1, sizeof(ocfs2_alloc_context), GFP_KERNEL);
+ *ac = kcalloc(1, sizeof(struct ocfs2_alloc_context), GFP_KERNEL);
if (!(*ac)) {
status = -ENOMEM;
mlog_errno(status);
@@ -819,18 +819,18 @@
/*
* pass it the bitmap lock in lock_bh if you have it.
*/
-static int ocfs2_local_alloc_new_window(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- ocfs2_alloc_context *ac)
+static int ocfs2_local_alloc_new_window(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_alloc_context *ac)
{
int status = 0;
u32 cluster_off, cluster_count;
- ocfs2_dinode *alloc = NULL;
- ocfs2_local_alloc *la;
+ struct ocfs2_dinode *alloc = NULL;
+ struct ocfs2_local_alloc *la;
mlog_entry_void();
- alloc = (ocfs2_dinode *) osb->local_alloc_bh->b_data;
+ alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data;
la = OCFS2_LOCAL_ALLOC(alloc);
if (alloc->id1.bitmap1.i_total)
@@ -873,16 +873,16 @@
/* Note that we do *NOT* lock the local alloc inode here as
* it's been locked already for us. */
-static int ocfs2_local_alloc_slide_window(ocfs2_super *osb,
- struct inode *local_alloc_inode)
+static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,
+ struct inode *local_alloc_inode)
{
int status = 0;
struct buffer_head *main_bm_bh = NULL;
struct inode *main_bm_inode = NULL;
- ocfs2_journal_handle *handle = NULL;
- ocfs2_dinode *alloc;
- ocfs2_dinode *alloc_copy = NULL;
- ocfs2_alloc_context *ac = NULL;
+ struct ocfs2_journal_handle *handle = NULL;
+ struct ocfs2_dinode *alloc;
+ struct ocfs2_dinode *alloc_copy = NULL;
+ struct ocfs2_alloc_context *ac = NULL;
mlog_entry_void();
@@ -913,7 +913,7 @@
goto bail;
}
- alloc = (ocfs2_dinode *) osb->local_alloc_bh->b_data;
+ alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data;
/* We want to clear the local alloc before doing anything
* else, so that if we error later during this operation,
Modified: branches/ocfs2-1.2/fs/ocfs2/localalloc.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/localalloc.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/localalloc.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -26,29 +26,29 @@
#ifndef OCFS2_LOCALALLOC_H
#define OCFS2_LOCALALLOC_H
-int ocfs2_load_local_alloc(ocfs2_super *osb);
+int ocfs2_load_local_alloc(struct ocfs2_super *osb);
-void ocfs2_shutdown_local_alloc(ocfs2_super *osb);
+void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb);
-int ocfs2_begin_local_alloc_recovery(ocfs2_super *osb,
+int ocfs2_begin_local_alloc_recovery(struct ocfs2_super *osb,
int node_num,
- ocfs2_dinode **alloc_copy);
+ struct ocfs2_dinode **alloc_copy);
-int ocfs2_complete_local_alloc_recovery(ocfs2_super *osb,
- ocfs2_dinode *alloc);
+int ocfs2_complete_local_alloc_recovery(struct ocfs2_super *osb,
+ struct ocfs2_dinode *alloc);
-int ocfs2_alloc_should_use_local(ocfs2_super *osb,
+int ocfs2_alloc_should_use_local(struct ocfs2_super *osb,
u64 bits);
-struct _ocfs2_alloc_context;
-int ocfs2_reserve_local_alloc_bits(ocfs2_super *osb,
- ocfs2_journal_handle *passed_handle,
+struct ocfs2_alloc_context;
+int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *passed_handle,
u32 bits_wanted,
- struct _ocfs2_alloc_context *ac);
+ struct ocfs2_alloc_context *ac);
-int ocfs2_claim_local_alloc_bits(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- struct _ocfs2_alloc_context *ac,
+int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_alloc_context *ac,
u32 min_bits,
u32 *bit_off,
u32 *num_bits);
Modified: branches/ocfs2-1.2/fs/ocfs2/mmap.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/mmap.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/mmap.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -444,9 +444,9 @@
int ret;
struct buffer_head *bh = NULL;
struct ocfs2_inode_info *oi = OCFS2_I(inode);
- ocfs2_journal_handle *handle;
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
- ocfs2_dinode *di;
+ struct ocfs2_journal_handle *handle;
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_dinode *di;
mlog_entry("(Inode %"MLFu64", mode 0%o)\n", oi->ip_blkno,
inode->i_mode);
@@ -477,7 +477,7 @@
if ((inode->i_mode & S_ISGID) && (inode->i_mode & S_IXGRP))
inode->i_mode &= ~S_ISGID;
- di = (ocfs2_dinode *) bh->b_data;
+ di = (struct ocfs2_dinode *) bh->b_data;
di->i_mode = cpu_to_le16(inode->i_mode);
ret = ocfs2_journal_dirty(handle, bh);
@@ -525,7 +525,7 @@
struct ocfs2_buffer_lock_ctxt *ctxt)
{
int ret = 0;
- ocfs2_super *osb = NULL;
+ struct ocfs2_super *osb = NULL;
struct dentry *dentry = filp->f_dentry;
struct inode *inode = dentry->d_inode;
int status;
Modified: branches/ocfs2-1.2/fs/ocfs2/namei.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/namei.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/namei.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -74,59 +74,61 @@
unsigned long offset,
struct ocfs2_dir_entry **res_dir);
-static int ocfs2_delete_entry(ocfs2_journal_handle *handle,
+static int ocfs2_delete_entry(struct ocfs2_journal_handle *handle,
struct inode *dir,
struct ocfs2_dir_entry *de_del,
struct buffer_head *bh);
-static int __ocfs2_add_entry(ocfs2_journal_handle *handle, struct inode *dir,
+static int __ocfs2_add_entry(struct ocfs2_journal_handle *handle,
+ struct inode *dir,
const char *name, int namelen,
struct inode *inode, u64 blkno,
struct buffer_head *parent_fe_bh,
struct buffer_head *insert_bh);
-static int ocfs2_mknod_locked(ocfs2_super *osb, struct inode *dir,
+static int ocfs2_mknod_locked(struct ocfs2_super *osb,
+ struct inode *dir,
struct dentry *dentry, int mode,
dev_t dev,
struct buffer_head **new_fe_bh,
struct buffer_head *parent_fe_bh,
- ocfs2_journal_handle *handle,
+ struct ocfs2_journal_handle *handle,
struct inode **ret_inode,
- ocfs2_alloc_context *inode_ac);
+ struct ocfs2_alloc_context *inode_ac);
-static int ocfs2_fill_new_dir(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_fill_new_dir(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *parent,
struct inode *inode,
struct buffer_head *fe_bh,
- ocfs2_alloc_context *data_ac);
+ struct ocfs2_alloc_context *data_ac);
-static int ocfs2_double_lock(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_double_lock(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct buffer_head **bh1,
struct inode *inode1,
struct buffer_head **bh2,
struct inode *inode2);
-static int ocfs2_prepare_orphan_dir(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_prepare_orphan_dir(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *inode,
char *name,
struct buffer_head **de_bh);
-static int ocfs2_orphan_add(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_orphan_add(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *inode,
- ocfs2_dinode *fe,
+ struct ocfs2_dinode *fe,
char *name,
struct buffer_head *de_bh);
-static int ocfs2_create_symlink_data(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_create_symlink_data(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *inode,
const char *symname);
-static inline int ocfs2_add_entry(ocfs2_journal_handle *handle,
+static inline int ocfs2_add_entry(struct ocfs2_journal_handle *handle,
struct dentry *dentry,
struct inode *inode, u64 blkno,
struct buffer_head *parent_fe_bh,
@@ -215,12 +217,12 @@
return ret;
}
-static int ocfs2_fill_new_dir(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_fill_new_dir(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *parent,
struct inode *inode,
struct buffer_head *fe_bh,
- ocfs2_alloc_context *data_ac)
+ struct ocfs2_alloc_context *data_ac)
{
int status;
struct buffer_head *new_bh = NULL;
@@ -291,14 +293,14 @@
{
int status = 0;
struct buffer_head *parent_fe_bh = NULL;
- ocfs2_journal_handle *handle = NULL;
- ocfs2_super *osb;
- ocfs2_dinode *dirfe;
+ struct ocfs2_journal_handle *handle = NULL;
+ struct ocfs2_super *osb;
+ struct ocfs2_dinode *dirfe;
struct buffer_head *new_fe_bh = NULL;
struct buffer_head *de_bh = NULL;
struct inode *inode = NULL;
- ocfs2_alloc_context *inode_ac = NULL;
- ocfs2_alloc_context *data_ac = NULL;
+ struct ocfs2_alloc_context *inode_ac = NULL;
+ struct ocfs2_alloc_context *data_ac = NULL;
mlog_entry("(0x%p, 0x%p, %d, %lu, '%.*s')\n", dir, dentry, mode,
(unsigned long)dev, dentry->d_name.len,
@@ -328,7 +330,7 @@
goto leave;
}
- dirfe = (ocfs2_dinode *) parent_fe_bh->b_data;
+ dirfe = (struct ocfs2_dinode *) parent_fe_bh->b_data;
if (!dirfe->i_links_count) {
/* can't make a file in a deleted directory. */
status = -ENOENT;
@@ -450,18 +452,19 @@
return status;
}
-static int ocfs2_mknod_locked(ocfs2_super *osb, struct inode *dir,
+static int ocfs2_mknod_locked(struct ocfs2_super *osb,
+ struct inode *dir,
struct dentry *dentry, int mode,
dev_t dev,
struct buffer_head **new_fe_bh,
struct buffer_head *parent_fe_bh,
- ocfs2_journal_handle *handle,
+ struct ocfs2_journal_handle *handle,
struct inode **ret_inode,
- ocfs2_alloc_context *inode_ac)
+ struct ocfs2_alloc_context *inode_ac)
{
int status = 0;
- ocfs2_dinode *fe = NULL;
- ocfs2_extent_list *fel;
+ struct ocfs2_dinode *fe = NULL;
+ struct ocfs2_extent_list *fel;
u64 fe_blkno = 0;
u16 suballoc_bit;
struct inode *inode = NULL;
@@ -516,7 +519,7 @@
goto leave;
}
- fe = (ocfs2_dinode *) (*new_fe_bh)->b_data;
+ fe = (struct ocfs2_dinode *) (*new_fe_bh)->b_data;
memset(fe, 0, osb->sb->s_blocksize);
fe->i_generation = cpu_to_le32(inode->i_generation);
@@ -621,14 +624,14 @@
struct inode *dir,
struct dentry *dentry)
{
- ocfs2_journal_handle *handle = NULL;
+ struct ocfs2_journal_handle *handle = NULL;
struct inode *inode = old_dentry->d_inode;
int err;
struct buffer_head *fe_bh = NULL;
struct buffer_head *parent_fe_bh = NULL;
struct buffer_head *de_bh = NULL;
- ocfs2_dinode *fe = NULL;
- ocfs2_super *osb = OCFS2_SB(dir->i_sb);
+ struct ocfs2_dinode *fe = NULL;
+ struct ocfs2_super *osb = OCFS2_SB(dir->i_sb);
mlog_entry("(inode=%lu, old='%.*s' new='%.*s')\n", inode->i_ino,
old_dentry->d_name.len, old_dentry->d_name.name,
@@ -677,7 +680,7 @@
goto bail;
}
- fe = (ocfs2_dinode *) fe_bh->b_data;
+ fe = (struct ocfs2_dinode *) fe_bh->b_data;
if (le16_to_cpu(fe->i_links_count) >= OCFS2_LINK_MAX) {
err = -EMLINK;
goto bail;
@@ -746,12 +749,12 @@
int status;
unsigned int saved_nlink = 0;
struct inode *inode = dentry->d_inode;
- ocfs2_super *osb = OCFS2_SB(dir->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(dir->i_sb);
u64 blkno;
- ocfs2_dinode *fe = NULL;
+ struct ocfs2_dinode *fe = NULL;
struct buffer_head *fe_bh = NULL;
struct buffer_head *parent_node_bh = NULL;
- ocfs2_journal_handle *handle = NULL;
+ struct ocfs2_journal_handle *handle = NULL;
struct ocfs2_dir_entry *dirent = NULL;
struct buffer_head *dirent_bh = NULL;
char orphan_name[OCFS2_ORPHAN_NAMELEN + 1];
@@ -863,7 +866,7 @@
goto leave;
}
- fe = (ocfs2_dinode *) fe_bh->b_data;
+ fe = (struct ocfs2_dinode *) fe_bh->b_data;
if (!inode->i_nlink) {
status = ocfs2_orphan_add(osb, handle, inode, fe, orphan_name,
@@ -930,8 +933,8 @@
* The only place this should be used is rename!
* if they have the same id, then the 1st one is the only one locked.
*/
-static int ocfs2_double_lock(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_double_lock(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct buffer_head **bh1,
struct inode *inode1,
struct buffer_head **bh2,
@@ -999,14 +1002,14 @@
int status = 0, rename_lock = 0;
struct inode *old_inode = old_dentry->d_inode;
struct inode *new_inode = new_dentry->d_inode;
- ocfs2_dinode *newfe = NULL;
+ struct ocfs2_dinode *newfe = NULL;
char orphan_name[OCFS2_ORPHAN_NAMELEN + 1];
struct buffer_head *orphan_entry_bh = NULL;
struct buffer_head *newfe_bh = NULL;
struct buffer_head *insert_entry_bh = NULL;
- ocfs2_super *osb = NULL;
+ struct ocfs2_super *osb = NULL;
u64 newfe_blkno;
- ocfs2_journal_handle *handle = NULL;
+ struct ocfs2_journal_handle *handle = NULL;
struct buffer_head *old_dir_bh = NULL;
struct buffer_head *new_dir_bh = NULL;
struct ocfs2_dir_entry *old_de = NULL, *new_de = NULL; // dirent for old_dentry
@@ -1210,7 +1213,7 @@
goto bail;
}
- newfe = (ocfs2_dinode *) newfe_bh->b_data;
+ newfe = (struct ocfs2_dinode *) newfe_bh->b_data;
mlog(0, "aha rename over existing... new_de=%p "
"new_blkno=%"MLFu64" newfebh=%p bhblocknr=%llu\n",
@@ -1355,12 +1358,12 @@
"NULL\n", OCFS2_I(new_dir)->ip_blkno,
(int)new_dir_nlink, new_dir->i_nlink);
} else {
- ocfs2_dinode *fe;
+ struct ocfs2_dinode *fe;
status = ocfs2_journal_access(handle,
new_dir,
new_dir_bh,
OCFS2_JOURNAL_ACCESS_WRITE);
- fe = (ocfs2_dinode *) new_dir_bh->b_data;
+ fe = (struct ocfs2_dinode *) new_dir_bh->b_data;
fe->i_links_count = cpu_to_le16(new_dir->i_nlink);
status = ocfs2_journal_dirty(handle, new_dir_bh);
}
@@ -1374,11 +1377,11 @@
(int)old_dir_nlink,
old_dir->i_nlink);
} else {
- ocfs2_dinode *fe;
+ struct ocfs2_dinode *fe;
status = ocfs2_journal_access(handle, old_dir,
old_dir_bh,
OCFS2_JOURNAL_ACCESS_WRITE);
- fe = (ocfs2_dinode *) old_dir_bh->b_data;
+ fe = (struct ocfs2_dinode *) old_dir_bh->b_data;
fe->i_links_count = cpu_to_le16(old_dir->i_nlink);
status = ocfs2_journal_dirty(handle, old_dir_bh);
}
@@ -1423,8 +1426,8 @@
* we expect i_size = strlen(symname). Copy symname into the file
* data, including the null terminator.
*/
-static int ocfs2_create_symlink_data(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_create_symlink_data(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *inode,
const char *symname)
{
@@ -1530,17 +1533,17 @@
{
int status, l, credits;
u64 newsize;
- ocfs2_super *osb = NULL;
+ struct ocfs2_super *osb = NULL;
struct inode *inode = NULL;
struct super_block *sb;
struct buffer_head *new_fe_bh = NULL;
struct buffer_head *de_bh = NULL;
struct buffer_head *parent_fe_bh = NULL;
- ocfs2_dinode *fe = NULL;
- ocfs2_dinode *dirfe;
- ocfs2_journal_handle *handle = NULL;
- ocfs2_alloc_context *inode_ac = NULL;
- ocfs2_alloc_context *data_ac = NULL;
+ struct ocfs2_dinode *fe = NULL;
+ struct ocfs2_dinode *dirfe;
+ struct ocfs2_journal_handle *handle = NULL;
+ struct ocfs2_alloc_context *inode_ac = NULL;
+ struct ocfs2_alloc_context *data_ac = NULL;
mlog_entry("(0x%p, 0x%p, symname='%s' actual='%.*s')\n", dir,
dentry, symname, dentry->d_name.len, dentry->d_name.name);
@@ -1567,7 +1570,7 @@
goto bail;
}
- dirfe = (ocfs2_dinode *) parent_fe_bh->b_data;
+ dirfe = (struct ocfs2_dinode *) parent_fe_bh->b_data;
if (!dirfe->i_links_count) {
/* can't make a file in a deleted directory. */
status = -ENOENT;
@@ -1621,7 +1624,7 @@
goto bail;
}
- fe = (ocfs2_dinode *) new_fe_bh->b_data;
+ fe = (struct ocfs2_dinode *) new_fe_bh->b_data;
inode->i_rdev = 0;
newsize = l - 1;
if (l > ocfs2_fast_symlink_chars(sb)) {
@@ -1725,7 +1728,8 @@
* If you pass me insert_bh, I'll skip the search of the other dir
* blocks and put the record in there.
*/
-static int __ocfs2_add_entry(ocfs2_journal_handle *handle, struct inode *dir,
+static int __ocfs2_add_entry(struct ocfs2_journal_handle *handle,
+ struct inode *dir,
const char *name, int namelen,
struct inode *inode, u64 blkno,
struct buffer_head *parent_fe_bh,
@@ -1810,7 +1814,7 @@
* ocfs2_delete_entry deletes a directory entry by merging it with the
* previous entry
*/
-static int ocfs2_delete_entry(ocfs2_journal_handle *handle,
+static int ocfs2_delete_entry(struct ocfs2_journal_handle *handle,
struct inode *dir,
struct ocfs2_dir_entry *de_del,
struct buffer_head *bh)
@@ -2041,8 +2045,8 @@
return status;
}
-static int ocfs2_prepare_orphan_dir(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_prepare_orphan_dir(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *inode,
char *name,
struct buffer_head **de_bh)
@@ -2092,17 +2096,17 @@
return status;
}
-static int ocfs2_orphan_add(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+static int ocfs2_orphan_add(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *inode,
- ocfs2_dinode *fe,
+ struct ocfs2_dinode *fe,
char *name,
struct buffer_head *de_bh)
{
struct inode *orphan_dir_inode = NULL;
struct buffer_head *orphan_dir_bh = NULL;
int status = 0;
- ocfs2_dinode *orphan_fe;
+ struct ocfs2_dinode *orphan_fe;
mlog_entry("(inode->i_ino = %lu)\n", inode->i_ino);
@@ -2133,7 +2137,7 @@
/* we're a cluster, and nlink can change on disk from
* underneath us... */
- orphan_fe = (ocfs2_dinode *) orphan_dir_bh->b_data;
+ orphan_fe = (struct ocfs2_dinode *) orphan_dir_bh->b_data;
if (S_ISDIR(inode->i_mode))
le16_add_cpu(&orphan_fe->i_links_count, 1);
orphan_dir_inode->i_nlink = le16_to_cpu(orphan_fe->i_links_count);
@@ -2177,14 +2181,14 @@
}
/* unlike orphan_add, we expect the orphan dir to already be locked here. */
-int ocfs2_orphan_del(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+int ocfs2_orphan_del(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *orphan_dir_inode,
struct inode *inode,
struct buffer_head *orphan_dir_bh)
{
char name[OCFS2_ORPHAN_NAMELEN + 1];
- ocfs2_dinode *orphan_fe;
+ struct ocfs2_dinode *orphan_fe;
int status = 0;
struct buffer_head *target_de_bh = NULL;
struct ocfs2_dir_entry *target_de = NULL;
@@ -2225,7 +2229,7 @@
}
/* do the i_nlink dance! :) */
- orphan_fe = (ocfs2_dinode *) orphan_dir_bh->b_data;
+ orphan_fe = (struct ocfs2_dinode *) orphan_dir_bh->b_data;
if (S_ISDIR(inode->i_mode))
le16_add_cpu(&orphan_fe->i_links_count, -1);
orphan_dir_inode->i_nlink = le16_to_cpu(orphan_fe->i_links_count);
Modified: branches/ocfs2-1.2/fs/ocfs2/namei.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/namei.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/namei.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -38,8 +38,8 @@
int namelen,
struct inode *dir,
struct ocfs2_dir_entry **res_dir);
-int ocfs2_orphan_del(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+int ocfs2_orphan_del(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
struct inode *orphan_dir_inode,
struct inode *inode,
struct buffer_head *orphan_dir_bh);
Modified: branches/ocfs2-1.2/fs/ocfs2/ocfs1_fs_compat.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/ocfs1_fs_compat.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/ocfs1_fs_compat.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -41,7 +41,7 @@
/*
* OCFS1 superblock. Lives at sector 0.
*/
-typedef struct _ocfs1_vol_disk_hdr
+struct ocfs1_vol_disk_hdr
{
/*00*/ __u32 minor_version;
__u32 major_version;
@@ -70,10 +70,10 @@
__u32 prot_bits;
__s32 excl_mount;
/*1B0*/
-} ocfs1_vol_disk_hdr;
+};
-typedef struct _ocfs1_disk_lock
+struct ocfs1_disk_lock
{
/*00*/ __u32 curr_master;
__u8 file_lock;
@@ -87,14 +87,14 @@
/*20*/ __u64 oin_node_map;
__u64 dlock_seq_num;
/*30*/
-} ocfs1_disk_lock;
+};
/*
* OCFS1 volume label. Lives at sector 1.
*/
-typedef struct _ocfs1_vol_label
+struct ocfs1_vol_label
{
-/*00*/ ocfs1_disk_lock disk_lock;
+/*00*/ struct ocfs1_disk_lock disk_lock;
/*30*/ __u8 label[OCFS1_MAX_VOL_LABEL_LEN];
/*70*/ __u16 label_len;
/*72*/ __u8 vol_id[OCFS1_MAX_VOL_ID_LENGTH];
@@ -102,7 +102,7 @@
/*84*/ __u8 cluster_name[OCFS1_MAX_CLUSTER_NAME_LEN];
/*A4*/ __u16 cluster_name_len;
/*A6*/
-} ocfs1_vol_label;
+};
#endif /* _OCFS1_FS_COMPAT_H */
Modified: branches/ocfs2-1.2/fs/ocfs2/ocfs2.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/ocfs2.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/ocfs2.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -192,10 +192,9 @@
#define OCFS2_OSB_HARD_RO 0x0002
#define OCFS2_OSB_ERROR_FS 0x0004
-struct _ocfs2_journal;
-typedef struct _ocfs2_journal_handle ocfs2_journal_handle;
-
-typedef struct _ocfs2_super
+struct ocfs2_journal;
+struct ocfs2_journal_handle;
+struct ocfs2_super
{
u32 osb_id; /* id used by the proc interface */
struct task_struct *commit_task;
@@ -249,7 +248,7 @@
int disable_recovery;
wait_queue_head_t checkpoint_event;
atomic_t needs_checkpoint;
- struct _ocfs2_journal *journal;
+ struct ocfs2_journal *journal;
enum ocfs2_local_alloc_state local_alloc_state;
struct buffer_head *local_alloc_bh;
@@ -257,7 +256,7 @@
/* Next two fields are for local node slot recovery during
* mount. */
int dirty;
- ocfs2_dinode *local_alloc_copy;
+ struct ocfs2_dinode *local_alloc_copy;
struct ocfs2_alloc_stats alloc_stats;
char dev_str[20]; /* "major,minor" of the device */
@@ -306,16 +305,16 @@
struct inode *osb_tl_inode;
struct buffer_head *osb_tl_bh;
struct work_struct osb_truncate_log_wq;
-} ocfs2_super;
+};
-#define OCFS2_SB(sb) ((ocfs2_super *)(sb)->s_fs_info)
+#define OCFS2_SB(sb) ((struct ocfs2_super *)(sb)->s_fs_info)
#define OCFS2_MAX_OSB_ID 65536
/* set / clear functions because cluster events can make these happen
* in parallel so we want the transitions to be atomic. this also
* means that any future flags osb_flags must be protected by spinlock
* too! */
-static inline void ocfs2_set_osb_flag(ocfs2_super *osb,
+static inline void ocfs2_set_osb_flag(struct ocfs2_super *osb,
unsigned long flag)
{
spin_lock(&osb->osb_lock);
@@ -323,7 +322,7 @@
spin_unlock(&osb->osb_lock);
}
-static inline void ocfs2_set_ro_flag(ocfs2_super *osb,
+static inline void ocfs2_set_ro_flag(struct ocfs2_super *osb,
int hard)
{
spin_lock(&osb->osb_lock);
@@ -335,7 +334,7 @@
spin_unlock(&osb->osb_lock);
}
-static inline int ocfs2_is_hard_readonly(ocfs2_super *osb)
+static inline int ocfs2_is_hard_readonly(struct ocfs2_super *osb)
{
int ret;
@@ -346,7 +345,7 @@
return ret;
}
-static inline int ocfs2_is_soft_readonly(ocfs2_super *osb)
+static inline int ocfs2_is_soft_readonly(struct ocfs2_super *osb)
{
int ret;
Modified: branches/ocfs2-1.2/fs/ocfs2/ocfs2_fs.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/ocfs2_fs.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/ocfs2_fs.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -238,23 +238,23 @@
* On disk extent record for OCFS2
* It describes a range of clusters on disk.
*/
-typedef struct _ocfs2_extent_rec {
+struct ocfs2_extent_rec {
/*00*/ __le32 e_cpos; /* Offset into the file, in clusters */
__le32 e_clusters; /* Clusters covered by this extent */
__le64 e_blkno; /* Physical disk offset, in blocks */
/*10*/
-} ocfs2_extent_rec;
+};
-typedef struct _ocfs2_chain_rec {
+struct ocfs2_chain_rec {
__le32 c_free; /* Number of free bits in this chain. */
__le32 c_total; /* Number of total bits in this chain */
__le64 c_blkno; /* Physical disk offset (blocks) of 1st group */
-} ocfs2_chain_rec;
+};
-typedef struct _ocfs2_truncate_rec {
+struct ocfs2_truncate_rec {
__le32 t_start; /* 1st cluster in this log */
__le32 t_clusters; /* Number of total clusters covered */
-} ocfs2_truncate_rec;
+};
/*
* On disk extent list for OCFS2 (node in the tree). Note that this
@@ -262,7 +262,7 @@
* offsets are relative to ocfs2_dinode.id2.i_list or
* ocfs2_extent_block.h_list, respectively.
*/
-typedef struct _ocfs2_extent_list {
+struct ocfs2_extent_list {
/*00*/ __le16 l_tree_depth; /* Extent tree depth from this
point. 0 means data extents
hang directly off this
@@ -272,39 +272,39 @@
__le16 l_reserved1;
__le64 l_reserved2; /* Pad to
sizeof(ocfs2_extent_rec) */
-/*10*/ ocfs2_extent_rec l_recs[0]; /* Extent records */
-} ocfs2_extent_list;
+/*10*/ struct ocfs2_extent_rec l_recs[0]; /* Extent records */
+};
/*
* On disk allocation chain list for OCFS2. Note that this is
* contained inside ocfs2_dinode, so the offsets are relative to
* ocfs2_dinode.id2.i_chain.
*/
-typedef struct _ocfs2_chain_list {
+struct ocfs2_chain_list {
/*00*/ __le16 cl_cpg; /* Clusters per Block Group */
__le16 cl_bpc; /* Bits per cluster */
- __le16 cl_count; /* Total chains in this list */
- __le16 cl_next_free_rec; /* Next unused chain slot */
+ __le16 cl_count; /* Total chains in this list */
+ __le16 cl_next_free_rec; /* Next unused chain slot */
__le64 cl_reserved1;
-/*10*/ ocfs2_chain_rec cl_recs[0]; /* Chain records */
-} ocfs2_chain_list;
+/*10*/ struct ocfs2_chain_rec cl_recs[0]; /* Chain records */
+};
/*
* On disk deallocation log for OCFS2. Note that this is
* contained inside ocfs2_dinode, so the offsets are relative to
* ocfs2_dinode.id2.i_dealloc.
*/
-typedef struct _ocfs2_truncate_log {
-/*00*/ __le16 tl_count; /* Total records in this log */
+struct ocfs2_truncate_log {
+/*00*/ __le16 tl_count; /* Total records in this log */
__le16 tl_used; /* Number of records in use */
__le32 tl_reserved1;
-/*08*/ ocfs2_truncate_rec tl_recs[0]; /* Truncate records */
-} ocfs2_truncate_log;
+/*08*/ struct ocfs2_truncate_rec tl_recs[0]; /* Truncate records */
+};
/*
* On disk extent block (indirect block) for OCFS2
*/
-typedef struct _ocfs2_extent_block
+struct ocfs2_extent_block
{
/*00*/ __u8 h_signature[8]; /* Signature for verification */
__le64 h_reserved1;
@@ -318,16 +318,16 @@
__le64 h_next_leaf_blk; /* Offset on disk, in blocks,
of next leaf header pointing
to data */
-/*30*/ ocfs2_extent_list h_list; /* Extent record list */
+/*30*/ struct ocfs2_extent_list h_list; /* Extent record list */
/* Actual on-disk size is one block */
-} ocfs2_extent_block;
+};
/*
* On disk superblock for OCFS2
* Note that it is contained inside an ocfs2_dinode, so all offsets
* are relative to the start of ocfs2_dinode.id2.
*/
-typedef struct _ocfs2_super_block {
+struct ocfs2_super_block {
/*00*/ __le16 s_major_rev_level;
__le16 s_minor_rev_level;
__le16 s_mnt_count;
@@ -355,26 +355,26 @@
/*50*/ __u8 s_label[OCFS2_MAX_VOL_LABEL_LEN]; /* Label for mounting, etc. */
/*90*/ __u8 s_uuid[OCFS2_VOL_UUID_LEN]; /* 128-bit uuid */
/*A0*/
-} ocfs2_super_block;
+};
/*
* Local allocation bitmap for OCFS2 slots
* Note that it exists inside an ocfs2_dinode, so all offsets are
* relative to the start of ocfs2_dinode.id2.
*/
-typedef struct _ocfs2_local_alloc
+struct ocfs2_local_alloc
{
/*00*/ __le32 la_bm_off; /* Starting bit offset in main bitmap */
__le16 la_size; /* Size of included bitmap, in bytes */
__le16 la_reserved1;
__le64 la_reserved2;
/*10*/ __u8 la_bitmap[0];
-} ocfs2_local_alloc;
+};
/*
* On disk inode for OCFS2
*/
-typedef struct _ocfs2_dinode {
+struct ocfs2_dinode {
/*00*/ __u8 i_signature[8]; /* Signature for validation */
__le32 i_generation; /* Generation number */
__le16 i_suballoc_slot; /* Slot suballocator this inode
@@ -420,15 +420,15 @@
} journal1;
} id1; /* Inode type dependant 1 */
/*C0*/ union {
- ocfs2_super_block i_super;
- ocfs2_local_alloc i_lab;
- ocfs2_chain_list i_chain;
- ocfs2_extent_list i_list;
- ocfs2_truncate_log i_dealloc;
- __u8 i_symlink[0];
+ struct ocfs2_super_block i_super;
+ struct ocfs2_local_alloc i_lab;
+ struct ocfs2_chain_list i_chain;
+ struct ocfs2_extent_list i_list;
+ struct ocfs2_truncate_log i_dealloc;
+ __u8 i_symlink[0];
} id2;
/* Actual on-disk size is one block */
-} ocfs2_dinode;
+};
/*
* On-disk directory entry structure for OCFS2
@@ -447,7 +447,7 @@
/*
* On disk allocator group structure for OCFS2
*/
-typedef struct _ocfs2_group_desc
+struct ocfs2_group_desc
{
/*00*/ __u8 bg_signature[8]; /* Signature for validation */
__le16 bg_size; /* Size of included bitmap in
@@ -465,13 +465,13 @@
__le64 bg_blkno; /* Offset on disk, in blocks */
/*30*/ __le64 bg_reserved2[2];
/*40*/ __u8 bg_bitmap[0];
-} ocfs2_group_desc;
+};
#ifdef __KERNEL__
static inline int ocfs2_fast_symlink_chars(struct super_block *sb)
{
return sb->s_blocksize -
- offsetof(struct _ocfs2_dinode, id2.i_symlink);
+ offsetof(struct ocfs2_dinode, id2.i_symlink);
}
static inline int ocfs2_extent_recs_per_inode(struct super_block *sb)
@@ -479,9 +479,9 @@
int size;
size = sb->s_blocksize -
- offsetof(struct _ocfs2_dinode, id2.i_list.l_recs);
+ offsetof(struct ocfs2_dinode, id2.i_list.l_recs);
- return size / sizeof(struct _ocfs2_extent_rec);
+ return size / sizeof(struct ocfs2_extent_rec);
}
static inline int ocfs2_chain_recs_per_inode(struct super_block *sb)
@@ -489,9 +489,9 @@
int size;
size = sb->s_blocksize -
- offsetof(struct _ocfs2_dinode, id2.i_chain.cl_recs);
+ offsetof(struct ocfs2_dinode, id2.i_chain.cl_recs);
- return size / sizeof(struct _ocfs2_chain_rec);
+ return size / sizeof(struct ocfs2_chain_rec);
}
static inline u16 ocfs2_extent_recs_per_eb(struct super_block *sb)
@@ -499,9 +499,9 @@
int size;
size = sb->s_blocksize -
- offsetof(struct _ocfs2_extent_block, h_list.l_recs);
+ offsetof(struct ocfs2_extent_block, h_list.l_recs);
- return size / sizeof(struct _ocfs2_extent_rec);
+ return size / sizeof(struct ocfs2_extent_rec);
}
static inline u16 ocfs2_local_alloc_size(struct super_block *sb)
@@ -509,7 +509,7 @@
u16 size;
size = sb->s_blocksize -
- offsetof(struct _ocfs2_dinode, id2.i_lab.la_bitmap);
+ offsetof(struct ocfs2_dinode, id2.i_lab.la_bitmap);
return size;
}
@@ -519,7 +519,7 @@
int size;
size = sb->s_blocksize -
- offsetof(struct _ocfs2_group_desc, bg_bitmap);
+ offsetof(struct ocfs2_group_desc, bg_bitmap);
return size;
}
@@ -529,14 +529,14 @@
int size;
size = sb->s_blocksize -
- offsetof(struct _ocfs2_dinode, id2.i_dealloc.tl_recs);
+ offsetof(struct ocfs2_dinode, id2.i_dealloc.tl_recs);
- return size / sizeof(struct _ocfs2_truncate_rec);
+ return size / sizeof(struct ocfs2_truncate_rec);
}
#else
static inline int ocfs2_fast_symlink_chars(int blocksize)
{
- return blocksize - offsetof(struct _ocfs2_dinode, id2.i_symlink);
+ return blocksize - offsetof(struct ocfs2_dinode, id2.i_symlink);
}
static inline int ocfs2_extent_recs_per_inode(int blocksize)
@@ -544,9 +544,9 @@
int size;
size = blocksize -
- offsetof(struct _ocfs2_dinode, id2.i_list.l_recs);
+ offsetof(struct ocfs2_dinode, id2.i_list.l_recs);
- return size / sizeof(struct _ocfs2_extent_rec);
+ return size / sizeof(struct ocfs2_extent_rec);
}
static inline int ocfs2_chain_recs_per_inode(int blocksize)
@@ -554,9 +554,9 @@
int size;
size = blocksize -
- offsetof(struct _ocfs2_dinode, id2.i_chain.cl_recs);
+ offsetof(struct ocfs2_dinode, id2.i_chain.cl_recs);
- return size / sizeof(struct _ocfs2_chain_rec);
+ return size / sizeof(struct ocfs2_chain_rec);
}
static inline int ocfs2_extent_recs_per_eb(int blocksize)
@@ -564,9 +564,9 @@
int size;
size = blocksize -
- offsetof(struct _ocfs2_extent_block, h_list.l_recs);
+ offsetof(struct ocfs2_extent_block, h_list.l_recs);
- return size / sizeof(struct _ocfs2_extent_rec);
+ return size / sizeof(struct ocfs2_extent_rec);
}
static inline int ocfs2_local_alloc_size(int blocksize)
@@ -574,7 +574,7 @@
int size;
size = blocksize -
- offsetof(struct _ocfs2_dinode, id2.i_lab.la_bitmap);
+ offsetof(struct ocfs2_dinode, id2.i_lab.la_bitmap);
return size;
}
@@ -584,7 +584,7 @@
int size;
size = blocksize -
- offsetof(struct _ocfs2_group_desc, bg_bitmap);
+ offsetof(struct ocfs2_group_desc, bg_bitmap);
return size;
}
@@ -594,9 +594,9 @@
int size;
size = blocksize -
- offsetof(struct _ocfs2_dinode, id2.i_dealloc.tl_recs);
+ offsetof(struct ocfs2_dinode, id2.i_dealloc.tl_recs);
- return size / sizeof(struct _ocfs2_truncate_rec);
+ return size / sizeof(struct ocfs2_truncate_rec);
}
#endif /* __KERNEL__ */
Modified: branches/ocfs2-1.2/fs/ocfs2/proc.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/proc.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/proc.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -204,7 +204,7 @@
{
int len, ret;
char *la_state;
- ocfs2_super *osb = data;
+ struct ocfs2_super *osb = data;
mlog_entry_void();
@@ -258,7 +258,7 @@
{
int len;
int ret;
- ocfs2_super *osb = data;
+ struct ocfs2_super *osb = data;
mlog_entry_void();
@@ -274,7 +274,7 @@
{
int len;
int ret;
- ocfs2_super *osb = data;
+ struct ocfs2_super *osb = data;
mlog_entry_void();
@@ -308,7 +308,7 @@
return ret;
}
-void ocfs2_proc_add_volume(ocfs2_super * osb)
+void ocfs2_proc_add_volume(struct ocfs2_super * osb)
{
char newdir[20];
struct proc_dir_entry *parent = NULL;
@@ -344,7 +344,7 @@
mlog_exit_void();
}
-void ocfs2_proc_remove_volume(ocfs2_super * osb)
+void ocfs2_proc_remove_volume(struct ocfs2_super * osb)
{
ocfs2_proc_list *p;
char dir[20];
@@ -367,7 +367,7 @@
int count, int *eof, void *data)
{
int len, ret;
- ocfs2_super *osb = data;
+ struct ocfs2_super *osb = data;
mlog_entry_void();
@@ -383,7 +383,7 @@
{
int len;
int ret = 0;
- ocfs2_super *osb = data;
+ struct ocfs2_super *osb = data;
mlog_entry_void();
@@ -408,7 +408,7 @@
{
int len;
int ret;
- ocfs2_super *osb = data;
+ struct ocfs2_super *osb = data;
mlog_entry_void();
@@ -425,7 +425,7 @@
int len = 0;
int i;
int ret;
- ocfs2_super *osb = data;
+ struct ocfs2_super *osb = data;
char mount;
mlog_entry_void();
@@ -448,7 +448,7 @@
{
int len;
int ret;
- ocfs2_super *osb = data;
+ struct ocfs2_super *osb = data;
mlog_entry_void();
Modified: branches/ocfs2-1.2/fs/ocfs2/proc.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/proc.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/proc.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -26,9 +26,9 @@
#ifndef OCFS2_PROC_H
#define OCFS2_PROC_H
-void ocfs2_proc_add_volume(ocfs2_super *osb);
+void ocfs2_proc_add_volume(struct ocfs2_super *osb);
void ocfs2_proc_deinit(void);
int ocfs2_proc_init(void);
-void ocfs2_proc_remove_volume(ocfs2_super *osb);
+void ocfs2_proc_remove_volume(struct ocfs2_super *osb);
#endif /* OCFS2_PROC_H */
Modified: branches/ocfs2-1.2/fs/ocfs2/slot_map.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/slot_map.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/slot_map.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -53,7 +53,7 @@
* nodes. Should be holding an EX on super block. assumes slot info is
* up to date. Note that we call this *after* we find a slot, so our
* own node should be set in the map too... */
-void ocfs2_populate_mounted_map(ocfs2_super *osb)
+void ocfs2_populate_mounted_map(struct ocfs2_super *osb)
{
int i;
struct ocfs2_slot_info *si = osb->slot_info;
@@ -87,7 +87,7 @@
/* post the our slot info stuff into it's destination bh and write it
* out. */
-int ocfs2_update_disk_slots(ocfs2_super *osb,
+int ocfs2_update_disk_slots(struct ocfs2_super *osb,
struct ocfs2_slot_info *si)
{
int status, i;
@@ -167,7 +167,7 @@
spin_unlock(&si->si_lock);
}
-int ocfs2_init_slot_info(ocfs2_super *osb)
+int ocfs2_init_slot_info(struct ocfs2_super *osb)
{
int status, i;
u64 blkno;
@@ -228,7 +228,7 @@
kfree(si);
}
-int ocfs2_find_slot(ocfs2_super *osb)
+int ocfs2_find_slot(struct ocfs2_super *osb)
{
int status;
s16 slot;
@@ -275,7 +275,7 @@
return status;
}
-void ocfs2_put_slot(ocfs2_super *osb)
+void ocfs2_put_slot(struct ocfs2_super *osb)
{
int status;
struct ocfs2_slot_info *si = osb->slot_info;
Modified: branches/ocfs2-1.2/fs/ocfs2/slot_map.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/slot_map.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/slot_map.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -37,14 +37,14 @@
s16 si_global_node_nums[OCFS2_MAX_SLOTS];
};
-int ocfs2_init_slot_info(ocfs2_super *osb);
+int ocfs2_init_slot_info(struct ocfs2_super *osb);
void ocfs2_free_slot_info(struct ocfs2_slot_info *si);
-int ocfs2_find_slot(ocfs2_super *osb);
-void ocfs2_put_slot(ocfs2_super *osb);
+int ocfs2_find_slot(struct ocfs2_super *osb);
+void ocfs2_put_slot(struct ocfs2_super *osb);
void ocfs2_update_slot_info(struct ocfs2_slot_info *si);
-int ocfs2_update_disk_slots(ocfs2_super *osb,
+int ocfs2_update_disk_slots(struct ocfs2_super *osb,
struct ocfs2_slot_info *si);
s16 ocfs2_node_num_to_slot(struct ocfs2_slot_info *si,
@@ -52,7 +52,7 @@
void ocfs2_clear_slot(struct ocfs2_slot_info *si,
s16 slot_num);
-void ocfs2_populate_mounted_map(ocfs2_super *osb);
+void ocfs2_populate_mounted_map(struct ocfs2_super *osb);
static inline int ocfs2_is_empty_slot(struct ocfs2_slot_info *si,
int slot_num)
Modified: branches/ocfs2-1.2/fs/ocfs2/suballoc.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/suballoc.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/suballoc.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -46,21 +46,21 @@
#include "buffer_head_io.h"
-static inline void ocfs2_debug_bg(ocfs2_group_desc *bg);
-static inline void ocfs2_debug_suballoc_inode(ocfs2_dinode *fe);
-static inline u16 ocfs2_find_victim_chain(ocfs2_chain_list *cl);
-static int ocfs2_block_group_fill(ocfs2_journal_handle *handle,
+static inline void ocfs2_debug_bg(struct ocfs2_group_desc *bg);
+static inline void ocfs2_debug_suballoc_inode(struct ocfs2_dinode *fe);
+static inline u16 ocfs2_find_victim_chain(struct ocfs2_chain_list *cl);
+static int ocfs2_block_group_fill(struct ocfs2_journal_handle *handle,
struct inode *alloc_inode,
struct buffer_head *bg_bh,
u64 group_blkno,
u16 my_chain,
- ocfs2_chain_list *cl);
-static int ocfs2_block_group_alloc(ocfs2_super *osb,
+ struct ocfs2_chain_list *cl);
+static int ocfs2_block_group_alloc(struct ocfs2_super *osb,
struct inode *alloc_inode,
struct buffer_head *bh);
-static int ocfs2_reserve_suballoc_bits(ocfs2_super *osb,
- ocfs2_alloc_context *ac);
+static int ocfs2_reserve_suballoc_bits(struct ocfs2_super *osb,
+ struct ocfs2_alloc_context *ac);
static int ocfs2_cluster_group_search(struct inode *inode,
struct buffer_head *group_bh,
@@ -70,14 +70,14 @@
struct buffer_head *group_bh,
u32 bits_wanted, u32 min_bits,
u16 *bit_off, u16 *bits_found);
-static int ocfs2_search_chain(ocfs2_alloc_context *ac,
+static int ocfs2_search_chain(struct ocfs2_alloc_context *ac,
u32 bits_wanted,
u32 min_bits,
u16 *bit_off,
unsigned int *num_bits,
u64 *bg_blkno);
-static int ocfs2_claim_suballoc_bits(ocfs2_super *osb,
- ocfs2_alloc_context *ac,
+static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb,
+ struct ocfs2_alloc_context *ac,
u32 bits_wanted,
u32 min_bits,
u16 *bit_off,
@@ -85,33 +85,33 @@
u64 *bg_blkno);
static int ocfs2_test_bg_bit_allocatable(struct buffer_head *bg_bh,
int nr);
-static int ocfs2_block_group_find_clear_bits(ocfs2_super *osb,
+static int ocfs2_block_group_find_clear_bits(struct ocfs2_super *osb,
struct buffer_head *bg_bh,
unsigned int bits_wanted,
u16 *bit_off,
u16 *bits_found);
-static inline int ocfs2_block_group_set_bits(ocfs2_journal_handle *handle,
+static inline int ocfs2_block_group_set_bits(struct ocfs2_journal_handle *handle,
struct inode *alloc_inode,
- ocfs2_group_desc *bg,
+ struct ocfs2_group_desc *bg,
struct buffer_head *group_bh,
unsigned int bit_off,
unsigned int num_bits);
-static inline int ocfs2_block_group_clear_bits(ocfs2_journal_handle *handle,
+static inline int ocfs2_block_group_clear_bits(struct ocfs2_journal_handle *handle,
struct inode *alloc_inode,
- ocfs2_group_desc *bg,
+ struct ocfs2_group_desc *bg,
struct buffer_head *group_bh,
unsigned int bit_off,
unsigned int num_bits);
-static int ocfs2_relink_block_group(ocfs2_journal_handle *handle,
+static int ocfs2_relink_block_group(struct ocfs2_journal_handle *handle,
struct inode *alloc_inode,
struct buffer_head *fe_bh,
struct buffer_head *bg_bh,
struct buffer_head *prev_bg_bh,
u16 chain);
-static inline int ocfs2_block_group_reasonably_empty(ocfs2_group_desc *bg,
+static inline int ocfs2_block_group_reasonably_empty(struct ocfs2_group_desc *bg,
u32 wanted);
-static int ocfs2_free_suballoc_bits(ocfs2_journal_handle *handle,
+static int ocfs2_free_suballoc_bits(struct ocfs2_journal_handle *handle,
struct inode *alloc_inode,
struct buffer_head *alloc_bh,
unsigned int start_bit,
@@ -129,7 +129,7 @@
u64 *bg_blkno,
u16 *bg_bit_off);
-void ocfs2_free_alloc_context(ocfs2_alloc_context *ac)
+void ocfs2_free_alloc_context(struct ocfs2_alloc_context *ac)
{
if (ac->ac_inode)
iput(ac->ac_inode);
@@ -138,20 +138,20 @@
kfree(ac);
}
-static u32 ocfs2_bits_per_group(ocfs2_chain_list *cl)
+static u32 ocfs2_bits_per_group(struct ocfs2_chain_list *cl)
{
return (u32)le16_to_cpu(cl->cl_cpg) * (u32)le16_to_cpu(cl->cl_bpc);
}
-static int ocfs2_block_group_fill(ocfs2_journal_handle *handle,
+static int ocfs2_block_group_fill(struct ocfs2_journal_handle *handle,
struct inode *alloc_inode,
struct buffer_head *bg_bh,
u64 group_blkno,
u16 my_chain,
- ocfs2_chain_list *cl)
+ struct ocfs2_chain_list *cl)
{
int status = 0;
- ocfs2_group_desc *bg = (ocfs2_group_desc *) bg_bh->b_data;
+ struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data;
struct super_block * sb = alloc_inode->i_sb;
mlog_entry_void();
@@ -200,7 +200,7 @@
return status;
}
-static inline u16 ocfs2_find_smallest_chain(ocfs2_chain_list *cl)
+static inline u16 ocfs2_find_smallest_chain(struct ocfs2_chain_list *cl)
{
u16 curr, best;
@@ -217,20 +217,20 @@
/*
* We expect the block group allocator to already be locked.
*/
-static int ocfs2_block_group_alloc(ocfs2_super *osb,
+static int ocfs2_block_group_alloc(struct ocfs2_super *osb,
struct inode *alloc_inode,
struct buffer_head *bh)
{
int status, credits;
- ocfs2_dinode *fe = (ocfs2_dinode *) bh->b_data;
- ocfs2_chain_list *cl;
- ocfs2_alloc_context *ac = NULL;
- ocfs2_journal_handle *handle = NULL;
+ struct ocfs2_dinode *fe = (struct ocfs2_dinode *) bh->b_data;
+ struct ocfs2_chain_list *cl;
+ struct ocfs2_alloc_context *ac = NULL;
+ struct ocfs2_journal_handle *handle = NULL;
u32 bit_off, num_bits;
u16 alloc_rec;
u64 bg_blkno;
struct buffer_head *bg_bh = NULL;
- ocfs2_group_desc *bg;
+ struct ocfs2_group_desc *bg;
BUG_ON(ocfs2_is_cluster_bitmap(alloc_inode));
@@ -302,7 +302,7 @@
goto bail;
}
- bg = (ocfs2_group_desc *) bg_bh->b_data;
+ bg = (struct ocfs2_group_desc *) bg_bh->b_data;
status = ocfs2_journal_access(handle, alloc_inode,
bh, OCFS2_JOURNAL_ACCESS_WRITE);
@@ -353,15 +353,15 @@
return status;
}
-static int ocfs2_reserve_suballoc_bits(ocfs2_super *osb,
- ocfs2_alloc_context *ac)
+static int ocfs2_reserve_suballoc_bits(struct ocfs2_super *osb,
+ struct ocfs2_alloc_context *ac)
{
int status;
u32 bits_wanted = ac->ac_bits_wanted;
struct inode *alloc_inode = ac->ac_inode;
struct buffer_head *bh = NULL;
- ocfs2_journal_handle *handle = ac->ac_handle;
- ocfs2_dinode *fe;
+ struct ocfs2_journal_handle *handle = ac->ac_handle;
+ struct ocfs2_dinode *fe;
u32 free_bits;
mlog_entry_void();
@@ -375,7 +375,7 @@
goto bail;
}
- fe = (ocfs2_dinode *) bh->b_data;
+ fe = (struct ocfs2_dinode *) bh->b_data;
if (!OCFS2_IS_VALID_DINODE(fe)) {
OCFS2_RO_ON_INVALID_DINODE(alloc_inode->i_sb, fe);
status = -EIO;
@@ -424,15 +424,15 @@
return status;
}
-int ocfs2_reserve_new_metadata(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- ocfs2_dinode *fe,
- ocfs2_alloc_context **ac)
+int ocfs2_reserve_new_metadata(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_dinode *fe,
+ struct ocfs2_alloc_context **ac)
{
int status;
struct inode *alloc_inode = NULL;
- *ac = kcalloc(1, sizeof(ocfs2_alloc_context), GFP_KERNEL);
+ *ac = kcalloc(1, sizeof(struct ocfs2_alloc_context), GFP_KERNEL);
if (!(*ac)) {
status = -ENOMEM;
mlog_errno(status);
@@ -482,14 +482,14 @@
return status;
}
-int ocfs2_reserve_new_inode(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- ocfs2_alloc_context **ac)
+int ocfs2_reserve_new_inode(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_alloc_context **ac)
{
int status;
struct inode *alloc_inode = NULL;
- *ac = kcalloc(1, sizeof(ocfs2_alloc_context), GFP_KERNEL);
+ *ac = kcalloc(1, sizeof(struct ocfs2_alloc_context), GFP_KERNEL);
if (!(*ac)) {
status = -ENOMEM;
mlog_errno(status);
@@ -535,8 +535,8 @@
/* local alloc code has to do the same thing, so rather than do this
* twice.. */
-int ocfs2_reserve_cluster_bitmap_bits(ocfs2_super *osb,
- ocfs2_alloc_context *ac)
+int ocfs2_reserve_cluster_bitmap_bits(struct ocfs2_super *osb,
+ struct ocfs2_alloc_context *ac)
{
int status;
@@ -561,10 +561,10 @@
/* Callers don't need to care which bitmap (local alloc or main) to
* use so we figure it out for them, but unfortunately this clutters
* things a bit. */
-int ocfs2_reserve_clusters(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+int ocfs2_reserve_clusters(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
u32 bits_wanted,
- ocfs2_alloc_context **ac)
+ struct ocfs2_alloc_context **ac)
{
int status;
@@ -572,7 +572,7 @@
BUG_ON(!handle);
- *ac = kcalloc(1, sizeof(ocfs2_alloc_context), GFP_KERNEL);
+ *ac = kcalloc(1, sizeof(struct ocfs2_alloc_context), GFP_KERNEL);
if (!(*ac)) {
status = -ENOMEM;
mlog_errno(status);
@@ -648,18 +648,18 @@
static int ocfs2_test_bg_bit_allocatable(struct buffer_head *bg_bh,
int nr)
{
- ocfs2_group_desc *bg = (ocfs2_group_desc *) bg_bh->b_data;
+ struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data;
if (ocfs2_test_bit(nr, (unsigned long *)bg->bg_bitmap))
return 0;
if (!buffer_jbd(bg_bh) || !bh2jh(bg_bh)->b_committed_data)
return 1;
- bg = (ocfs2_group_desc *) bh2jh(bg_bh)->b_committed_data;
+ bg = (struct ocfs2_group_desc *) bh2jh(bg_bh)->b_committed_data;
return !ocfs2_test_bit(nr, (unsigned long *)bg->bg_bitmap);
}
-static int ocfs2_block_group_find_clear_bits(ocfs2_super *osb,
+static int ocfs2_block_group_find_clear_bits(struct ocfs2_super *osb,
struct buffer_head *bg_bh,
unsigned int bits_wanted,
u16 *bit_off,
@@ -668,7 +668,7 @@
void *bitmap;
u16 best_offset, best_size;
int offset, start, found, status = 0;
- ocfs2_group_desc *bg = (ocfs2_group_desc *) bg_bh->b_data;
+ struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data;
if (!OCFS2_IS_VALID_GROUP_DESC(bg)) {
OCFS2_RO_ON_INVALID_GROUP_DESC(osb->sb, bg);
@@ -727,9 +727,9 @@
return status;
}
-static inline int ocfs2_block_group_set_bits(ocfs2_journal_handle *handle,
+static inline int ocfs2_block_group_set_bits(struct ocfs2_journal_handle *handle,
struct inode *alloc_inode,
- ocfs2_group_desc *bg,
+ struct ocfs2_group_desc *bg,
struct buffer_head *group_bh,
unsigned int bit_off,
unsigned int num_bits)
@@ -780,7 +780,7 @@
}
/* find the one with the most empty bits */
-static inline u16 ocfs2_find_victim_chain(ocfs2_chain_list *cl)
+static inline u16 ocfs2_find_victim_chain(struct ocfs2_chain_list *cl)
{
u16 curr, best;
@@ -798,7 +798,7 @@
return best;
}
-static int ocfs2_relink_block_group(ocfs2_journal_handle *handle,
+static int ocfs2_relink_block_group(struct ocfs2_journal_handle *handle,
struct inode *alloc_inode,
struct buffer_head *fe_bh,
struct buffer_head *bg_bh,
@@ -809,9 +809,9 @@
/* there is a really tiny chance the journal calls could fail,
* but we wouldn't want inconsistent blocks in *any* case. */
u64 fe_ptr, bg_ptr, prev_bg_ptr;
- ocfs2_dinode *fe = (ocfs2_dinode *) fe_bh->b_data;
- ocfs2_group_desc *bg = (ocfs2_group_desc *) bg_bh->b_data;
- ocfs2_group_desc *prev_bg = (ocfs2_group_desc *) prev_bg_bh->b_data;
+ struct ocfs2_dinode *fe = (struct ocfs2_dinode *) fe_bh->b_data;
+ struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data;
+ struct ocfs2_group_desc *prev_bg = (struct ocfs2_group_desc *) prev_bg_bh->b_data;
if (!OCFS2_IS_VALID_DINODE(fe)) {
OCFS2_RO_ON_INVALID_DINODE(alloc_inode->i_sb, fe);
@@ -894,7 +894,7 @@
return status;
}
-static inline int ocfs2_block_group_reasonably_empty(ocfs2_group_desc *bg,
+static inline int ocfs2_block_group_reasonably_empty(struct ocfs2_group_desc *bg,
u32 wanted)
{
return le16_to_cpu(bg->bg_free_bits_count) > wanted;
@@ -909,7 +909,7 @@
{
int search = -ENOSPC;
int ret;
- ocfs2_group_desc *bg = (ocfs2_group_desc *) group_bh->b_data;
+ struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) group_bh->b_data;
u16 tmp_off, tmp_found;
BUG_ON(!ocfs2_is_cluster_bitmap(inode));
@@ -941,7 +941,7 @@
u16 *bit_off, u16 *bits_found)
{
int ret = -ENOSPC;
- ocfs2_group_desc *bg = (ocfs2_group_desc *) group_bh->b_data;
+ struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) group_bh->b_data;
BUG_ON(min_bits != 1);
BUG_ON(ocfs2_is_cluster_bitmap(inode));
@@ -954,7 +954,7 @@
return ret;
}
-static int ocfs2_search_chain(ocfs2_alloc_context *ac,
+static int ocfs2_search_chain(struct ocfs2_alloc_context *ac,
u32 bits_wanted,
u32 min_bits,
u16 *bit_off,
@@ -965,13 +965,13 @@
u16 chain, tmp_bits;
u32 tmp_used;
u64 next_group;
- ocfs2_journal_handle *handle = ac->ac_handle;
+ struct ocfs2_journal_handle *handle = ac->ac_handle;
struct inode *alloc_inode = ac->ac_inode;
struct buffer_head *group_bh = NULL;
struct buffer_head *prev_group_bh = NULL;
- ocfs2_dinode *fe = (ocfs2_dinode *) ac->ac_bh->b_data;
- ocfs2_chain_list *cl = (ocfs2_chain_list *) &fe->id2.i_chain;
- ocfs2_group_desc *bg;
+ struct ocfs2_dinode *fe = (struct ocfs2_dinode *) ac->ac_bh->b_data;
+ struct ocfs2_chain_list *cl = (struct ocfs2_chain_list *) &fe->id2.i_chain;
+ struct ocfs2_group_desc *bg;
chain = ac->ac_chain;
mlog(0, "trying to alloc %u bits from chain %u, inode %"MLFu64"\n",
@@ -984,7 +984,7 @@
mlog_errno(status);
goto bail;
}
- bg = (ocfs2_group_desc *) group_bh->b_data;
+ bg = (struct ocfs2_group_desc *) group_bh->b_data;
if (!OCFS2_IS_VALID_GROUP_DESC(bg)) {
OCFS2_RO_ON_INVALID_GROUP_DESC(alloc_inode->i_sb, bg);
status = -EIO;
@@ -1014,7 +1014,7 @@
mlog_errno(status);
goto bail;
}
- bg = (ocfs2_group_desc *) group_bh->b_data;
+ bg = (struct ocfs2_group_desc *) group_bh->b_data;
if (!OCFS2_IS_VALID_GROUP_DESC(bg)) {
OCFS2_RO_ON_INVALID_GROUP_DESC(alloc_inode->i_sb, bg);
status = -EIO;
@@ -1107,8 +1107,8 @@
}
/* will give out up to bits_wanted contiguous bits. */
-static int ocfs2_claim_suballoc_bits(ocfs2_super *osb,
- ocfs2_alloc_context *ac,
+static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb,
+ struct ocfs2_alloc_context *ac,
u32 bits_wanted,
u32 min_bits,
u16 *bit_off,
@@ -1117,8 +1117,8 @@
{
int status;
u16 victim, i;
- ocfs2_chain_list *cl;
- ocfs2_dinode *fe;
+ struct ocfs2_chain_list *cl;
+ struct ocfs2_dinode *fe;
mlog_entry_void();
@@ -1126,7 +1126,7 @@
BUG_ON(bits_wanted > (ac->ac_bits_wanted - ac->ac_bits_given));
BUG_ON(!ac->ac_bh);
- fe = (ocfs2_dinode *) ac->ac_bh->b_data;
+ fe = (struct ocfs2_dinode *) ac->ac_bh->b_data;
if (!OCFS2_IS_VALID_DINODE(fe)) {
OCFS2_RO_ON_INVALID_DINODE(osb->sb, fe);
status = -EIO;
@@ -1143,7 +1143,7 @@
goto bail;
}
- cl = (ocfs2_chain_list *) &fe->id2.i_chain;
+ cl = (struct ocfs2_chain_list *) &fe->id2.i_chain;
victim = ocfs2_find_victim_chain(cl);
ac->ac_chain = victim;
@@ -1189,9 +1189,9 @@
return status;
}
-int ocfs2_claim_metadata(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- ocfs2_alloc_context *ac,
+int ocfs2_claim_metadata(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_alloc_context *ac,
u32 bits_wanted,
u16 *suballoc_bit_start,
unsigned int *num_bits,
@@ -1226,9 +1226,9 @@
return status;
}
-int ocfs2_claim_new_inode(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- ocfs2_alloc_context *ac,
+int ocfs2_claim_new_inode(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_alloc_context *ac,
u16 *suballoc_bit,
u64 *fe_blkno)
{
@@ -1273,7 +1273,7 @@
u64 bg_blkno,
u16 bg_bit_off)
{
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
u32 cluster = 0;
BUG_ON(!ocfs2_is_cluster_bitmap(inode));
@@ -1289,7 +1289,7 @@
static inline u64 ocfs2_which_cluster_group(struct inode *inode,
u32 cluster)
{
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
u32 group_no;
BUG_ON(!ocfs2_is_cluster_bitmap(inode));
@@ -1308,7 +1308,7 @@
u64 *bg_blkno,
u16 *bg_bit_off)
{
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
u32 data_cluster = ocfs2_blocks_to_clusters(osb->sb, data_blkno);
BUG_ON(!ocfs2_is_cluster_bitmap(inode));
@@ -1329,9 +1329,9 @@
* contig. allocation, set to '1' to indicate we can deal with extents
* of any size.
*/
-int ocfs2_claim_clusters(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- ocfs2_alloc_context *ac,
+int ocfs2_claim_clusters(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_alloc_context *ac,
u32 min_clusters,
u32 *cluster_start,
u32 *num_clusters)
@@ -1400,9 +1400,9 @@
return status;
}
-static inline int ocfs2_block_group_clear_bits(ocfs2_journal_handle *handle,
+static inline int ocfs2_block_group_clear_bits(struct ocfs2_journal_handle *handle,
struct inode *alloc_inode,
- ocfs2_group_desc *bg,
+ struct ocfs2_group_desc *bg,
struct buffer_head *group_bh,
unsigned int bit_off,
unsigned int num_bits)
@@ -1410,7 +1410,7 @@
int status;
unsigned int tmp;
int journal_type = OCFS2_JOURNAL_ACCESS_WRITE;
- ocfs2_group_desc *undo_bg = NULL;
+ struct ocfs2_group_desc *undo_bg = NULL;
mlog_entry_void();
@@ -1433,7 +1433,7 @@
}
if (ocfs2_is_cluster_bitmap(alloc_inode))
- undo_bg = (ocfs2_group_desc *) bh2jh(group_bh)->b_committed_data;
+ undo_bg = (struct ocfs2_group_desc *) bh2jh(group_bh)->b_committed_data;
tmp = num_bits;
while(tmp--) {
@@ -1455,7 +1455,7 @@
/*
* expects the suballoc inode to already be locked.
*/
-static int ocfs2_free_suballoc_bits(ocfs2_journal_handle *handle,
+static int ocfs2_free_suballoc_bits(struct ocfs2_journal_handle *handle,
struct inode *alloc_inode,
struct buffer_head *alloc_bh,
unsigned int start_bit,
@@ -1464,11 +1464,11 @@
{
int status = 0;
u32 tmp_used;
- ocfs2_super *osb = OCFS2_SB(alloc_inode->i_sb);
- ocfs2_dinode *fe = (ocfs2_dinode *) alloc_bh->b_data;
- ocfs2_chain_list *cl = &fe->id2.i_chain;
+ struct ocfs2_super *osb = OCFS2_SB(alloc_inode->i_sb);
+ struct ocfs2_dinode *fe = (struct ocfs2_dinode *) alloc_bh->b_data;
+ struct ocfs2_chain_list *cl = &fe->id2.i_chain;
struct buffer_head *group_bh = NULL;
- ocfs2_group_desc *group;
+ struct ocfs2_group_desc *group;
mlog_entry_void();
@@ -1491,7 +1491,7 @@
goto bail;
}
- group = (ocfs2_group_desc *) group_bh->b_data;
+ group = (struct ocfs2_group_desc *) group_bh->b_data;
if (!OCFS2_IS_VALID_GROUP_DESC(group)) {
OCFS2_RO_ON_INVALID_GROUP_DESC(alloc_inode->i_sb, group);
status = -EIO;
@@ -1540,10 +1540,10 @@
return group;
}
-int ocfs2_free_dinode(ocfs2_journal_handle *handle,
+int ocfs2_free_dinode(struct ocfs2_journal_handle *handle,
struct inode *inode_alloc_inode,
struct buffer_head *inode_alloc_bh,
- ocfs2_dinode *di)
+ struct ocfs2_dinode *di)
{
u64 blk = le64_to_cpu(di->i_blkno);
u16 bit = le16_to_cpu(di->i_suballoc_bit);
@@ -1553,10 +1553,10 @@
inode_alloc_bh, bit, bg_blkno, 1);
}
-int ocfs2_free_extent_block(ocfs2_journal_handle *handle,
+int ocfs2_free_extent_block(struct ocfs2_journal_handle *handle,
struct inode *eb_alloc_inode,
struct buffer_head *eb_alloc_bh,
- ocfs2_extent_block *eb)
+ struct ocfs2_extent_block *eb)
{
u64 blk = le64_to_cpu(eb->h_blkno);
u16 bit = le16_to_cpu(eb->h_suballoc_bit);
@@ -1566,7 +1566,7 @@
bit, bg_blkno, 1);
}
-int ocfs2_free_clusters(ocfs2_journal_handle *handle,
+int ocfs2_free_clusters(struct ocfs2_journal_handle *handle,
struct inode *bitmap_inode,
struct buffer_head *bitmap_bh,
u64 start_blk,
@@ -1575,7 +1575,7 @@
int status;
u16 bg_start_bit;
u64 bg_blkno;
- ocfs2_dinode *fe;
+ struct ocfs2_dinode *fe;
/* You can't ever have a contiguous set of clusters
* bigger than a block group bitmap so we never have to worry
@@ -1587,7 +1587,7 @@
* gotten tested really well. */
BUG_ON(start_blk != ocfs2_clusters_to_blocks(bitmap_inode->i_sb, ocfs2_blocks_to_clusters(bitmap_inode->i_sb, start_blk)));
- fe = (ocfs2_dinode *) bitmap_bh->b_data;
+ fe = (struct ocfs2_dinode *) bitmap_bh->b_data;
ocfs2_block_to_cluster_group(bitmap_inode, start_blk, &bg_blkno,
&bg_start_bit);
@@ -1607,7 +1607,7 @@
return status;
}
-static inline void ocfs2_debug_bg(ocfs2_group_desc *bg)
+static inline void ocfs2_debug_bg(struct ocfs2_group_desc *bg)
{
printk("Block Group:\n");
printk("bg_signature: %s\n", bg->bg_signature);
@@ -1621,7 +1621,7 @@
printk("bg_blkno: %"MLFu64"\n", bg->bg_blkno);
}
-static inline void ocfs2_debug_suballoc_inode(ocfs2_dinode *fe)
+static inline void ocfs2_debug_suballoc_inode(struct ocfs2_dinode *fe)
{
int i;
Modified: branches/ocfs2-1.2/fs/ocfs2/suballoc.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/suballoc.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/suballoc.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -33,7 +33,7 @@
u16 *,
u16 *);
-typedef struct _ocfs2_alloc_context {
+struct ocfs2_alloc_context {
struct inode *ac_inode; /* which bitmap are we allocating from? */
struct buffer_head *ac_bh; /* file entry bh */
u32 ac_bits_wanted;
@@ -43,66 +43,66 @@
#define OCFS2_AC_USE_INODE 3
#define OCFS2_AC_USE_META 4
u32 ac_which;
- ocfs2_journal_handle *ac_handle;
+ struct ocfs2_journal_handle *ac_handle;
/* these are used by the chain search */
u16 ac_chain;
int ac_allow_chain_relink;
group_search_t *ac_group_search;
-} ocfs2_alloc_context;
+};
-void ocfs2_free_alloc_context(ocfs2_alloc_context *ac);
-static inline int ocfs2_alloc_context_bits_left(ocfs2_alloc_context *ac)
+void ocfs2_free_alloc_context(struct ocfs2_alloc_context *ac);
+static inline int ocfs2_alloc_context_bits_left(struct ocfs2_alloc_context *ac)
{
return ac->ac_bits_wanted - ac->ac_bits_given;
}
-int ocfs2_reserve_new_metadata(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- ocfs2_dinode *fe,
- ocfs2_alloc_context **ac);
-int ocfs2_reserve_new_inode(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- ocfs2_alloc_context **ac);
-int ocfs2_reserve_clusters(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
+int ocfs2_reserve_new_metadata(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_dinode *fe,
+ struct ocfs2_alloc_context **ac);
+int ocfs2_reserve_new_inode(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_alloc_context **ac);
+int ocfs2_reserve_clusters(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
u32 bits_wanted,
- ocfs2_alloc_context **ac);
+ struct ocfs2_alloc_context **ac);
-int ocfs2_claim_metadata(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- ocfs2_alloc_context *ac,
+int ocfs2_claim_metadata(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_alloc_context *ac,
u32 bits_wanted,
u16 *suballoc_bit_start,
u32 *num_bits,
u64 *blkno_start);
-int ocfs2_claim_new_inode(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- ocfs2_alloc_context *ac,
+int ocfs2_claim_new_inode(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_alloc_context *ac,
u16 *suballoc_bit,
u64 *fe_blkno);
-int ocfs2_claim_clusters(ocfs2_super *osb,
- ocfs2_journal_handle *handle,
- ocfs2_alloc_context *ac,
+int ocfs2_claim_clusters(struct ocfs2_super *osb,
+ struct ocfs2_journal_handle *handle,
+ struct ocfs2_alloc_context *ac,
u32 min_clusters,
u32 *cluster_start,
u32 *num_clusters);
-int ocfs2_free_dinode(ocfs2_journal_handle *handle,
+int ocfs2_free_dinode(struct ocfs2_journal_handle *handle,
struct inode *inode_alloc_inode,
struct buffer_head *inode_alloc_bh,
- ocfs2_dinode *di);
-int ocfs2_free_extent_block(ocfs2_journal_handle *handle,
+ struct ocfs2_dinode *di);
+int ocfs2_free_extent_block(struct ocfs2_journal_handle *handle,
struct inode *eb_alloc_inode,
struct buffer_head *eb_alloc_bh,
- ocfs2_extent_block *eb);
-int ocfs2_free_clusters(ocfs2_journal_handle *handle,
+ struct ocfs2_extent_block *eb);
+int ocfs2_free_clusters(struct ocfs2_journal_handle *handle,
struct inode *bitmap_inode,
struct buffer_head *bitmap_bh,
u64 start_blk,
unsigned int num_clusters);
-static inline u32 ocfs2_cluster_from_desc(ocfs2_super *osb,
+static inline u32 ocfs2_cluster_from_desc(struct ocfs2_super *osb,
u64 bg_blkno)
{
/* This should work for all block group descriptors as only
@@ -120,13 +120,13 @@
static inline int ocfs2_is_cluster_bitmap(struct inode *inode)
{
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
return osb->bitmap_blkno == OCFS2_I(inode)->ip_blkno;
}
/* This is for local alloc ONLY. Others should use the task-specific
* apis above. */
-int ocfs2_reserve_cluster_bitmap_bits(ocfs2_super *osb,
- ocfs2_alloc_context *ac);
+int ocfs2_reserve_cluster_bitmap_bits(struct ocfs2_super *osb,
+ struct ocfs2_alloc_context *ac);
#endif /* _CHAINALLOC_H_ */
Modified: branches/ocfs2-1.2/fs/ocfs2/super.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/super.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/super.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -100,18 +100,18 @@
static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err);
static int ocfs2_initialize_mem_caches(void);
static void ocfs2_free_mem_caches(void);
-static void ocfs2_delete_osb(ocfs2_super *osb);
+static void ocfs2_delete_osb(struct ocfs2_super *osb);
static int ocfs2_statfs(struct super_block *sb, struct kstatfs *buf);
static int ocfs2_sync_fs(struct super_block *sb, int wait);
-static int ocfs2_init_global_system_inodes(ocfs2_super *osb);
-static int ocfs2_init_local_system_inodes(ocfs2_super *osb);
-static int ocfs2_release_system_inodes(ocfs2_super *osb);
-static int ocfs2_fill_local_node_info(ocfs2_super *osb);
-static int ocfs2_check_volume(ocfs2_super *osb);
-static int ocfs2_verify_volume(ocfs2_dinode *di,
+static int ocfs2_init_global_system_inodes(struct ocfs2_super *osb);
+static int ocfs2_init_local_system_inodes(struct ocfs2_super *osb);
+static int ocfs2_release_system_inodes(struct ocfs2_super *osb);
+static int ocfs2_fill_local_node_info(struct ocfs2_super *osb);
+static int ocfs2_check_volume(struct ocfs2_super *osb);
+static int ocfs2_verify_volume(struct ocfs2_dinode *di,
struct buffer_head *bh,
u32 sectsize);
static int ocfs2_initialize_super(struct super_block *sb,
@@ -186,7 +186,7 @@
{
int status = 0;
tid_t target;
- ocfs2_super *osb = OCFS2_SB(sb);
+ struct ocfs2_super *osb = OCFS2_SB(sb);
sb->s_dirt = 0;
@@ -209,7 +209,7 @@
return 0;
}
-static int ocfs2_init_global_system_inodes(ocfs2_super *osb)
+static int ocfs2_init_global_system_inodes(struct ocfs2_super *osb)
{
struct inode *new = NULL;
int status = 0;
@@ -254,7 +254,7 @@
return status;
}
-static int ocfs2_init_local_system_inodes(ocfs2_super *osb)
+static int ocfs2_init_local_system_inodes(struct ocfs2_super *osb)
{
struct inode *new = NULL;
int status = 0;
@@ -282,7 +282,7 @@
return status;
}
-static int ocfs2_release_system_inodes(ocfs2_super *osb)
+static int ocfs2_release_system_inodes(struct ocfs2_super *osb)
{
int status = 0, i;
struct inode *inode;
@@ -370,7 +370,7 @@
int incompat_features;
int ret = 0;
unsigned long parsed_options;
- ocfs2_super *osb = OCFS2_SB(sb);
+ struct ocfs2_super *osb = OCFS2_SB(sb);
if (!ocfs2_parse_options(sb, data, &parsed_options, 1)) {
ret = -EINVAL;
@@ -433,8 +433,8 @@
int *sector_size)
{
int status = 0, tmpstat;
- ocfs1_vol_disk_hdr *hdr;
- ocfs2_dinode *di;
+ struct ocfs1_vol_disk_hdr *hdr;
+ struct ocfs2_dinode *di;
int blksize;
*bh = NULL;
@@ -458,7 +458,7 @@
mlog_errno(status);
goto bail;
}
- hdr = (ocfs1_vol_disk_hdr *) (*bh)->b_data;
+ hdr = (struct ocfs1_vol_disk_hdr *) (*bh)->b_data;
if (hdr->major_version == OCFS1_MAJOR_VERSION) {
mlog(ML_ERROR, "incompatible version: %u.%u\n",
hdr->major_version, hdr->minor_version);
@@ -495,7 +495,7 @@
mlog_errno(status);
goto bail;
}
- di = (ocfs2_dinode *) (*bh)->b_data;
+ di = (struct ocfs2_dinode *) (*bh)->b_data;
status = ocfs2_verify_volume(di, *bh, blksize);
if (status >= 0)
goto bail;
@@ -515,7 +515,7 @@
int status, sector_size;
unsigned long parsed_opt;
struct inode *inode = NULL;
- ocfs2_super *osb = NULL;
+ struct ocfs2_super *osb = NULL;
struct buffer_head *bh = NULL;
mlog_entry("%p, %p, %i", sb, data, silent);
@@ -864,10 +864,10 @@
static int ocfs2_statfs(struct super_block *sb, struct kstatfs *buf)
{
- ocfs2_super *osb;
+ struct ocfs2_super *osb;
u32 numbits, freebits;
int status;
- ocfs2_dinode *bm_lock;
+ struct ocfs2_dinode *bm_lock;
struct buffer_head *bh = NULL;
struct inode *inode = NULL;
@@ -890,7 +890,7 @@
goto bail;
}
- bm_lock = (ocfs2_dinode *) bh->b_data;
+ bm_lock = (struct ocfs2_dinode *) bh->b_data;
numbits = le32_to_cpu(bm_lock->id1.bitmap1.i_total);
freebits = numbits - le32_to_cpu(bm_lock->id1.bitmap1.i_used);
@@ -969,7 +969,8 @@
return -ENOMEM;
ocfs2_lock_cache = kmem_cache_create("ocfs2_lock",
- sizeof(ocfs2_journal_lock), 0,
+ sizeof(struct ocfs2_journal_lock),
+ 0,
SLAB_NO_REAP|SLAB_HWCACHE_ALIGN,
NULL, NULL);
if (!ocfs2_lock_cache)
@@ -1014,7 +1015,7 @@
}
/* ocfs2 1.0 only allows one cluster and node identity per kernel image. */
-static int ocfs2_fill_local_node_info(ocfs2_super *osb)
+static int ocfs2_fill_local_node_info(struct ocfs2_super *osb)
{
int status;
@@ -1038,7 +1039,7 @@
{
int status = 0;
int unlock_super = 0;
- ocfs2_super *osb = OCFS2_SB(sb);
+ struct ocfs2_super *osb = OCFS2_SB(sb);
mlog_entry_void();
@@ -1129,7 +1130,7 @@
/* we can't grab the goofy sem lock from inside wait_event, so we use
* memory barriers to make sure that we'll see the null task before
* being woken up */
-static int ocfs2_recovery_thread_running(ocfs2_super *osb)
+static int ocfs2_recovery_thread_running(struct ocfs2_super *osb)
{
mb();
return osb->recovery_thread_task != NULL;
@@ -1138,7 +1139,7 @@
static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err)
{
int tmp;
- ocfs2_super *osb = NULL;
+ struct ocfs2_super *osb = NULL;
mlog_entry("(0x%p)\n", sb);
@@ -1216,7 +1217,7 @@
sb->s_fs_info = NULL;
}
-static int ocfs2_setup_osb_uuid(ocfs2_super *osb, const unsigned char *uuid,
+static int ocfs2_setup_osb_uuid(struct ocfs2_super *osb, const unsigned char *uuid,
unsigned uuid_bytes)
{
int i, ret;
@@ -1248,16 +1249,16 @@
{
int status = 0;
int i;
- ocfs2_dinode *di = NULL;
+ struct ocfs2_dinode *di = NULL;
struct inode *inode = NULL;
struct buffer_head *bitmap_bh = NULL;
- ocfs2_journal *journal;
+ struct ocfs2_journal *journal;
__le32 uuid_net_key;
- ocfs2_super *osb;
+ struct ocfs2_super *osb;
mlog_entry_void();
- osb = kcalloc(1, sizeof(ocfs2_super), GFP_KERNEL);
+ osb = kcalloc(1, sizeof(struct ocfs2_super), GFP_KERNEL);
if (!osb) {
status = -ENOMEM;
mlog_errno(status);
@@ -1341,7 +1342,7 @@
goto bail;
}
- di = (ocfs2_dinode *)bh->b_data;
+ di = (struct ocfs2_dinode *)bh->b_data;
osb->max_slots = le16_to_cpu(di->id2.i_super.s_max_slots);
if (osb->max_slots > OCFS2_MAX_SLOTS || osb->max_slots == 0) {
@@ -1384,7 +1385,7 @@
*/
/* initialize our journal structure */
- journal = kcalloc(1, sizeof(ocfs2_journal), GFP_KERNEL);
+ journal = kcalloc(1, sizeof(struct ocfs2_journal), GFP_KERNEL);
if (!journal) {
mlog(ML_ERROR, "unable to alloc journal\n");
status = -ENOMEM;
@@ -1483,7 +1484,7 @@
goto bail;
}
- di = (ocfs2_dinode *) bitmap_bh->b_data;
+ di = (struct ocfs2_dinode *) bitmap_bh->b_data;
osb->bitmap_cpg = le16_to_cpu(di->id2.i_chain.cl_cpg);
osb->num_clusters = le32_to_cpu(di->id1.bitmap1.i_total);
brelse(bitmap_bh);
@@ -1518,7 +1519,8 @@
* -EINVAL if there is a bad superblock
* 0 on success
*/
-static int ocfs2_verify_volume(ocfs2_dinode *di, struct buffer_head *bh,
+static int ocfs2_verify_volume(struct ocfs2_dinode *di,
+ struct buffer_head *bh,
u32 blksz)
{
int status = -EAGAIN;
@@ -1571,13 +1573,13 @@
return status;
}
-static int ocfs2_check_volume(ocfs2_super *osb)
+static int ocfs2_check_volume(struct ocfs2_super *osb)
{
int status = 0;
int dirty;
- ocfs2_dinode *local_alloc = NULL; /* only used if we
- * recover
- * ourselves. */
+ struct ocfs2_dinode *local_alloc = NULL; /* only used if we
+ * recover
+ * ourselves. */
mlog_entry_void();
@@ -1655,7 +1657,7 @@
* It will remove the osb from the global list and also free up all the
* initialized resources and fileobject.
*/
-static void ocfs2_delete_osb(ocfs2_super *osb)
+static void ocfs2_delete_osb(struct ocfs2_super *osb)
{
mlog_entry_void();
@@ -1674,7 +1676,7 @@
kfree(osb->local_alloc_copy);
kfree(osb->uuid_str);
ocfs2_put_dlm_debug(osb->osb_dlm_debug);
- memset(osb, 0, sizeof(ocfs2_super));
+ memset(osb, 0, sizeof(struct ocfs2_super));
mlog_exit_void();
}
@@ -1683,7 +1685,7 @@
* panic(). We do not support continue-on-error operation. */
static void ocfs2_handle_error(struct super_block *sb)
{
- ocfs2_super *osb = OCFS2_SB(sb);
+ struct ocfs2_super *osb = OCFS2_SB(sb);
if (osb->s_mount_opt & OCFS2_MOUNT_ERRORS_PANIC)
panic("OCFS2: (device %s): panic forced after error\n",
Modified: branches/ocfs2-1.2/fs/ocfs2/super.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/super.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/super.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -28,7 +28,7 @@
extern struct workqueue_struct *ocfs2_wq;
-int ocfs2_publish_get_mount_state(ocfs2_super *osb,
+int ocfs2_publish_get_mount_state(struct ocfs2_super *osb,
int node_num);
void __ocfs2_error(struct super_block *sb,
Modified: branches/ocfs2-1.2/fs/ocfs2/symlink.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/symlink.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/symlink.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -87,7 +87,7 @@
{
int status;
char *link = NULL;
- ocfs2_dinode *fe;
+ struct ocfs2_dinode *fe;
mlog_entry_void();
@@ -102,7 +102,7 @@
goto bail;
}
- fe = (ocfs2_dinode *) (*bh)->b_data;
+ fe = (struct ocfs2_dinode *) (*bh)->b_data;
link = (char *) fe->id2.i_symlink;
bail:
mlog_exit(status);
@@ -213,7 +213,7 @@
unsigned int l;
char buf[10];
struct inode *inode = data;
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
l = sprintf(buf, "%lu", (unsigned long)osb->node_num);
Modified: branches/ocfs2-1.2/fs/ocfs2/sysfile.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/sysfile.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/sysfile.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -41,12 +41,12 @@
#include "buffer_head_io.h"
-static struct inode * _ocfs2_get_system_file_inode(ocfs2_super *osb,
+static struct inode * _ocfs2_get_system_file_inode(struct ocfs2_super *osb,
int type,
u32 slot);
static inline int is_global_system_inode(int type);
-static inline int is_in_system_inode_array(ocfs2_super *osb,
+static inline int is_in_system_inode_array(struct ocfs2_super *osb,
int type,
u32 slot);
@@ -56,14 +56,14 @@
type <= OCFS2_LAST_GLOBAL_SYSTEM_INODE;
}
-static inline int is_in_system_inode_array(ocfs2_super *osb,
+static inline int is_in_system_inode_array(struct ocfs2_super *osb,
int type,
u32 slot)
{
return slot == osb->slot_num || is_global_system_inode(type);
}
-struct inode *ocfs2_get_system_file_inode(ocfs2_super *osb,
+struct inode *ocfs2_get_system_file_inode(struct ocfs2_super *osb,
int type,
u32 slot)
{
@@ -95,7 +95,7 @@
return inode;
}
-static struct inode * _ocfs2_get_system_file_inode(ocfs2_super *osb,
+static struct inode * _ocfs2_get_system_file_inode(struct ocfs2_super *osb,
int type,
u32 slot)
{
Modified: branches/ocfs2-1.2/fs/ocfs2/sysfile.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/sysfile.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/sysfile.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -26,7 +26,7 @@
#ifndef OCFS2_SYSFILE_H
#define OCFS2_SYSFILE_H
-struct inode * ocfs2_get_system_file_inode(ocfs2_super *osb,
+struct inode * ocfs2_get_system_file_inode(struct ocfs2_super *osb,
int type,
u32 slot);
Modified: branches/ocfs2-1.2/fs/ocfs2/vote.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/vote.c 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/vote.c 2006-01-23 22:37:55 UTC (rev 2756)
@@ -132,7 +132,7 @@
struct ocfs2_net_response_cb *n_callback;
};
-static void ocfs2_process_mount_request(ocfs2_super *osb,
+static void ocfs2_process_mount_request(struct ocfs2_super *osb,
unsigned int node_num)
{
mlog(0, "MOUNT vote from node %u\n", node_num);
@@ -148,7 +148,7 @@
ocfs2_node_map_clear_bit(osb, &osb->umount_map, node_num);
}
-static void ocfs2_process_umount_request(ocfs2_super *osb,
+static void ocfs2_process_umount_request(struct ocfs2_super *osb,
unsigned int node_num)
{
mlog(0, "UMOUNT vote from node %u\n", node_num);
@@ -364,7 +364,7 @@
}
}
-static void ocfs2_process_vote(ocfs2_super *osb,
+static void ocfs2_process_vote(struct ocfs2_super *osb,
struct ocfs2_vote_msg *msg)
{
int net_status, vote_response;
@@ -497,7 +497,7 @@
iput(inode);
}
-static void ocfs2_vote_thread_do_work(ocfs2_super *osb)
+static void ocfs2_vote_thread_do_work(struct ocfs2_super *osb)
{
unsigned long processed;
struct ocfs2_lock_res *lockres;
@@ -546,7 +546,7 @@
mlog_exit_void();
}
-static int ocfs2_vote_thread_lists_empty(ocfs2_super *osb)
+static int ocfs2_vote_thread_lists_empty(struct ocfs2_super *osb)
{
int empty = 0;
@@ -559,7 +559,7 @@
return empty;
}
-static int ocfs2_vote_thread_should_wake(ocfs2_super *osb)
+static int ocfs2_vote_thread_should_wake(struct ocfs2_super *osb)
{
int should_wake = 0;
@@ -574,7 +574,7 @@
int ocfs2_vote_thread(void *arg)
{
int status = 0;
- ocfs2_super *osb = arg;
+ struct ocfs2_super *osb = arg;
/* only quit once we've been asked to stop and there is no more
* work available */
@@ -613,7 +613,7 @@
return w;
}
-static unsigned int ocfs2_new_response_id(ocfs2_super *osb)
+static unsigned int ocfs2_new_response_id(struct ocfs2_super *osb)
{
unsigned int ret;
@@ -624,7 +624,7 @@
return ret;
}
-static void ocfs2_dequeue_net_wait_ctxt(ocfs2_super *osb,
+static void ocfs2_dequeue_net_wait_ctxt(struct ocfs2_super *osb,
struct ocfs2_net_wait_ctxt *w)
{
spin_lock(&osb->net_response_lock);
@@ -632,7 +632,7 @@
spin_unlock(&osb->net_response_lock);
}
-static void ocfs2_queue_net_wait_ctxt(ocfs2_super *osb,
+static void ocfs2_queue_net_wait_ctxt(struct ocfs2_super *osb,
struct ocfs2_net_wait_ctxt *w)
{
spin_lock(&osb->net_response_lock);
@@ -641,7 +641,7 @@
spin_unlock(&osb->net_response_lock);
}
-static void __ocfs2_mark_node_responded(ocfs2_super *osb,
+static void __ocfs2_mark_node_responded(struct ocfs2_super *osb,
struct ocfs2_net_wait_ctxt *w,
int node_num)
{
@@ -654,7 +654,7 @@
/* Intended to be called from the node down callback, we fake remove
* the node from all our response contexts */
-void ocfs2_remove_node_from_vote_queues(ocfs2_super *osb,
+void ocfs2_remove_node_from_vote_queues(struct ocfs2_super *osb,
int node_num)
{
struct list_head *p;
@@ -671,7 +671,7 @@
spin_unlock(&osb->net_response_lock);
}
-static int ocfs2_broadcast_vote(ocfs2_super *osb,
+static int ocfs2_broadcast_vote(struct ocfs2_super *osb,
struct ocfs2_vote_msg *request,
unsigned int response_id,
int *response,
@@ -750,7 +750,7 @@
return status;
}
-static struct ocfs2_vote_msg * ocfs2_new_vote_request(ocfs2_super *osb,
+static struct ocfs2_vote_msg * ocfs2_new_vote_request(struct ocfs2_super *osb,
u64 blkno,
unsigned int generation,
enum ocfs2_vote_request type,
@@ -779,7 +779,7 @@
/* Complete the buildup of a new vote request and process the
* broadcast return value. */
-static int ocfs2_do_request_vote(ocfs2_super *osb,
+static int ocfs2_do_request_vote(struct ocfs2_super *osb,
struct ocfs2_vote_msg *request,
struct ocfs2_net_response_cb *callback)
{
@@ -810,7 +810,7 @@
struct ocfs2_net_response_cb *callback)
{
int status;
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
if (ocfs2_inode_is_new(inode))
return 0;
@@ -874,7 +874,7 @@
{
int orphaned_slot, status;
struct ocfs2_net_response_cb delete_cb;
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct ocfs2_vote_msg *request;
spin_lock(&OCFS2_I(inode)->ip_lock);
@@ -925,7 +925,7 @@
unsigned int nlink)
{
int status;
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct ocfs2_vote_msg *request;
if (dentry->d_name.len > OCFS2_VOTE_FILENAME_LEN)
@@ -949,7 +949,7 @@
struct dentry *dentry)
{
int status;
- ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct ocfs2_vote_msg *request;
if (dentry->d_name.len > OCFS2_VOTE_FILENAME_LEN)
@@ -969,7 +969,7 @@
return status;
}
-int ocfs2_request_mount_vote(ocfs2_super *osb)
+int ocfs2_request_mount_vote(struct ocfs2_super *osb)
{
int status;
struct ocfs2_vote_msg *request = NULL;
@@ -1005,7 +1005,7 @@
return status;
}
-int ocfs2_request_umount_vote(ocfs2_super *osb)
+int ocfs2_request_umount_vote(struct ocfs2_super *osb)
{
int status;
struct ocfs2_vote_msg *request = NULL;
@@ -1039,7 +1039,7 @@
}
/* TODO: This should eventually be a hash table! */
-static struct ocfs2_net_wait_ctxt * __ocfs2_find_net_wait_ctxt(ocfs2_super *osb,
+static struct ocfs2_net_wait_ctxt * __ocfs2_find_net_wait_ctxt(struct ocfs2_super *osb,
u32 response_id)
{
struct list_head *p;
@@ -1076,13 +1076,13 @@
return ret;
}
-static int ocfs2_handle_response_message(o2net_msg *msg,
+static int ocfs2_handle_response_message(struct o2net_msg *msg,
u32 len,
void *data)
{
unsigned int response_id, node_num;
int response_status;
- ocfs2_super *osb = data;
+ struct ocfs2_super *osb = data;
struct ocfs2_response_msg *resp;
struct ocfs2_net_wait_ctxt * w;
struct ocfs2_net_response_cb *resp_cb;
@@ -1131,12 +1131,12 @@
return 0;
}
-static int ocfs2_handle_vote_message(o2net_msg *msg,
+static int ocfs2_handle_vote_message(struct o2net_msg *msg,
u32 len,
void *data)
{
int status;
- ocfs2_super *osb = data;
+ struct ocfs2_super *osb = data;
struct ocfs2_vote_work *work;
work = kmalloc(sizeof(struct ocfs2_vote_work), GFP_KERNEL);
@@ -1173,7 +1173,7 @@
return status;
}
-void ocfs2_unregister_net_handlers(ocfs2_super *osb)
+void ocfs2_unregister_net_handlers(struct ocfs2_super *osb)
{
if (!osb->net_key)
return;
@@ -1186,7 +1186,7 @@
osb->net_key = 0;
}
-int ocfs2_register_net_handlers(ocfs2_super *osb)
+int ocfs2_register_net_handlers(struct ocfs2_super *osb)
{
int status = 0;
Modified: branches/ocfs2-1.2/fs/ocfs2/vote.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/vote.h 2006-01-23 19:10:52 UTC (rev 2755)
+++ branches/ocfs2-1.2/fs/ocfs2/vote.h 2006-01-23 22:37:55 UTC (rev 2756)
@@ -28,7 +28,7 @@
#define VOTE_H
int ocfs2_vote_thread(void *arg);
-static inline void ocfs2_kick_vote_thread(ocfs2_super *osb)
+static inline void ocfs2_kick_vote_thread(struct ocfs2_super *osb)
{
spin_lock(&osb->vote_task_lock);
/* make sure the voting thread gets a swipe at whatever changes
@@ -44,13 +44,13 @@
unsigned int nlink);
int ocfs2_request_rename_vote(struct inode *inode,
struct dentry *dentry);
-int ocfs2_request_mount_vote(ocfs2_super *osb);
-int ocfs2_request_umount_vote(ocfs2_super *osb);
-int ocfs2_register_net_handlers(ocfs2_super *osb);
-void ocfs2_unregister_net_handlers(ocfs2_super *osb);
+int ocfs2_request_mount_vote(struct ocfs2_super *osb);
+int ocfs2_request_umount_vote(struct ocfs2_super *osb);
+int ocfs2_register_net_handlers(struct ocfs2_super *osb);
+void ocfs2_unregister_net_handlers(struct ocfs2_super *osb);
void ocfs2_mark_inode_remotely_deleted(struct inode *inode);
-void ocfs2_remove_node_from_vote_queues(ocfs2_super *osb,
+void ocfs2_remove_node_from_vote_queues(struct ocfs2_super *osb,
int node_num);
#endif
More information about the Ocfs2-commits
mailing list