[Ocfs2-tools-commits] jlbec commits r1127 - in trunk: .
debugfs.ocfs2 debugfs.ocfs2/include extras fsck.ocfs2
fsck.ocfs2/include libocfs2 libocfs2/include mkfs.ocfs2
ocfs2console/ocfs2interface tunefs.ocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu Nov 17 16:00:33 CST 2005
Author: jlbec
Date: 2005-11-17 16:00:21 -0600 (Thu, 17 Nov 2005)
New Revision: 1127
Modified:
trunk/configure.in
trunk/debugfs.ocfs2/commands.c
trunk/debugfs.ocfs2/dump.c
trunk/debugfs.ocfs2/include/dump.h
trunk/debugfs.ocfs2/journal.c
trunk/debugfs.ocfs2/utils.c
trunk/extras/find_dup_extents.c
trunk/extras/mark_journal_dirty.c
trunk/extras/set_random_bits.c
trunk/fsck.ocfs2/extent.c
trunk/fsck.ocfs2/fsck.c
trunk/fsck.ocfs2/include/extent.h
trunk/fsck.ocfs2/include/util.h
trunk/fsck.ocfs2/pass0.c
trunk/fsck.ocfs2/pass1.c
trunk/fsck.ocfs2/pass3.c
trunk/fsck.ocfs2/pass4.c
trunk/fsck.ocfs2/util.c
trunk/libocfs2/alloc.c
trunk/libocfs2/cached_inode.c
trunk/libocfs2/chain.c
trunk/libocfs2/chainalloc.c
trunk/libocfs2/checkhb.c
trunk/libocfs2/dir_iterate.c
trunk/libocfs2/dlm.c
trunk/libocfs2/expanddir.c
trunk/libocfs2/extend_file.c
trunk/libocfs2/extent_map.c
trunk/libocfs2/extents.c
trunk/libocfs2/fileio.c
trunk/libocfs2/getsize.c
trunk/libocfs2/heartbeat.c
trunk/libocfs2/include/extent_map.h
trunk/libocfs2/include/ocfs1_fs_compat.h
trunk/libocfs2/include/ocfs2.h
trunk/libocfs2/include/ocfs2_fs.h
trunk/libocfs2/inode.c
trunk/libocfs2/inode_scan.c
trunk/libocfs2/link.c
trunk/libocfs2/namei.c
trunk/libocfs2/openfs.c
trunk/libocfs2/truncate.c
trunk/mkfs.ocfs2/mkfs.c
trunk/mkfs.ocfs2/mkfs.h
trunk/ocfs2console/ocfs2interface/ocfs2module.c
trunk/tunefs.ocfs2/tunefs.c
Log:
o Import the new typedef-free ocfs2_fs.h and ocfs1_fs_compat.h
o Fix all the places that used the typedefs.
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/configure.in 2005-11-17 22:00:21 UTC (rev 1127)
@@ -10,13 +10,17 @@
MAJOR_VERSION=1
MINOR_VERSION=1
MICRO_VERSION=3
-EXTRA_VERSION=ALPHA
+EXTRA_VERSION=
# Adjust this only to bump the RPM packaging version
RPM_VERSION=1
DIST_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
-VERSION=$DIST_VERSION-$EXTRA_VERSION
+if test -z "$EXTRA_VERSION"; then
+ VERSION=$DIST_VERSION
+else
+ VERSION=$DIST_VERSION-$EXTRA_VERSION
+fi
AC_SUBST(MAJOR_VERSION)
AC_SUBST(MINOR_VERSION)
Modified: trunk/debugfs.ocfs2/commands.c
===================================================================
--- trunk/debugfs.ocfs2/commands.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/debugfs.ocfs2/commands.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -275,7 +275,7 @@
*/
static int get_slotnum(char **args, uint16_t *slotnum)
{
- ocfs2_super_block *sb = OCFS2_RAW_SB(gbls.fs->fs_super);
+ struct ocfs2_super_block *sb = OCFS2_RAW_SB(gbls.fs->fs_super);
char *endptr;
if (args[1]) {
@@ -299,10 +299,10 @@
* traverse_extents()
*
*/
-static errcode_t traverse_extents (ocfs2_filesys *fs, ocfs2_extent_list *el, FILE *out)
+static errcode_t traverse_extents (ocfs2_filesys *fs, struct ocfs2_extent_list *el, FILE *out)
{
- ocfs2_extent_block *eb;
- ocfs2_extent_rec *rec;
+ struct ocfs2_extent_block *eb;
+ struct ocfs2_extent_rec *rec;
errcode_t ret = 0;
char *buf = NULL;
int i;
@@ -320,7 +320,7 @@
if (ret)
goto bail;
- eb = (ocfs2_extent_block *)buf;
+ eb = (struct ocfs2_extent_block *)buf;
dump_extent_block (out, eb);
@@ -340,10 +340,10 @@
* traverse_chains()
*
*/
-static errcode_t traverse_chains (ocfs2_filesys *fs, ocfs2_chain_list *cl, FILE *out)
+static errcode_t traverse_chains (ocfs2_filesys *fs, struct ocfs2_chain_list *cl, FILE *out)
{
- ocfs2_group_desc *grp;
- ocfs2_chain_rec *rec;
+ struct ocfs2_group_desc *grp;
+ struct ocfs2_chain_rec *rec;
errcode_t ret = 0;
char *buf = NULL;
uint64_t blkno;
@@ -366,7 +366,7 @@
if (ret)
goto bail;
- grp = (ocfs2_group_desc *)buf;
+ grp = (struct ocfs2_group_desc *)buf;
dump_group_descriptor(out, grp, index);
blkno = grp->bg_next_group;
index++;
@@ -391,7 +391,7 @@
errcode_t ret = 0;
char sysfile[SYSTEM_FILE_NAME_MAX];
int i;
- ocfs2_super_block *sb;
+ struct ocfs2_super_block *sb;
if (gbls.device)
do_close (NULL);
@@ -657,8 +657,8 @@
{
char *opts = args[1];
FILE *out;
- ocfs2_dinode *in;
- ocfs2_super_block *sb;
+ struct ocfs2_dinode *in;
+ struct ocfs2_super_block *sb;
if (check_device_open())
goto bail;
@@ -683,7 +683,7 @@
*/
static void do_stat (char **args)
{
- ocfs2_dinode *inode;
+ struct ocfs2_dinode *inode;
uint64_t blkno;
char *buf = NULL;
FILE *out;
@@ -699,7 +699,7 @@
return ;
}
- inode = (ocfs2_dinode *)buf;
+ inode = (struct ocfs2_dinode *)buf;
out = open_pager(gbls.interactive);
dump_inode(out, inode);
@@ -819,7 +819,7 @@
uint64_t blkno;
errcode_t ret;
char *buf;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
if (process_inode_args(args, &blkno))
return ;
@@ -831,7 +831,7 @@
return ;
}
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
if (!S_ISREG(di->i_mode)) {
fprintf(stderr, "%s: Not a regular file\n", args[0]);
return ;
@@ -887,7 +887,7 @@
*/
static void do_group (char **args)
{
- ocfs2_group_desc *grp;
+ struct ocfs2_group_desc *grp;
uint64_t blkno;
char *buf = NULL;
FILE *out;
@@ -907,7 +907,7 @@
return ;
}
- grp = (ocfs2_group_desc *)buf;
+ grp = (struct ocfs2_group_desc *)buf;
dump_group_descriptor(out, grp, index);
blkno = grp->bg_next_group;
index++;
@@ -924,7 +924,7 @@
*/
static void do_extent (char **args)
{
- ocfs2_extent_block *eb;
+ struct ocfs2_extent_block *eb;
uint64_t blkno;
char *buf = NULL;
FILE *out;
@@ -940,7 +940,7 @@
return ;
}
- eb = (ocfs2_extent_block *)buf;
+ eb = (struct ocfs2_extent_block *)buf;
out = open_pager(gbls.interactive);
dump_extent_block(out, eb);
@@ -1078,7 +1078,7 @@
*/
static void do_encode_lockres (char **args)
{
- ocfs2_dinode *inode;
+ struct ocfs2_dinode *inode;
uint64_t blkno;
char *buf = NULL;
errcode_t ret = 0;
@@ -1097,7 +1097,7 @@
buf = gbls.blockbuf;
ret = ocfs2_read_inode(gbls.fs, blkno, buf);
if (!ret) {
- inode = (ocfs2_dinode *)buf;
+ inode = (struct ocfs2_dinode *)buf;
ocfs2_encode_lockres(OCFS2_LOCK_TYPE_META, blkno,
inode->i_generation, metalock);
ocfs2_encode_lockres(OCFS2_LOCK_TYPE_DATA, blkno,
Modified: trunk/debugfs.ocfs2/dump.c
===================================================================
--- trunk/debugfs.ocfs2/dump.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/debugfs.ocfs2/dump.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -32,7 +32,7 @@
* dump_super_block()
*
*/
-void dump_super_block(FILE *out, ocfs2_super_block *sb)
+void dump_super_block(FILE *out, struct ocfs2_super_block *sb)
{
int i;
char *str;
@@ -76,7 +76,7 @@
* dump_local_alloc()
*
*/
-void dump_local_alloc (FILE *out, ocfs2_local_alloc *loc)
+void dump_local_alloc (FILE *out, struct ocfs2_local_alloc *loc)
{
fprintf(out, "\tLocal Bitmap Offset: %u Size: %u\n",
loc->la_bm_off, loc->la_size);
@@ -88,7 +88,7 @@
* dump_truncate_log()
*
*/
-void dump_truncate_log (FILE *out, ocfs2_truncate_log *tl)
+void dump_truncate_log (FILE *out, struct ocfs2_truncate_log *tl)
{
int i;
@@ -121,7 +121,7 @@
* dump_inode()
*
*/
-void dump_inode(FILE *out, ocfs2_dinode *in)
+void dump_inode(FILE *out, struct ocfs2_dinode *in)
{
struct passwd *pw;
struct group *gr;
@@ -238,9 +238,9 @@
* dump_chain_list()
*
*/
-void dump_chain_list (FILE *out, ocfs2_chain_list *cl)
+void dump_chain_list (FILE *out, struct ocfs2_chain_list *cl)
{
- ocfs2_chain_rec *rec;
+ struct ocfs2_chain_rec *rec;
int i;
fprintf(out, "\tClusters per Group: %u Bits per Cluster: %u\n",
@@ -266,9 +266,9 @@
return ;
}
-void dump_extent_list (FILE *out, ocfs2_extent_list *ext)
+void dump_extent_list (FILE *out, struct ocfs2_extent_list *ext)
{
- ocfs2_extent_rec *rec;
+ struct ocfs2_extent_rec *rec;
int i;
fprintf(out, "\tTree Depth: %u Count: %u Next Free Rec: %u\n",
@@ -293,7 +293,7 @@
* dump_extent_block()
*
*/
-void dump_extent_block (FILE *out, ocfs2_extent_block *blk)
+void dump_extent_block (FILE *out, struct ocfs2_extent_block *blk)
{
fprintf (out, "\tSubAlloc Bit: %u SubAlloc Slot: %u\n",
blk->h_suballoc_bit, blk->h_suballoc_slot);
@@ -308,7 +308,8 @@
* dump_group_descriptor()
*
*/
-void dump_group_descriptor (FILE *out, ocfs2_group_desc *grp, int index)
+void dump_group_descriptor (FILE *out, struct ocfs2_group_desc *grp,
+ int index)
{
if (!index) {
fprintf (out, "\tGroup Chain: %u Parent Inode: %"PRIu64" "
@@ -336,7 +337,7 @@
{
list_dir_opts *ls = (list_dir_opts *)priv_data;
char tmp = rec->name[rec->name_len];
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
char perms[20];
char timestr[40];
@@ -348,7 +349,7 @@
} else {
memset(ls->buf, 0, ls->fs->fs_blocksize);
ocfs2_read_inode(ls->fs, rec->inode, ls->buf);
- di = (ocfs2_dinode *)ls->buf;
+ di = (struct ocfs2_dinode *)ls->buf;
inode_perms_to_str(di->i_mode, perms, sizeof(perms));
inode_time_to_str(di->i_mtime, timestr, sizeof(timestr));
@@ -440,7 +441,7 @@
char *blk = (char *) header;
uint32_t *blocknr;
char *uuid;
- ocfs2_super_block *sb = OCFS2_RAW_SB(gbls.fs->fs_super);
+ struct ocfs2_super_block *sb = OCFS2_RAW_SB(gbls.fs->fs_super);
tagflg = g_string_new (NULL);
@@ -518,12 +519,12 @@
switch (type) {
case 1:
fprintf(out, "Inode\n");
- dump_inode (out, (ocfs2_dinode *)buf);
+ dump_inode (out, (struct ocfs2_dinode *)buf);
fprintf (out, "\n");
break;
case 2:
fprintf(out, "Extent\n");
- dump_extent_block (out, (ocfs2_extent_block *)buf);
+ dump_extent_block (out, (struct ocfs2_extent_block *)buf);
fprintf (out, "\n");
break;
default:
Modified: trunk/debugfs.ocfs2/include/dump.h
===================================================================
--- trunk/debugfs.ocfs2/include/dump.h 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/debugfs.ocfs2/include/dump.h 2005-11-17 22:00:21 UTC (rev 1127)
@@ -33,14 +33,14 @@
char *buf;
} list_dir_opts;
-void dump_super_block (FILE *out, ocfs2_super_block *sb);
-void dump_local_alloc (FILE *out, ocfs2_local_alloc *loc);
-void dump_truncate_log (FILE *out, ocfs2_truncate_log *tl);
-void dump_inode (FILE *out, ocfs2_dinode *in);
-void dump_extent_list (FILE *out, ocfs2_extent_list *ext);
-void dump_chain_list (FILE *out, ocfs2_chain_list *cl);
-void dump_extent_block (FILE *out, ocfs2_extent_block *blk);
-void dump_group_descriptor (FILE *out, ocfs2_group_desc *grp, int index);
+void dump_super_block (FILE *out, struct ocfs2_super_block *sb);
+void dump_local_alloc (FILE *out, struct ocfs2_local_alloc *loc);
+void dump_truncate_log (FILE *out, struct ocfs2_truncate_log *tl);
+void dump_inode (FILE *out, struct ocfs2_dinode *in);
+void dump_extent_list (FILE *out, struct ocfs2_extent_list *ext);
+void dump_chain_list (FILE *out, struct ocfs2_chain_list *cl);
+void dump_extent_block (FILE *out, struct ocfs2_extent_block *blk);
+void dump_group_descriptor (FILE *out, struct ocfs2_group_desc *grp, int index);
int dump_dir_entry (struct ocfs2_dir_entry *rec, int offset, int blocksize,
char *buf, void *priv_data);
void dump_jbd_header (FILE *out, journal_header_t *header);
Modified: trunk/debugfs.ocfs2/journal.c
===================================================================
--- trunk/debugfs.ocfs2/journal.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/debugfs.ocfs2/journal.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -89,18 +89,18 @@
*/
int detect_block (char *buf)
{
- ocfs2_dinode *inode;
- ocfs2_extent_block *extent;
+ struct ocfs2_dinode *inode;
+ struct ocfs2_extent_block *extent;
int ret = -1;
- inode = (ocfs2_dinode *)buf;
+ inode = (struct ocfs2_dinode *)buf;
if (!memcmp(inode->i_signature, OCFS2_INODE_SIGNATURE,
sizeof(OCFS2_INODE_SIGNATURE))) {
ret = 1;
goto bail;
}
- extent = (ocfs2_extent_block *)buf;
+ extent = (struct ocfs2_extent_block *)buf;
if (!memcmp(extent->h_signature, OCFS2_EXTENT_BLOCK_SIGNATURE,
sizeof(OCFS2_EXTENT_BLOCK_SIGNATURE))) {
ret = 2;
Modified: trunk/debugfs.ocfs2/utils.c
===================================================================
--- trunk/debugfs.ocfs2/utils.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/debugfs.ocfs2/utils.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -308,7 +308,8 @@
* Copyright (C) 1994 Theodore Ts'o. This file may be redistributed
* under the terms of the GNU Public License.
*/
-static errcode_t fix_perms(const ocfs2_dinode *di, int *fd, char *name)
+static errcode_t fix_perms(const struct ocfs2_dinode *di, int *fd,
+ char *name)
{
struct utimbuf ut;
int i;
@@ -610,7 +611,7 @@
errcode_t ret;
char *buf = NULL;
char *dirbuf = NULL;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
int fd;
rdump_opts rd_opts = { NULL, NULL, NULL, 0 };
@@ -628,7 +629,7 @@
ret = ocfs2_read_inode(fs, blkno, buf);
if (ret)
goto bail;
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
if (S_ISLNK(di->i_mode)) {
ret = rdump_symlink(fs, blkno, fullname);
Modified: trunk/extras/find_dup_extents.c
===================================================================
--- trunk/extras/find_dup_extents.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/extras/find_dup_extents.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -52,7 +52,7 @@
};
static int extent_set_func(ocfs2_filesys *fs,
- ocfs2_extent_rec *rec,
+ struct ocfs2_extent_rec *rec,
int tree_depth,
uint32_t ccount,
uint64_t ref_blkno,
@@ -96,7 +96,7 @@
}
static int extent_test_func(ocfs2_filesys *fs,
- ocfs2_extent_rec *rec,
+ struct ocfs2_extent_rec *rec,
int tree_depth,
uint32_t ccount,
uint64_t ref_blkno,
@@ -139,10 +139,10 @@
uint64_t blkno;
char *buf;
int done;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
ocfs2_inode_scan *scan;
int (*extent_func)(ocfs2_filesys *fs,
- ocfs2_extent_rec *rec,
+ struct ocfs2_extent_rec *rec,
int tree_depth,
uint32_t ccount,
uint64_t ref_blkno,
@@ -161,7 +161,7 @@
return ret;
}
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
ret = ocfs2_open_inode_scan(we->fs, &scan);
if (ret) {
Modified: trunk/extras/mark_journal_dirty.c
===================================================================
--- trunk/extras/mark_journal_dirty.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/extras/mark_journal_dirty.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -49,7 +49,7 @@
{
errcode_t ret;
char *buf = NULL;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
ret = ocfs2_malloc_block(fs->fs_io, &buf);
if (ret)
@@ -59,7 +59,7 @@
if (ret)
goto out_free;
- di = (ocfs2_dinode *) buf;
+ di = (struct ocfs2_dinode *) buf;
if (!(di->i_flags & OCFS2_JOURNAL_FL)) {
ret = OCFS2_ET_INVALID_ARGUMENT;
@@ -84,9 +84,9 @@
{
errcode_t ret;
char *di_buf = NULL;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
uint64_t block;
- ocfs2_extent_list *el;
+ struct ocfs2_extent_list *el;
ret = ocfs2_malloc_block(fs->fs_io, &di_buf);
if (ret)
@@ -96,7 +96,7 @@
if (ret)
goto out_free;
- di = (ocfs2_dinode *) di_buf;
+ di = (struct ocfs2_dinode *) di_buf;
el = &di->id2.i_list;
block = el->l_recs[0].e_blkno;
if (el->l_tree_depth || !block) {
Modified: trunk/extras/set_random_bits.c
===================================================================
--- trunk/extras/set_random_bits.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/extras/set_random_bits.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -55,7 +55,7 @@
}
struct walk_block {
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
char *buf;
uint32_t used;
};
@@ -109,7 +109,7 @@
char *filename, *buf;
const char *bitmap_name = ocfs2_system_inodes[GLOBAL_BITMAP_SYSTEM_INODE].si_name;
ocfs2_filesys *fs;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
struct walk_block wb;
blkno = OCFS2_SUPER_BLOCK_BLKNO;
@@ -177,7 +177,7 @@
goto out_free;
}
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
wb.di = di;
ret = ocfs2_malloc_block(fs->fs_io, &wb.buf);
Modified: trunk/fsck.ocfs2/extent.c
===================================================================
--- trunk/fsck.ocfs2/extent.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/fsck.ocfs2/extent.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -55,15 +55,17 @@
};
static errcode_t check_el(o2fsck_state *ost, struct extent_info *ei,
- ocfs2_dinode *di, ocfs2_extent_list *el,
+ struct ocfs2_dinode *di,
+ struct ocfs2_extent_list *el,
uint16_t max_recs, int *changed);
static errcode_t check_eb(o2fsck_state *ost, struct extent_info *ei,
- ocfs2_dinode *di, uint64_t blkno, int *is_valid)
+ struct ocfs2_dinode *di, uint64_t blkno,
+ int *is_valid)
{
int changed = 0;
char *buf = NULL;
- ocfs2_extent_block *eb;
+ struct ocfs2_extent_block *eb;
errcode_t ret;
/* XXX test that the block isn't already used */
@@ -89,7 +91,7 @@
goto out;
}
- eb = (ocfs2_extent_block *)buf;
+ eb = (struct ocfs2_extent_block *)buf;
if (eb->h_blkno != blkno &&
prompt(ost, PY, PR_EB_BLKNO,
@@ -147,8 +149,9 @@
/* the caller will check if er->e_blkno is out of range to determine if it
* should try removing the record */
static errcode_t check_er(o2fsck_state *ost, struct extent_info *ei,
- ocfs2_dinode *di, ocfs2_extent_list *el,
- ocfs2_extent_rec *er, int *changed)
+ struct ocfs2_dinode *di,
+ struct ocfs2_extent_list *el,
+ struct ocfs2_extent_rec *er, int *changed)
{
errcode_t ret = 0;
uint64_t first_block;
@@ -225,11 +228,12 @@
}
static errcode_t check_el(o2fsck_state *ost, struct extent_info *ei,
- ocfs2_dinode *di, ocfs2_extent_list *el,
+ struct ocfs2_dinode *di,
+ struct ocfs2_extent_list *el,
uint16_t max_recs, int *changed)
{
int trust_next_free = 1;
- ocfs2_extent_rec *er;
+ struct ocfs2_extent_rec *er;
uint64_t max_size;
uint16_t i;
size_t cpy;
@@ -337,7 +341,8 @@
return 0;
}
-errcode_t o2fsck_check_extents(o2fsck_state *ost, ocfs2_dinode *di)
+errcode_t o2fsck_check_extents(o2fsck_state *ost,
+ struct ocfs2_dinode *di)
{
errcode_t ret;
struct extent_info ei = {0, };
Modified: trunk/fsck.ocfs2/fsck.c
===================================================================
--- trunk/fsck.ocfs2/fsck.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/fsck.ocfs2/fsck.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -157,8 +157,8 @@
static errcode_t check_superblock(o2fsck_state *ost)
{
- ocfs2_dinode *di = ost->ost_fs->fs_super;
- ocfs2_super_block *sb = OCFS2_RAW_SB(di);
+ struct ocfs2_dinode *di = ost->ost_fs->fs_super;
+ struct ocfs2_super_block *sb = OCFS2_RAW_SB(di);
errcode_t ret = 0;
if (sb->s_max_slots == 0) {
@@ -183,8 +183,8 @@
static errcode_t write_out_superblock(o2fsck_state *ost)
{
- ocfs2_dinode *di = ost->ost_fs->fs_super;
- ocfs2_super_block *sb = OCFS2_RAW_SB(di);
+ struct ocfs2_dinode *di = ost->ost_fs->fs_super;
+ struct ocfs2_super_block *sb = OCFS2_RAW_SB(di);
sb->s_errors = ost->ost_saw_error;
sb->s_lastcheck = time(NULL);
@@ -226,7 +226,7 @@
static int fs_is_clean(o2fsck_state *ost, char *filename)
{
- ocfs2_super_block *sb = OCFS2_RAW_SB(ost->ost_fs->fs_super);
+ struct ocfs2_super_block *sb = OCFS2_RAW_SB(ost->ost_fs->fs_super);
time_t now = time(NULL);
time_t next = sb->s_lastcheck + sb->s_checkinterval;
static char reason[4096] = {'\0', };
Modified: trunk/fsck.ocfs2/include/extent.h
===================================================================
--- trunk/fsck.ocfs2/include/extent.h 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/fsck.ocfs2/include/extent.h 2005-11-17 22:00:21 UTC (rev 1127)
@@ -22,7 +22,8 @@
#include "fsck.h"
-errcode_t o2fsck_check_extents(o2fsck_state *ost, ocfs2_dinode *di);
+errcode_t o2fsck_check_extents(o2fsck_state *ost,
+ struct ocfs2_dinode *di);
#endif /* __O2FSCK_EXTENT_H__ */
Modified: trunk/fsck.ocfs2/include/util.h
===================================================================
--- trunk/fsck.ocfs2/include/util.h 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/fsck.ocfs2/include/util.h 2005-11-17 22:00:21 UTC (rev 1127)
@@ -37,7 +37,8 @@
#define FSCK_CANCELED 32 /* Aborted with a signal or ^C */
#define FSCK_LIBRARY 128 /* Shared library error */
-void o2fsck_write_inode(o2fsck_state *ost, uint64_t blkno, ocfs2_dinode *di);
+void o2fsck_write_inode(o2fsck_state *ost, uint64_t blkno,
+ struct ocfs2_dinode *di);
void o2fsck_mark_cluster_allocated(o2fsck_state *ost, uint32_t cluster);
void o2fsck_mark_clusters_allocated(o2fsck_state *ost, uint32_t cluster,
uint32_t num);
Modified: trunk/fsck.ocfs2/pass0.c
===================================================================
--- trunk/fsck.ocfs2/pass0.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/fsck.ocfs2/pass0.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -70,9 +70,10 @@
uint16_t cs_cpg;
};
-static errcode_t repair_group_desc(o2fsck_state *ost, ocfs2_dinode *di,
+static errcode_t repair_group_desc(o2fsck_state *ost,
+ struct ocfs2_dinode *di,
struct chain_state *cs,
- ocfs2_group_desc *bg,
+ struct ocfs2_group_desc *bg,
uint64_t blkno)
{
errcode_t ret = 0;
@@ -162,14 +163,14 @@
* already had a chance to repair the chains so any remaining damage is
* the fault of -n, etc, and can simply abort us */
static void unlink_group_desc(o2fsck_state *ost,
- ocfs2_dinode *di,
- ocfs2_group_desc *bg,
+ struct ocfs2_dinode *di,
+ struct ocfs2_group_desc *bg,
uint64_t blkno)
{
- ocfs2_chain_list *cl;
- ocfs2_chain_rec *cr;
+ struct ocfs2_chain_list *cl;
+ struct ocfs2_chain_rec *cr;
uint16_t i, max_count;
- ocfs2_group_desc *link;
+ struct ocfs2_group_desc *link;
int unlink = 0;
char *buf = NULL;
uint64_t next_desc;
@@ -184,7 +185,7 @@
com_err(whoami, ret, "while allocating block buffers");
goto out;
}
- link = (ocfs2_group_desc *)buf;
+ link = (struct ocfs2_group_desc *)buf;
for (cr = cl->cl_recs, i = 0; i < max_count && cr->c_blkno;
i++, cr++) {
@@ -279,17 +280,17 @@
/* this takes a slightly ridiculous number of arguments :/ */
static errcode_t check_chain(o2fsck_state *ost,
- ocfs2_dinode *di,
+ struct ocfs2_dinode *di,
struct chain_state *cs,
- ocfs2_chain_rec *chain,
+ struct ocfs2_chain_rec *chain,
char *buf1,
char *buf2,
int *chain_changed,
ocfs2_bitmap *allowed,
ocfs2_bitmap *forbidden)
{
- ocfs2_group_desc *bg1 = (ocfs2_group_desc *)buf1;
- ocfs2_group_desc *bg2 = (ocfs2_group_desc *)buf2;
+ struct ocfs2_group_desc *bg1 = (struct ocfs2_group_desc *)buf1;
+ struct ocfs2_group_desc *bg2 = (struct ocfs2_group_desc *)buf2;
uint64_t blkno;
errcode_t ret = 0;
int changed = 0, depth = 0, clear_ref = 0;
@@ -441,15 +442,16 @@
/* If this returns 0 then the inode allocator had better be amenable to
* iteration. */
-static errcode_t verify_chain_alloc(o2fsck_state *ost, ocfs2_dinode *di,
+static errcode_t verify_chain_alloc(o2fsck_state *ost,
+ struct ocfs2_dinode *di,
char *buf1, char *buf2,
ocfs2_bitmap *allowed,
ocfs2_bitmap *forbidden)
{
struct chain_state cs = {0, };
- ocfs2_chain_list *cl;
+ struct ocfs2_chain_list *cl;
uint16_t i, max_count;
- ocfs2_chain_rec *cr;
+ struct ocfs2_chain_rec *cr;
uint32_t free = 0, total = 0;
int changed = 0, trust_next_free = 1;
errcode_t ret = 0;
@@ -644,17 +646,18 @@
* there. We fill a bitmap with the valid ones so that when we later walk
* the chains we can restrict it to the set of expected blocks and also
* be sure to add blocks that aren't linked in */
-static errcode_t verify_bitmap_descs(o2fsck_state *ost, ocfs2_dinode *di,
+static errcode_t verify_bitmap_descs(o2fsck_state *ost,
+ struct ocfs2_dinode *di,
char *buf1, char *buf2)
{
struct ocfs2_cluster_group_sizes cgs;
uint16_t i, max_recs;
uint16_t bits, chain;
uint64_t blkno;
- ocfs2_group_desc *bg = (ocfs2_group_desc *)buf1;
+ struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *)buf1;
errcode_t ret;
struct chain_state cs;
- ocfs2_chain_rec *rec;
+ struct ocfs2_chain_rec *rec;
ocfs2_bitmap *allowed = NULL, *forbidden = NULL;
int was_set;
@@ -840,7 +843,7 @@
errcode_t ret;
uint64_t blkno;
char *blocks = NULL;
- ocfs2_dinode *di = NULL;
+ struct ocfs2_dinode *di = NULL;
ocfs2_filesys *fs = ost->ost_fs;
ocfs2_cached_inode **ci;
int max_slots = OCFS2_RAW_SB(fs->fs_super)->s_max_slots;
@@ -853,7 +856,7 @@
com_err(whoami, ret, "while allocating block buffers");
goto out;
}
- di = (ocfs2_dinode *)blocks;
+ di = (struct ocfs2_dinode *)blocks;
ret = ocfs2_malloc0(max_slots * sizeof(ocfs2_cached_inode *),
&ost->ost_inode_allocs);
Modified: trunk/fsck.ocfs2/pass1.c
===================================================================
--- trunk/fsck.ocfs2/pass1.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/fsck.ocfs2/pass1.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -81,7 +81,8 @@
/* update our in memory images of the inode chain alloc bitmaps. these
* will be written out at the end of pass1 and the library will read
* them off disk for use from then on. */
-static void update_inode_alloc(o2fsck_state *ost, ocfs2_dinode *di,
+static void update_inode_alloc(o2fsck_state *ost,
+ struct ocfs2_dinode *di,
uint64_t blkno, int val)
{
int16_t slot;
@@ -170,9 +171,10 @@
return;
}
-static errcode_t verify_local_alloc(o2fsck_state *ost, ocfs2_dinode *di)
+static errcode_t verify_local_alloc(o2fsck_state *ost,
+ struct ocfs2_dinode *di)
{
- ocfs2_local_alloc *la = &di->id2.i_lab;
+ struct ocfs2_local_alloc *la = &di->id2.i_lab;
uint32_t max;
int broken = 0, changed = 0, clear = 0;
errcode_t ret = 0;
@@ -317,9 +319,10 @@
/* this just makes sure the truncate log contains consistent data, it doesn't
* do anything with it yet */
-static errcode_t verify_truncate_log(o2fsck_state *ost, ocfs2_dinode *di)
+static errcode_t verify_truncate_log(o2fsck_state *ost,
+ struct ocfs2_dinode *di)
{
- ocfs2_truncate_log *tl = &di->id2.i_dealloc;
+ struct ocfs2_truncate_log *tl = &di->id2.i_dealloc;
uint16_t max, i;
int changed = 0;
errcode_t ret = 0;
@@ -351,7 +354,7 @@
}
for (i = 0; i < ocfs2_min(max, tl->tl_used); i++) {
- ocfs2_truncate_rec *tr = &tl->tl_recs[i];
+ struct ocfs2_truncate_rec *tr = &tl->tl_recs[i];
int zero = 0;
verbosef("t_start %u t_clusters %u\n", tr->t_start,
@@ -418,8 +421,10 @@
* inode allocations and write the inode to disk.
*
* XXX the o2fsck_write_inode helpers need to be fixed here*/
-static void o2fsck_verify_inode_fields(ocfs2_filesys *fs, o2fsck_state *ost,
- uint64_t blkno, ocfs2_dinode *di)
+static void o2fsck_verify_inode_fields(ocfs2_filesys *fs,
+ o2fsck_state *ost,
+ uint64_t blkno,
+ struct ocfs2_dinode *di)
{
int clear = 0;
@@ -543,15 +548,15 @@
}
struct verifying_blocks {
- unsigned vb_clear:1,
- vb_saw_link_null:1;
+ unsigned vb_clear:1,
+ vb_saw_link_null:1;
- uint64_t vb_link_len;
- uint64_t vb_num_blocks;
- uint64_t vb_last_block;
- o2fsck_state *vb_ost;
- ocfs2_dinode *vb_di;
- errcode_t vb_ret;
+ uint64_t vb_link_len;
+ uint64_t vb_num_blocks;
+ uint64_t vb_last_block;
+ o2fsck_state *vb_ost;
+ struct ocfs2_dinode *vb_di;
+ errcode_t vb_ret;
};
/* last_block and num_blocks would be different in a sparse file */
@@ -598,7 +603,7 @@
static void check_link_data(struct verifying_blocks *vb)
{
- ocfs2_dinode *di = vb->vb_di;
+ struct ocfs2_dinode *di = vb->vb_di;
o2fsck_state *ost = vb->vb_ost;
uint64_t expected, link_max;
char *null;
@@ -675,12 +680,12 @@
}
static int verify_block(ocfs2_filesys *fs,
- uint64_t blkno,
- uint64_t bcount,
- void *priv_data)
+ uint64_t blkno,
+ uint64_t bcount,
+ void *priv_data)
{
struct verifying_blocks *vb = priv_data;
- ocfs2_dinode *di = vb->vb_di;
+ struct ocfs2_dinode *di = vb->vb_di;
o2fsck_state *ost = vb->vb_ost;
errcode_t ret = 0;
@@ -712,7 +717,7 @@
* reference extents of data.
*/
static errcode_t o2fsck_check_blocks(ocfs2_filesys *fs, o2fsck_state *ost,
- uint64_t blkno, ocfs2_dinode *di)
+ uint64_t blkno, struct ocfs2_dinode *di)
{
uint64_t expected = 0;
errcode_t ret;
@@ -808,8 +813,8 @@
char *buf = NULL;
errcode_t ret;
uint64_t blkno, start, end;
- ocfs2_dinode *di;
- ocfs2_local_alloc *la;
+ struct ocfs2_dinode *di;
+ struct ocfs2_local_alloc *la;
int bit;
max_slots = OCFS2_RAW_SB(ost->ost_fs->fs_super)->s_max_slots;
@@ -821,7 +826,7 @@
goto out;
}
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
for (slot = 0; slot < max_slots; slot++) {
ret = ocfs2_lookup_system_inode(ost->ost_fs,
@@ -901,9 +906,9 @@
{
int16_t slot;
uint16_t max_slots, i, max;
- ocfs2_truncate_log *tl;
+ struct ocfs2_truncate_log *tl;
uint64_t blkno;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
char *buf = NULL;
errcode_t ret;
@@ -917,7 +922,7 @@
goto out;
}
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
for (slot = 0; slot < max_slots; slot++) {
ret = ocfs2_lookup_system_inode(ost->ost_fs,
@@ -941,7 +946,7 @@
tl = &di->id2.i_dealloc;
for (i = 0; i < ocfs2_min(tl->tl_used, max); i++) {
- ocfs2_truncate_rec *tr = &tl->tl_recs[i];
+ struct ocfs2_truncate_rec *tr = &tl->tl_recs[i];
if (tr->t_start == 0)
continue;
@@ -1120,7 +1125,7 @@
errcode_t ret;
uint64_t blkno;
char *buf;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
ocfs2_inode_scan *scan;
ocfs2_filesys *fs = ost->ost_fs;
int valid;
@@ -1133,7 +1138,7 @@
goto out;
}
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
ret = ocfs2_open_inode_scan(fs, &scan);
if (ret) {
Modified: trunk/fsck.ocfs2/pass3.c
===================================================================
--- trunk/fsck.ocfs2/pass3.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/fsck.ocfs2/pass3.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -46,7 +46,7 @@
static void check_root(o2fsck_state *ost)
{
- ocfs2_super_block *sb = OCFS2_RAW_SB(ost->ost_fs->fs_super);
+ struct ocfs2_super_block *sb = OCFS2_RAW_SB(ost->ost_fs->fs_super);
errcode_t ret;
uint64_t blkno, old_root;
int was_set;
Modified: trunk/fsck.ocfs2/pass4.c
===================================================================
--- trunk/fsck.ocfs2/pass4.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/fsck.ocfs2/pass4.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -40,7 +40,8 @@
static const char *whoami = "pass4";
-static void check_link_counts(o2fsck_state *ost, ocfs2_dinode *di,
+static void check_link_counts(o2fsck_state *ost,
+ struct ocfs2_dinode *di,
uint64_t blkno)
{
uint16_t refs, in_inode;
@@ -215,7 +216,7 @@
errcode_t o2fsck_pass4(o2fsck_state *ost)
{
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
char *buf = NULL;
errcode_t ret;
uint64_t blkno, start;
@@ -237,7 +238,7 @@
goto out;
}
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
start = 0;
while (next_inode_any_ref(ost, start, &blkno) == 0) {
Modified: trunk/fsck.ocfs2/util.c
===================================================================
--- trunk/fsck.ocfs2/util.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/fsck.ocfs2/util.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -31,7 +31,8 @@
#include "util.h"
-void o2fsck_write_inode(o2fsck_state *ost, uint64_t blkno, ocfs2_dinode *di)
+void o2fsck_write_inode(o2fsck_state *ost, uint64_t blkno,
+ struct ocfs2_dinode *di)
{
errcode_t ret;
const char *whoami = __FUNCTION__;
@@ -74,7 +75,7 @@
{
char *buf = NULL;
errcode_t ret;
- ocfs2_dinode *dinode;
+ struct ocfs2_dinode *dinode;
const char *whoami = __FUNCTION__;
*type = 0;
@@ -93,7 +94,7 @@
goto out;
}
- dinode = (ocfs2_dinode *)buf;
+ dinode = (struct ocfs2_dinode *)buf;
*type = ocfs2_type_by_mode[(dinode->i_mode & S_IFMT)>>S_SHIFT];
out:
Modified: trunk/libocfs2/alloc.c
===================================================================
--- trunk/libocfs2/alloc.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/alloc.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -120,11 +120,12 @@
return (megabytes << ONE_MB_SHIFT) >> cluster_size_bits;
}
-static void ocfs2_init_inode(ocfs2_filesys *fs, ocfs2_dinode *di, int16_t slot,
- uint64_t gd_blkno, uint64_t blkno, uint16_t mode,
+static void ocfs2_init_inode(ocfs2_filesys *fs, struct ocfs2_dinode *di,
+ int16_t slot, uint64_t gd_blkno,
+ uint64_t blkno, uint16_t mode,
uint32_t flags)
{
- ocfs2_extent_list *fel;
+ struct ocfs2_extent_list *fel;
int cs_bits = OCFS2_RAW_SB(fs->fs_super)->s_clustersize_bits;
unsigned int tl_recs;
@@ -176,7 +177,8 @@
fel->l_count = ocfs2_extent_recs_per_inode(fs->fs_blocksize);
}
-static void ocfs2_init_eb(ocfs2_filesys *fs, ocfs2_extent_block *eb,
+static void ocfs2_init_eb(ocfs2_filesys *fs,
+ struct ocfs2_extent_block *eb,
uint64_t gd_blkno, uint64_t blkno)
{
strcpy(eb->h_signature, OCFS2_EXTENT_BLOCK_SIGNATURE);
@@ -191,7 +193,7 @@
errcode_t ret;
char *buf;
uint64_t gd_blkno;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
ret = ocfs2_malloc_block(fs->fs_io, &buf);
if (ret)
@@ -215,7 +217,7 @@
}
memset(buf, 0, fs->fs_blocksize);
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
ocfs2_init_inode(fs, di, 0, gd_blkno, *ino, mode, OCFS2_VALID_FL);
ret = ocfs2_write_inode(fs, *ino, buf);
@@ -234,7 +236,7 @@
errcode_t ret;
char *buf;
uint64_t gd_blkno;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
ret = ocfs2_malloc_block(fs->fs_io, &buf);
if (ret)
@@ -258,7 +260,7 @@
}
memset(buf, 0, fs->fs_blocksize);
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
ocfs2_init_inode(fs, di, -1, gd_blkno, *ino, mode,
(flags | OCFS2_VALID_FL | OCFS2_SYSTEM_FL));
@@ -274,7 +276,7 @@
{
errcode_t ret;
char *buf;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
int slot;
ocfs2_cached_inode **inode_alloc;
@@ -285,7 +287,7 @@
ret = ocfs2_read_inode(fs, ino, buf);
if (ret)
goto out;
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
slot = di->i_suballoc_slot;
if (slot == OCFS2_INVALID_SLOT)
@@ -345,7 +347,7 @@
errcode_t ret;
char *buf;
uint64_t gd_blkno;
- ocfs2_extent_block *eb;
+ struct ocfs2_extent_block *eb;
ret = ocfs2_malloc_block(fs->fs_io, &buf);
if (ret)
@@ -362,7 +364,7 @@
goto out;
memset(buf, 0, fs->fs_blocksize);
- eb = (ocfs2_extent_block *)buf;
+ eb = (struct ocfs2_extent_block *)buf;
ocfs2_init_eb(fs, eb, gd_blkno, *blkno);
ret = ocfs2_write_extent_block(fs, *blkno, buf);
@@ -377,7 +379,7 @@
{
errcode_t ret;
char *buf;
- ocfs2_extent_block *eb;
+ struct ocfs2_extent_block *eb;
int slot;
ret = ocfs2_malloc_block(fs->fs_io, &buf);
@@ -387,7 +389,7 @@
ret = ocfs2_read_extent_block(fs, blkno, buf);
if (ret)
goto out;
- eb = (ocfs2_extent_block *)buf;
+ eb = (struct ocfs2_extent_block *)buf;
slot = eb->h_suballoc_slot;
ret = ocfs2_load_allocator(fs, EXTENT_ALLOC_SYSTEM_INODE, slot,
@@ -483,7 +485,7 @@
errcode_t ret;
ocfs2_filesys *fs;
char *buf;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
uint64_t blkno;
if (argc < 3) {
@@ -507,7 +509,7 @@
goto out_close;
}
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
ret = ocfs2_new_inode(fs, &blkno, 0644 | S_IFREG);
if (ret) {
Modified: trunk/libocfs2/cached_inode.c
===================================================================
--- trunk/libocfs2/cached_inode.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/cached_inode.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -51,7 +51,7 @@
if (ret)
goto cleanup;
- cinode->ci_inode = (ocfs2_dinode *)blk;
+ cinode->ci_inode = (struct ocfs2_dinode *)blk;
ret = ocfs2_read_inode(fs, blkno, blk);
if (ret)
Modified: trunk/libocfs2/chain.c
===================================================================
--- trunk/libocfs2/chain.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/chain.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -29,7 +29,7 @@
#include "ocfs2.h"
-void ocfs2_swap_group_desc(ocfs2_group_desc *gd)
+void ocfs2_swap_group_desc(struct ocfs2_group_desc *gd)
{
if (cpu_is_little_endian)
return;
@@ -49,7 +49,7 @@
{
errcode_t ret;
char *blk;
- ocfs2_group_desc *gd;
+ struct ocfs2_group_desc *gd;
if ((blkno < OCFS2_SUPER_BLOCK_BLKNO) ||
(blkno > fs->fs_blocks))
@@ -63,7 +63,7 @@
if (ret)
goto out;
- gd = (ocfs2_group_desc *)blk;
+ gd = (struct ocfs2_group_desc *)blk;
ret = OCFS2_ET_BAD_GROUP_DESC_MAGIC;
if (memcmp(gd->bg_signature, OCFS2_GROUP_DESC_SIGNATURE,
@@ -72,7 +72,7 @@
memcpy(gd_buf, blk, fs->fs_blocksize);
- gd = (ocfs2_group_desc *)gd_buf;
+ gd = (struct ocfs2_group_desc *)gd_buf;
ocfs2_swap_group_desc(gd);
ret = 0;
@@ -87,7 +87,7 @@
{
errcode_t ret;
char *blk;
- ocfs2_group_desc *gd;
+ struct ocfs2_group_desc *gd;
if (!(fs->fs_flags & OCFS2_FLAG_RW))
return OCFS2_ET_RO_FILESYS;
@@ -102,7 +102,7 @@
memcpy(blk, gd_buf, fs->fs_blocksize);
- gd = (ocfs2_group_desc *)blk;
+ gd = (struct ocfs2_group_desc *)blk;
ocfs2_swap_group_desc(gd);
ret = io_write_block(fs->fs_io, blkno, 1, blk);
@@ -132,12 +132,13 @@
};
-static int chain_iterate_gd(ocfs2_chain_rec *c_rec, int chain_num,
+static int chain_iterate_gd(struct ocfs2_chain_rec *c_rec,
+ int chain_num,
struct chain_context *ctxt)
{
int iret = 0;
uint64_t blkno;
- ocfs2_group_desc *gd;
+ struct ocfs2_group_desc *gd;
blkno = c_rec->c_blkno;
@@ -153,7 +154,7 @@
iret |= OCFS2_CHAIN_ERROR;
break;
}
- gd = (ocfs2_group_desc *)ctxt->gd_buf;
+ gd = (struct ocfs2_group_desc *)ctxt->gd_buf;
if ((gd->bg_blkno != blkno) ||
(gd->bg_chain != chain_num)) {
@@ -168,7 +169,7 @@
return iret;
}
-static int chain_iterate_cl(ocfs2_chain_list *cl,
+static int chain_iterate_cl(struct ocfs2_chain_list *cl,
struct chain_context *ctxt)
{
int iret = 0;
@@ -197,7 +198,7 @@
{
int iret = 0;
char *buf;
- ocfs2_dinode *inode;
+ struct ocfs2_dinode *inode;
errcode_t ret;
struct chain_context ctxt;
@@ -209,7 +210,7 @@
if (ret)
goto out_buf;
- inode = (ocfs2_dinode *)buf;
+ inode = (struct ocfs2_dinode *)buf;
ret = OCFS2_ET_INODE_NOT_VALID;
if (!(inode->i_flags & OCFS2_VALID_FL))
@@ -271,7 +272,7 @@
}
struct walk_it {
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
char *gd_buf;
int last_chain;
int count_free;
@@ -284,7 +285,7 @@
void *priv_data)
{
struct walk_it *wi = priv_data;
- ocfs2_group_desc *gd;
+ struct ocfs2_group_desc *gd;
errcode_t ret;
if (wi->last_chain != chain_num) {
@@ -299,7 +300,7 @@
if (ret)
return OCFS2_CHAIN_ERROR;
- gd = (ocfs2_group_desc *)wi->gd_buf;
+ gd = (struct ocfs2_group_desc *)wi->gd_buf;
wi->count_free += gd->bg_free_bits_count;
wi->count_total += gd->bg_bits;
fprintf(stdout, " %16"PRIu64": %05d/%05d = %05d/%05d\n",
@@ -321,7 +322,7 @@
int c;
char *filename, *buf;
ocfs2_filesys *fs;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
struct walk_it wi;
blkno = OCFS2_SUPER_BLOCK_BLKNO;
@@ -383,7 +384,7 @@
goto out_free;
}
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
fprintf(stdout, "OCFS2 inode %"PRIu64" on \"%s\"\n",
blkno, filename);
Modified: trunk/libocfs2/chainalloc.c
===================================================================
--- trunk/libocfs2/chainalloc.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/chainalloc.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -44,7 +44,7 @@
struct chainalloc_region_private {
struct chainalloc_bitmap_private *cr_cb;
- struct _ocfs2_group_desc *cr_ag;
+ struct ocfs2_group_desc *cr_ag;
int cr_dirty;
};
@@ -107,7 +107,7 @@
goto out_free_buf;
cr->cr_cb = cb;
- cr->cr_ag = (ocfs2_group_desc *)gd_buf;
+ cr->cr_ag = (struct ocfs2_group_desc *)gd_buf;
cb->cb_errcode = OCFS2_ET_CORRUPT_GROUP_DESC;
if (cr->cr_ag->bg_size != ocfs2_group_bitmap_size(fs->fs_blocksize))
@@ -227,9 +227,10 @@
{
struct chainalloc_bitmap_private *cb = bitmap->b_private;
struct chainalloc_region_private *cr = br->br_private;
- ocfs2_dinode *di = cb->cb_cinode->ci_inode;
- ocfs2_group_desc *ag = cr->cr_ag;
- ocfs2_chain_rec *rec = &di->id2.i_chain.cl_recs[ag->bg_chain];
+ struct ocfs2_dinode *di = cb->cb_cinode->ci_inode;
+ struct ocfs2_group_desc *ag = cr->cr_ag;
+ struct ocfs2_chain_rec *rec =
+ &di->id2.i_chain.cl_recs[ag->bg_chain];
if (new_val) {
ag->bg_free_bits_count--;
@@ -475,7 +476,8 @@
return ocfs2_bitmap_test(cinode->ci_chains, bitno, oldval);
}
-void ocfs2_init_group_desc(ocfs2_filesys *fs, ocfs2_group_desc *gd,
+void ocfs2_init_group_desc(ocfs2_filesys *fs,
+ struct ocfs2_group_desc *gd,
uint64_t blkno, uint32_t generation,
uint64_t parent_inode, uint16_t bits,
uint16_t chain)
@@ -500,15 +502,15 @@
{
errcode_t ret;
uint64_t blkno = 0, old_blkno = 0;
- ocfs2_group_desc *gd;
+ struct ocfs2_group_desc *gd;
char *buf = NULL;
- ocfs2_chain_rec *rec = NULL;
+ struct ocfs2_chain_rec *rec = NULL;
struct chainalloc_bitmap_private *cb = cinode->ci_chains->b_private;
ret = ocfs2_malloc_block(fs->fs_io, &buf);
if (ret)
return ret;
- gd = (ocfs2_group_desc *)buf;
+ gd = (struct ocfs2_group_desc *)buf;
ret = ocfs2_new_clusters(fs, cinode->ci_inode->id2.i_chain.cl_cpg,
&blkno);
Modified: trunk/libocfs2/checkhb.c
===================================================================
--- trunk/libocfs2/checkhb.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/checkhb.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -156,7 +156,7 @@
int fd = -1;
int ret = OCFS2_ET_IO;
char buf[512];
- ocfs1_vol_label *v1_lbl;
+ struct ocfs1_vol_label *v1_lbl;
fd = open(device, O_RDONLY);
if (fd == -1)
@@ -165,7 +165,7 @@
if (pread(fd, buf, sizeof(buf), 512) == -1)
goto bail;
- v1_lbl = (ocfs1_vol_label *)buf;
+ v1_lbl = (struct ocfs1_vol_label *)buf;
memcpy(label, v1_lbl->label, label_len);
memcpy(uuid, v1_lbl->vol_id, uuid_len);
Modified: trunk/libocfs2/dir_iterate.c
===================================================================
--- trunk/libocfs2/dir_iterate.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/dir_iterate.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -283,7 +283,7 @@
int c;
char *filename, *buf;
ocfs2_filesys *fs;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
blkno = 0;
@@ -339,7 +339,7 @@
goto out_free;
}
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
fprintf(stdout, "OCFS2 inode %"PRIu64" on \"%s\"\n",
blkno, filename);
Modified: trunk/libocfs2/dlm.c
===================================================================
--- trunk/libocfs2/dlm.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/dlm.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -32,7 +32,7 @@
static errcode_t ocfs2_get_journal_blkno(ocfs2_filesys *fs, uint64_t *jrnl_blkno)
{
- ocfs2_super_block *sb = OCFS2_RAW_SB(fs->fs_super);
+ struct ocfs2_super_block *sb = OCFS2_RAW_SB(fs->fs_super);
char sysfile[OCFS2_MAX_FILENAME_LEN];
int i;
errcode_t ret = 0;
@@ -52,7 +52,7 @@
errcode_t ocfs2_lock_down_cluster(ocfs2_filesys *fs)
{
- ocfs2_super_block *sb = OCFS2_RAW_SB(fs->fs_super);
+ struct ocfs2_super_block *sb = OCFS2_RAW_SB(fs->fs_super);
uint64_t jrnl_blkno[OCFS2_MAX_SLOTS];
ocfs2_cached_inode *ci;
errcode_t ret = 0;
Modified: trunk/libocfs2/expanddir.c
===================================================================
--- trunk/libocfs2/expanddir.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/expanddir.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -111,7 +111,8 @@
/* did we just add a '..' reference to a parent? if so, update
* them */
if (used_blks == 0) {
- ocfs2_dinode *parent = (ocfs2_dinode *)buf;
+ struct ocfs2_dinode *parent =
+ (struct ocfs2_dinode *)buf;
ret = ocfs2_read_inode(fs, parent_dir, buf);
if (ret)
goto bail;
Modified: trunk/libocfs2/extend_file.c
===================================================================
--- trunk/libocfs2/extend_file.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/extend_file.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -35,8 +35,8 @@
struct insert_ctxt {
ocfs2_filesys *fs;
- ocfs2_dinode *di;
- ocfs2_extent_rec rec;
+ struct ocfs2_dinode *di;
+ struct ocfs2_extent_rec rec;
};
static errcode_t insert_extent_eb(struct insert_ctxt *ctxt,
@@ -47,11 +47,11 @@
* last_eb_blk. Also updates the dinode's ->last_eb_blk.
*/
static errcode_t update_last_eb_blk(struct insert_ctxt *ctxt,
- ocfs2_extent_block *eb)
+ struct ocfs2_extent_block *eb)
{
errcode_t ret;
char *buf;
- ocfs2_extent_block *last_eb;
+ struct ocfs2_extent_block *last_eb;
if (!ctxt->di->i_last_eb_blk)
return OCFS2_ET_INTERNAL_FAILURE;
@@ -65,7 +65,7 @@
if (ret)
goto out;
- last_eb = (ocfs2_extent_block *)buf;
+ last_eb = (struct ocfs2_extent_block *)buf;
last_eb->h_next_leaf_blk = eb->h_blkno;
ret = ocfs2_write_extent_block(ctxt->fs, last_eb->h_blkno,
@@ -86,13 +86,13 @@
* Add a child extent_block to a non-leaf extent list.
*/
static errcode_t append_eb(struct insert_ctxt *ctxt,
- ocfs2_extent_list *el)
+ struct ocfs2_extent_list *el)
{
errcode_t ret;
char *buf;
uint64_t blkno;
- ocfs2_extent_block *eb;
- ocfs2_extent_rec *rec;
+ struct ocfs2_extent_block *eb;
+ struct ocfs2_extent_rec *rec;
ret = ocfs2_malloc_block(ctxt->fs->fs_io, &buf);
if (ret)
@@ -106,7 +106,7 @@
if (ret)
goto out;
- eb = (ocfs2_extent_block *)buf;
+ eb = (struct ocfs2_extent_block *)buf;
eb->h_list.l_tree_depth = el->l_tree_depth - 1;
if (!eb->h_list.l_tree_depth) {
@@ -139,10 +139,10 @@
* branch, updating this list on the way back up.
*/
static errcode_t insert_extent_el(struct insert_ctxt *ctxt,
- ocfs2_extent_list *el)
+ struct ocfs2_extent_list *el)
{
errcode_t ret;
- ocfs2_extent_rec *rec = NULL;
+ struct ocfs2_extent_rec *rec = NULL;
if (!el->l_tree_depth) {
/* A leaf extent_list can do one of three things: */
@@ -229,7 +229,7 @@
{
errcode_t ret;
char *buf;
- ocfs2_extent_block *eb;
+ struct ocfs2_extent_block *eb;
ret = ocfs2_malloc_block(ctxt->fs->fs_io, &buf);
if (ret)
@@ -237,7 +237,7 @@
ret = ocfs2_read_extent_block(ctxt->fs, eb_blkno, buf);
if (!ret) {
- eb = (ocfs2_extent_block *)buf;
+ eb = (struct ocfs2_extent_block *)buf;
ret = insert_extent_el(ctxt, &eb->h_list);
}
@@ -258,8 +258,8 @@
errcode_t ret;
char *buf;
uint64_t blkno;
- ocfs2_extent_block *eb;
- ocfs2_extent_list *el;
+ struct ocfs2_extent_block *eb;
+ struct ocfs2_extent_list *el;
el = &ctxt->di->id2.i_list;
if (el->l_next_free_rec != el->l_count)
@@ -277,14 +277,15 @@
if (ret)
goto out;
- eb = (ocfs2_extent_block *)buf;
+ eb = (struct ocfs2_extent_block *)buf;
eb->h_list.l_tree_depth = el->l_tree_depth;
eb->h_list.l_next_free_rec = el->l_next_free_rec;
memcpy(eb->h_list.l_recs, el->l_recs,
- sizeof(ocfs2_extent_rec) * el->l_count);
+ sizeof(struct ocfs2_extent_rec) * el->l_count);
el->l_tree_depth++;
- memset(el->l_recs, 0, sizeof(ocfs2_extent_rec) * el->l_count);
+ memset(el->l_recs, 0,
+ sizeof(struct ocfs2_extent_rec) * el->l_count);
el->l_recs[0].e_cpos = 0;
el->l_recs[0].e_blkno = blkno;
el->l_recs[0].e_clusters = ctxt->di->i_clusters;
@@ -317,7 +318,7 @@
return ret;
ctxt.fs = fs;
- ctxt.di = (ocfs2_dinode *)buf;
+ ctxt.di = (struct ocfs2_dinode *)buf;
ret = ocfs2_read_inode(fs, ino, buf);
if (ret)
Modified: trunk/libocfs2/extent_map.c
===================================================================
--- trunk/libocfs2/extent_map.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/extent_map.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -58,8 +58,7 @@
while (*p)
{
parent = *p;
- ent = rb_entry(parent, ocfs2_extent_map_entry, e_node);
- if ((cpos + clusters) <= ent->e_rec.e_cpos) {
+ ent = rb_entry(parent, ocfs2_extent_map_entry, e_node); if ((cpos + clusters) <= ent->e_rec.e_cpos) {
p = &(*p)->rb_left;
ent = NULL;
} else if (cpos >= (ent->e_rec.e_cpos +
@@ -80,14 +79,14 @@
static errcode_t ocfs2_extent_map_find_leaf(ocfs2_cached_inode *cinode,
uint32_t cpos,
uint32_t clusters,
- ocfs2_extent_list *el)
+ struct ocfs2_extent_list *el)
{
errcode_t ret;
int i;
char *eb_buf = NULL;
uint64_t blkno;
- ocfs2_extent_block *eb;
- ocfs2_extent_rec *rec;
+ struct ocfs2_extent_block *eb;
+ struct ocfs2_extent_rec *rec;
if (el->l_tree_depth) {
ret = ocfs2_malloc_block(cinode->ci_fs->fs_io, &eb_buf);
@@ -154,7 +153,7 @@
if (ret)
goto out_free;
- eb = (ocfs2_extent_block *)eb_buf;
+ eb = (struct ocfs2_extent_block *)eb_buf;
el = &eb->h_list;
}
@@ -192,8 +191,8 @@
ocfs2_extent_map_entry *ent;
char *eb_buf = NULL;
ocfs2_extent_map *em = cinode->ci_map;
- ocfs2_extent_block *eb;
- ocfs2_extent_list *el;
+ struct ocfs2_extent_block *eb;
+ struct ocfs2_extent_list *el;
ent = ocfs2_extent_map_lookup(em, cpos, clusters, NULL, NULL);
if (ent) {
@@ -215,7 +214,7 @@
return ret;
}
- eb = (ocfs2_extent_block *)eb_buf;
+ eb = (struct ocfs2_extent_block *)eb_buf;
el = &eb->h_list;
} else
el = &cinode->ci_inode->id2.i_list;
@@ -254,7 +253,7 @@
}
errcode_t ocfs2_extent_map_insert(ocfs2_cached_inode *cinode,
- ocfs2_extent_rec *rec,
+ struct ocfs2_extent_rec *rec,
int tree_depth)
{
errcode_t ret;
@@ -291,7 +290,7 @@
goto out_free;
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; /* Same entry, just skip */
goto out_free;
}
@@ -375,7 +374,7 @@
*/
errcode_t ocfs2_extent_map_get_rec(ocfs2_cached_inode *cinode,
uint32_t cpos,
- ocfs2_extent_rec **rec)
+ struct ocfs2_extent_rec **rec)
{
errcode_t ret = OCFS2_ET_EXTENT_NOT_FOUND;
ocfs2_extent_map *em = cinode->ci_map;
@@ -453,7 +452,7 @@
ocfs2_filesys *fs = cinode->ci_fs;
int bpc = ocfs2_clusters_to_blocks(fs, 1);
ocfs2_extent_map_entry *ent = NULL;
- ocfs2_extent_rec *rec;
+ struct ocfs2_extent_rec *rec;
*p_blkno = 0;
@@ -522,7 +521,7 @@
static int extent_map_func(ocfs2_filesys *fs,
- ocfs2_extent_rec *rec,
+ struct ocfs2_extent_rec *rec,
int tree_depth,
uint32_t ccount,
uint64_t ref_blkno,
@@ -846,7 +845,7 @@
char *filename;
ocfs2_filesys *fs;
ocfs2_cached_inode *cinode;
- ocfs2_extent_rec *rec;
+ struct ocfs2_extent_rec *rec;
blkno = OCFS2_SUPER_BLOCK_BLKNO;
Modified: trunk/libocfs2/extents.c
===================================================================
--- trunk/libocfs2/extents.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/extents.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -34,19 +34,19 @@
#include "ocfs2.h"
-static void ocfs2_swap_extent_list_primary(ocfs2_extent_list *el)
+static void ocfs2_swap_extent_list_primary(struct ocfs2_extent_list *el)
{
el->l_tree_depth = bswap_16(el->l_tree_depth);
el->l_count = bswap_16(el->l_count);
el->l_next_free_rec = bswap_16(el->l_next_free_rec);
}
-static void ocfs2_swap_extent_list_secondary(ocfs2_extent_list *el)
+static void ocfs2_swap_extent_list_secondary(struct ocfs2_extent_list *el)
{
uint16_t i;
for(i = 0; i < el->l_next_free_rec; i++) {
- ocfs2_extent_rec *rec = &el->l_recs[i];
+ struct ocfs2_extent_rec *rec = &el->l_recs[i];
rec->e_cpos = bswap_32(rec->e_cpos);
rec->e_clusters = bswap_32(rec->e_clusters);
@@ -54,7 +54,7 @@
}
}
-void ocfs2_swap_extent_list_from_cpu(ocfs2_extent_list *el)
+void ocfs2_swap_extent_list_from_cpu(struct ocfs2_extent_list *el)
{
if (cpu_is_little_endian)
return;
@@ -62,7 +62,7 @@
ocfs2_swap_extent_list_secondary(el);
ocfs2_swap_extent_list_primary(el);
}
-void ocfs2_swap_extent_list_to_cpu(ocfs2_extent_list *el)
+void ocfs2_swap_extent_list_to_cpu(struct ocfs2_extent_list *el)
{
if (cpu_is_little_endian)
return;
@@ -71,7 +71,7 @@
ocfs2_swap_extent_list_secondary(el);
}
-static void ocfs2_swap_extent_block_header(ocfs2_extent_block *eb)
+static void ocfs2_swap_extent_block_header(struct ocfs2_extent_block *eb)
{
eb->h_suballoc_slot = bswap_16(eb->h_suballoc_slot);
@@ -81,7 +81,7 @@
eb->h_next_leaf_blk = bswap_64(eb->h_next_leaf_blk);
}
-static void ocfs2_swap_extent_block_from_cpu(ocfs2_extent_block *eb)
+static void ocfs2_swap_extent_block_from_cpu(struct ocfs2_extent_block *eb)
{
if (cpu_is_little_endian)
return;
@@ -89,7 +89,7 @@
ocfs2_swap_extent_block_header(eb);
ocfs2_swap_extent_list_from_cpu(&eb->h_list);
}
-static void ocfs2_swap_extent_block_to_cpu(ocfs2_extent_block *eb)
+static void ocfs2_swap_extent_block_to_cpu(struct ocfs2_extent_block *eb)
{
if (cpu_is_little_endian)
return;
@@ -98,12 +98,13 @@
ocfs2_swap_extent_list_to_cpu(&eb->h_list);
}
-errcode_t ocfs2_read_extent_block_nocheck(ocfs2_filesys *fs, uint64_t blkno,
+errcode_t ocfs2_read_extent_block_nocheck(ocfs2_filesys *fs,
+ uint64_t blkno,
char *eb_buf)
{
errcode_t ret;
char *blk;
- ocfs2_extent_block *eb;
+ struct ocfs2_extent_block *eb;
if ((blkno < OCFS2_SUPER_BLOCK_BLKNO) ||
(blkno > fs->fs_blocks))
@@ -117,7 +118,7 @@
if (ret)
goto out;
- eb = (ocfs2_extent_block *)blk;
+ eb = (struct ocfs2_extent_block *)blk;
if (memcmp(eb->h_signature, OCFS2_EXTENT_BLOCK_SIGNATURE,
strlen(OCFS2_EXTENT_BLOCK_SIGNATURE))) {
@@ -127,7 +128,7 @@
memcpy(eb_buf, blk, fs->fs_blocksize);
- eb = (ocfs2_extent_block *) eb_buf;
+ eb = (struct ocfs2_extent_block *) eb_buf;
ocfs2_swap_extent_block_to_cpu(eb);
out:
@@ -140,7 +141,8 @@
char *eb_buf)
{
errcode_t ret;
- ocfs2_extent_block *eb = (ocfs2_extent_block *)eb_buf;
+ struct ocfs2_extent_block *eb =
+ (struct ocfs2_extent_block *)eb_buf;
ret = ocfs2_read_extent_block_nocheck(fs, blkno, eb_buf);
@@ -155,7 +157,7 @@
{
errcode_t ret;
char *blk;
- ocfs2_extent_block *eb;
+ struct ocfs2_extent_block *eb;
if (!(fs->fs_flags & OCFS2_FLAG_RW))
return OCFS2_ET_RO_FILESYS;
@@ -170,7 +172,7 @@
memcpy(blk, eb_buf, fs->fs_blocksize);
- eb = (ocfs2_extent_block *) blk;
+ eb = (struct ocfs2_extent_block *) blk;
ocfs2_swap_extent_block_from_cpu(eb);
ret = io_write_block(fs->fs_io, blkno, 1, blk);
@@ -191,7 +193,7 @@
struct extent_context {
ocfs2_filesys *fs;
int (*func)(ocfs2_filesys *fs,
- ocfs2_extent_rec *rec,
+ struct ocfs2_extent_rec *rec,
int tree_depth,
uint32_t ccount,
uint64_t ref_blkno,
@@ -206,14 +208,14 @@
uint64_t last_eb_cpos;
};
-static int extent_iterate_eb(ocfs2_extent_rec *eb_rec,
+static int extent_iterate_eb(struct ocfs2_extent_rec *eb_rec,
int tree_depth, uint64_t ref_blkno,
int ref_recno,
struct extent_context *ctxt);
static int update_leaf_rec(struct extent_context *ctxt,
- ocfs2_extent_rec *before,
- ocfs2_extent_rec *current)
+ struct ocfs2_extent_rec *before,
+ struct ocfs2_extent_rec *current)
{
uint64_t start;
uint32_t len;
@@ -233,23 +235,25 @@
}
static int update_eb_rec(struct extent_context *ctxt,
- ocfs2_extent_rec *before,
- ocfs2_extent_rec *current)
+ struct ocfs2_extent_rec *before,
+ struct ocfs2_extent_rec *current)
{
if (current->e_clusters)
return 0;
- ctxt->errcode = ocfs2_delete_extent_block(ctxt->fs, before->e_blkno);
+ ctxt->errcode = ocfs2_delete_extent_block(ctxt->fs,
+ before->e_blkno);
if (ctxt->errcode)
return OCFS2_EXTENT_ERROR;
return 0;
}
-static int extent_iterate_el(ocfs2_extent_list *el, uint64_t ref_blkno,
+static int extent_iterate_el(struct ocfs2_extent_list *el,
+ uint64_t ref_blkno,
struct extent_context *ctxt)
{
- ocfs2_extent_rec before;
+ struct ocfs2_extent_rec before;
int iret = 0;
int i;
@@ -297,14 +301,14 @@
}
/* XXX this needs to be fixed to update the last extent block stuff */
-static int extent_iterate_eb(ocfs2_extent_rec *eb_rec,
+static int extent_iterate_eb(struct ocfs2_extent_rec *eb_rec,
int ref_tree_depth, uint64_t ref_blkno,
int ref_recno, struct extent_context *ctxt)
{
int iret = 0, changed = 0, flags;
int tree_depth = ref_tree_depth - 1;
- ocfs2_extent_block *eb;
- ocfs2_extent_list *el;
+ struct ocfs2_extent_block *eb;
+ struct ocfs2_extent_list *el;
if (!(ctxt->flags & OCFS2_EXTENT_FLAG_DEPTH_TRAVERSE) &&
!(ctxt->flags & OCFS2_EXTENT_FLAG_DATA_ONLY))
@@ -330,7 +334,7 @@
goto out;
}
- eb = (ocfs2_extent_block *)ctxt->eb_bufs[tree_depth];
+ eb = (struct ocfs2_extent_block *)ctxt->eb_bufs[tree_depth];
el = &eb->h_list;
if ((el->l_tree_depth != tree_depth) ||
@@ -370,11 +374,11 @@
errcode_t ocfs2_extent_iterate_inode(ocfs2_filesys *fs,
- ocfs2_dinode *inode,
+ struct ocfs2_dinode *inode,
int flags,
char *block_buf,
int (*func)(ocfs2_filesys *fs,
- ocfs2_extent_rec *rec,
+ struct ocfs2_extent_rec *rec,
int tree_depth,
uint32_t ccount,
uint64_t ref_blkno,
@@ -384,7 +388,7 @@
{
int i;
int iret = 0;
- ocfs2_extent_list *el;
+ struct ocfs2_extent_list *el;
errcode_t ret;
struct extent_context ctxt;
@@ -465,7 +469,7 @@
int flags,
char *block_buf,
int (*func)(ocfs2_filesys *fs,
- ocfs2_extent_rec *rec,
+ struct ocfs2_extent_rec *rec,
int tree_depth,
uint32_t ccount,
uint64_t ref_blkno,
@@ -474,7 +478,7 @@
void *priv_data)
{
char *buf = NULL;
- ocfs2_dinode *inode;
+ struct ocfs2_dinode *inode;
errcode_t ret;
ret = ocfs2_malloc_block(fs->fs_io, &buf);
@@ -485,7 +489,7 @@
if (ret)
goto out_buf;
- inode = (ocfs2_dinode *)buf;
+ inode = (struct ocfs2_dinode *)buf;
ret = ocfs2_extent_iterate_inode(fs, inode, flags, block_buf,
func, priv_data);
@@ -502,13 +506,13 @@
uint64_t bcount,
void *priv_data);
int flags;
- ocfs2_dinode *inode;
+ struct ocfs2_dinode *inode;
errcode_t errcode;
void *priv_data;
};
static int block_iterate_func(ocfs2_filesys *fs,
- ocfs2_extent_rec *rec,
+ struct ocfs2_extent_rec *rec,
int tree_depth,
uint32_t ccount,
uint64_t ref_blkno,
@@ -537,7 +541,7 @@
}
errcode_t ocfs2_block_iterate_inode(ocfs2_filesys *fs,
- ocfs2_dinode *inode,
+ struct ocfs2_dinode *inode,
int flags,
int (*func)(ocfs2_filesys *fs,
uint64_t blkno,
@@ -570,7 +574,7 @@
void *priv_data),
void *priv_data)
{
- ocfs2_dinode *inode;
+ struct ocfs2_dinode *inode;
errcode_t ret;
char *buf;
@@ -582,7 +586,7 @@
if (ret)
goto out_buf;
- inode = (ocfs2_dinode *)buf;
+ inode = (struct ocfs2_dinode *)buf;
ret = ocfs2_block_iterate_inode(fs, inode, flags, func, priv_data);
@@ -615,11 +619,11 @@
}
struct walk_it {
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
};
static int walk_extents_func(ocfs2_filesys *fs,
- ocfs2_extent_rec *rec,
+ struct ocfs2_extent_rec *rec,
int tree_depth,
uint32_t ccount,
uint64_t ref_blkno,
@@ -650,7 +654,7 @@
}
struct walk_block {
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
uint64_t last_block;
uint64_t run_first_blkno;
uint64_t run_first_bcount;
@@ -725,7 +729,7 @@
int walk_blocks = 0, walk_extents = 0;
char *filename, *buf, *eb_buf = NULL;
ocfs2_filesys *fs;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
struct walk_it wi;
struct walk_block wb;
@@ -796,7 +800,7 @@
goto out_free;
}
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
fprintf(stdout, "OCFS2 inode %"PRIu64" on \"%s\" has depth %"PRId16"\n",
blkno, filename, di->id2.i_list.l_tree_depth);
Modified: trunk/libocfs2/fileio.c
===================================================================
--- trunk/libocfs2/fileio.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/fileio.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -68,7 +68,7 @@
struct read_whole_context ctx;
errcode_t retval;
char *inode_buf;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
/* So the caller can see nothing was read */
*len = 0;
@@ -82,7 +82,7 @@
if (retval)
goto out_free;
- di = (ocfs2_dinode *)inode_buf;
+ di = (struct ocfs2_dinode *)inode_buf;
/* Arbitrary limit for our malloc */
retval = OCFS2_ET_INVALID_ARGUMENT;
Modified: trunk/libocfs2/getsize.c
===================================================================
--- trunk/libocfs2/getsize.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/getsize.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -295,6 +295,8 @@
#endif /* WIN32 */
#ifdef DEBUG_EXE
+#include <inttypes.h>
+
int main(int argc, char **argv)
{
uint64_t blocks;
Modified: trunk/libocfs2/heartbeat.c
===================================================================
--- trunk/libocfs2/heartbeat.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/heartbeat.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -49,8 +49,8 @@
uint64_t blkno, blocks, start_block;
uint32_t block_bits, cluster_bits;
int sectsize, sectsize_bits;
- ocfs2_dinode *di;
- ocfs2_extent_rec *rec;
+ struct ocfs2_dinode *di;
+ struct ocfs2_extent_rec *rec;
ret = ocfs2_get_device_sectsize(fs->fs_devname, §size);
if (ret)
@@ -73,7 +73,7 @@
if (ret)
goto leave;
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
if (di->id2.i_list.l_tree_depth ||
di->id2.i_list.l_next_free_rec != 1) {
ret = OCFS2_ET_BAD_HEARTBEAT_FILE;
Modified: trunk/libocfs2/include/extent_map.h
===================================================================
--- trunk/libocfs2/include/extent_map.h 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/include/extent_map.h 2005-11-17 22:00:21 UTC (rev 1127)
@@ -39,7 +39,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;
};
#endif /* _EXTENT_MAP_H */
Modified: trunk/libocfs2/include/ocfs1_fs_compat.h
===================================================================
--- trunk/libocfs2/include/ocfs1_fs_compat.h 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/include/ocfs1_fs_compat.h 2005-11-17 22:00:21 UTC (rev 1127)
@@ -13,19 +13,16 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License, version 2, as published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 021110-1307, USA.
- *
- * Authors: Kurt Hackel, Mark Fasheh, Sunil Mushran, Wim Coekaerts,
- * Manish Singh, Neeraj Goyal, Suchit Kaura, Joel Becker
*/
#ifndef _OCFS1_FS_COMPAT_H
@@ -36,8 +33,6 @@
#define OCFS1_MAX_VOL_ID_LENGTH 16
#define OCFS1_MAX_VOL_LABEL_LEN 64
#define OCFS1_MAX_CLUSTER_NAME_LEN 64
-#define OCFS1_MAX_IP_ADDR_LEN 32
-#define OCFS1_MAX_NODE_NAME_LENGTH 32
#define OCFS1_MAJOR_VERSION (2)
#define OCFS1_MINOR_VERSION (0)
@@ -46,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;
@@ -75,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;
@@ -92,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];
@@ -107,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: trunk/libocfs2/include/ocfs2.h
===================================================================
--- trunk/libocfs2/include/ocfs2.h 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/include/ocfs2.h 2005-11-17 22:00:21 UTC (rev 1127)
@@ -180,8 +180,8 @@
char *fs_devname;
uint32_t fs_flags;
io_channel *fs_io;
- ocfs2_dinode *fs_super;
- ocfs2_dinode *fs_orig_super;
+ struct ocfs2_dinode *fs_super;
+ struct ocfs2_dinode *fs_orig_super;
unsigned int fs_blocksize;
unsigned int fs_clustersize;
uint32_t fs_clusters;
@@ -208,7 +208,7 @@
struct _ocfs2_cached_inode {
struct _ocfs2_filesys *ci_fs;
uint64_t ci_blkno;
- ocfs2_dinode *ci_inode;
+ struct ocfs2_dinode *ci_inode;
ocfs2_extent_map *ci_map;
ocfs2_bitmap *ci_chains;
};
@@ -256,8 +256,8 @@
errcode_t ocfs2_close(ocfs2_filesys *fs);
void ocfs2_freefs(ocfs2_filesys *fs);
-void ocfs2_swap_inode_from_cpu(ocfs2_dinode *di);
-void ocfs2_swap_inode_to_cpu(ocfs2_dinode *di);
+void ocfs2_swap_inode_from_cpu(struct ocfs2_dinode *di);
+void ocfs2_swap_inode_to_cpu(struct ocfs2_dinode *di);
errcode_t ocfs2_read_inode(ocfs2_filesys *fs, uint64_t blkno,
char *inode_buf);
errcode_t ocfs2_write_inode(ocfs2_filesys *fs, uint64_t blkno,
@@ -271,13 +271,13 @@
errcode_t ocfs2_free_cached_inode(ocfs2_filesys *fs,
ocfs2_cached_inode *cinode);
-void ocfs2_swap_extent_list_from_cpu(ocfs2_extent_list *el);
-void ocfs2_swap_extent_list_to_cpu(ocfs2_extent_list *el);
+void ocfs2_swap_extent_list_from_cpu(struct ocfs2_extent_list *el);
+void ocfs2_swap_extent_list_to_cpu(struct ocfs2_extent_list *el);
errcode_t ocfs2_extent_map_init(ocfs2_filesys *fs,
ocfs2_cached_inode *cinode);
void ocfs2_extent_map_free(ocfs2_cached_inode *cinode);
errcode_t ocfs2_extent_map_insert(ocfs2_cached_inode *cinode,
- ocfs2_extent_rec *rec,
+ struct ocfs2_extent_rec *rec,
int tree_depth);
errcode_t ocfs2_extent_map_drop(ocfs2_cached_inode *cinode,
uint32_t new_clusters);
@@ -285,7 +285,7 @@
uint32_t new_clusters);
errcode_t ocfs2_extent_map_get_rec(ocfs2_cached_inode *cinode,
uint32_t cpos,
- ocfs2_extent_rec **rec);
+ struct ocfs2_extent_rec **rec);
errcode_t ocfs2_extent_map_get_clusters(ocfs2_cached_inode *cinode,
uint32_t v_cpos, int count,
uint32_t *p_cpos,
@@ -319,7 +319,7 @@
int flags,
char *block_buf,
int (*func)(ocfs2_filesys *fs,
- ocfs2_extent_rec *rec,
+ struct ocfs2_extent_rec *rec,
int tree_depth,
uint32_t ccount,
uint64_t ref_blkno,
@@ -327,11 +327,11 @@
void *priv_data),
void *priv_data);
errcode_t ocfs2_extent_iterate_inode(ocfs2_filesys *fs,
- ocfs2_dinode *inode,
+ struct ocfs2_dinode *inode,
int flags,
char *block_buf,
int (*func)(ocfs2_filesys *fs,
- ocfs2_extent_rec *rec,
+ struct ocfs2_extent_rec *rec,
int tree_depth,
uint32_t ccount,
uint64_t ref_blkno,
@@ -347,7 +347,7 @@
void *priv_data),
void *priv_data);
errcode_t ocfs2_block_iterate_inode(ocfs2_filesys *fs,
- ocfs2_dinode *inode,
+ struct ocfs2_dinode *inode,
int flags,
int (*func)(ocfs2_filesys *fs,
uint64_t blkno,
@@ -456,7 +456,7 @@
errcode_t ocfs2_get_ocfs1_label(char *device, uint8_t *label, uint16_t label_len,
uint8_t *uuid, uint16_t uuid_len);
-void ocfs2_swap_group_desc(ocfs2_group_desc *gd);
+void ocfs2_swap_group_desc(struct ocfs2_group_desc *gd);
errcode_t ocfs2_read_group_desc(ocfs2_filesys *fs, uint64_t blkno,
char *gd_buf);
@@ -508,7 +508,8 @@
errcode_t ocfs2_test_inode_allocated(ocfs2_filesys *fs, uint64_t blkno,
int *is_allocated);
-void ocfs2_init_group_desc(ocfs2_filesys *fs, ocfs2_group_desc *gd,
+void ocfs2_init_group_desc(ocfs2_filesys *fs,
+ struct ocfs2_group_desc *gd,
uint64_t blkno, uint32_t generation,
uint64_t parent_inode, uint16_t bits,
uint16_t chain);
Modified: trunk/libocfs2/include/ocfs2_fs.h
===================================================================
--- trunk/libocfs2/include/ocfs2_fs.h 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/include/ocfs2_fs.h 2005-11-17 22:00:21 UTC (rev 1127)
@@ -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: trunk/libocfs2/inode.c
===================================================================
--- trunk/libocfs2/inode.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/inode.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -36,7 +36,7 @@
errcode_t ocfs2_check_directory(ocfs2_filesys *fs, uint64_t dir)
{
- ocfs2_dinode *inode;
+ struct ocfs2_dinode *inode;
char *buf;
errcode_t ret;
@@ -52,7 +52,7 @@
if (ret)
goto out_buf;
- inode = (ocfs2_dinode *)buf;
+ inode = (struct ocfs2_dinode *)buf;
if (!S_ISDIR(inode->i_mode))
ret = OCFS2_ET_NO_DIRECTORY;
@@ -62,15 +62,15 @@
return ret;
}
-static void ocfs2_swap_inode_third(ocfs2_dinode *di)
+static void ocfs2_swap_inode_third(struct ocfs2_dinode *di)
{
if (di->i_flags & OCFS2_CHAIN_FL) {
- ocfs2_chain_list *cl = &di->id2.i_chain;
+ struct ocfs2_chain_list *cl = &di->id2.i_chain;
uint16_t i;
for (i = 0; i < cl->cl_next_free_rec; i++) {
- ocfs2_chain_rec *rec = &cl->cl_recs[i];
+ struct ocfs2_chain_rec *rec = &cl->cl_recs[i];
rec->c_free = bswap_32(rec->c_free);
rec->c_total = bswap_32(rec->c_total);
@@ -78,11 +78,12 @@
}
} else if (di->i_flags & OCFS2_DEALLOC_FL) {
- ocfs2_truncate_log *tl = &di->id2.i_dealloc;
+ struct ocfs2_truncate_log *tl = &di->id2.i_dealloc;
uint16_t i;
for(i = 0; i < tl->tl_count; i++) {
- ocfs2_truncate_rec *rec = &tl->tl_recs[i];
+ struct ocfs2_truncate_rec *rec =
+ &tl->tl_recs[i];
rec->t_start = bswap_32(rec->t_start);
rec->t_clusters = bswap_32(rec->t_clusters);
@@ -90,7 +91,7 @@
}
}
-static void ocfs2_swap_inode_second(ocfs2_dinode *di)
+static void ocfs2_swap_inode_second(struct ocfs2_dinode *di)
{
if (S_ISCHR(di->i_mode) || S_ISBLK(di->i_mode))
di->id1.dev1.i_rdev = bswap_64(di->id1.dev1.i_rdev);
@@ -103,7 +104,7 @@
/* we need to be careful to swap the union member that is in use.
* first the ones that are explicitly marked with flags.. */
if (di->i_flags & OCFS2_SUPER_BLOCK_FL) {
- ocfs2_super_block *sb = &di->id2.i_super;
+ struct ocfs2_super_block *sb = &di->id2.i_super;
sb->s_major_rev_level = bswap_16(sb->s_major_rev_level);
sb->s_minor_rev_level = bswap_16(sb->s_minor_rev_level);
@@ -125,13 +126,13 @@
sb->s_first_cluster_group = bswap_64(sb->s_first_cluster_group);
} else if (di->i_flags & OCFS2_LOCAL_ALLOC_FL) {
- ocfs2_local_alloc *la = &di->id2.i_lab;
+ struct ocfs2_local_alloc *la = &di->id2.i_lab;
la->la_bm_off = bswap_32(la->la_bm_off);
la->la_size = bswap_16(la->la_size);
} else if (di->i_flags & OCFS2_CHAIN_FL) {
- ocfs2_chain_list *cl = &di->id2.i_chain;
+ struct ocfs2_chain_list *cl = &di->id2.i_chain;
cl->cl_cpg = bswap_16(cl->cl_cpg);
cl->cl_bpc = bswap_16(cl->cl_bpc);
@@ -139,14 +140,14 @@
cl->cl_next_free_rec = bswap_16(cl->cl_next_free_rec);
} else if (di->i_flags & OCFS2_DEALLOC_FL) {
- ocfs2_truncate_log *tl = &di->id2.i_dealloc;
+ struct ocfs2_truncate_log *tl = &di->id2.i_dealloc;
tl->tl_count = bswap_16(tl->tl_count);
tl->tl_used = bswap_16(tl->tl_used);
}
}
-static void ocfs2_swap_inode_first(ocfs2_dinode *di)
+static void ocfs2_swap_inode_first(struct ocfs2_dinode *di)
{
di->i_generation = bswap_32(di->i_generation);
di->i_suballoc_slot = bswap_16(di->i_suballoc_slot);
@@ -170,7 +171,7 @@
di->i_mtime_nsec = bswap_32(di->i_mtime_nsec);
}
-static int has_extents(ocfs2_dinode *di)
+static int has_extents(struct ocfs2_dinode *di)
{
/* inodes flagged with other stuff in id2 */
if (di->i_flags & (OCFS2_SUPER_BLOCK_FL | OCFS2_LOCAL_ALLOC_FL |
@@ -183,7 +184,7 @@
return 1;
}
-void ocfs2_swap_inode_from_cpu(ocfs2_dinode *di)
+void ocfs2_swap_inode_from_cpu(struct ocfs2_dinode *di)
{
if (cpu_is_little_endian)
return;
@@ -195,7 +196,7 @@
ocfs2_swap_inode_first(di);
}
-void ocfs2_swap_inode_to_cpu(ocfs2_dinode *di)
+void ocfs2_swap_inode_to_cpu(struct ocfs2_dinode *di)
{
if (cpu_is_little_endian)
return;
@@ -212,7 +213,7 @@
{
errcode_t ret;
char *blk;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
if ((blkno < OCFS2_SUPER_BLOCK_BLKNO) ||
(blkno > fs->fs_blocks))
@@ -226,7 +227,7 @@
if (ret)
goto out;
- di = (ocfs2_dinode *)blk;
+ di = (struct ocfs2_dinode *)blk;
ret = OCFS2_ET_BAD_INODE_MAGIC;
if (memcmp(di->i_signature, OCFS2_INODE_SIGNATURE,
@@ -235,7 +236,7 @@
memcpy(inode_buf, blk, fs->fs_blocksize);
- di = (ocfs2_dinode *) inode_buf;
+ di = (struct ocfs2_dinode *) inode_buf;
ocfs2_swap_inode_to_cpu(di);
ret = 0;
@@ -250,7 +251,7 @@
{
errcode_t ret;
char *blk;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
if (!(fs->fs_flags & OCFS2_FLAG_RW))
return OCFS2_ET_RO_FILESYS;
@@ -265,7 +266,7 @@
memcpy(blk, inode_buf, fs->fs_blocksize);
- di = (ocfs2_dinode *)blk;
+ di = (struct ocfs2_dinode *)blk;
ocfs2_swap_inode_from_cpu(di);
ret = io_write_block(fs->fs_io, blkno, 1, blk);
@@ -312,7 +313,7 @@
uint64_t blkno;
char *filename, *buf;
ocfs2_filesys *fs;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
blkno = OCFS2_SUPER_BLOCK_BLKNO;
@@ -355,7 +356,7 @@
goto out_free;
}
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
fprintf(stdout, "OCFS2 inode %"PRIu64" on \"%s\"\n", blkno,
filename);
Modified: trunk/libocfs2/inode_scan.c
===================================================================
--- trunk/libocfs2/inode_scan.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/inode_scan.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -43,9 +43,9 @@
int next_inode_file;
ocfs2_cached_inode *cur_inode_alloc;
ocfs2_cached_inode **inode_alloc;
- ocfs2_chain_rec *cur_rec;
+ struct ocfs2_chain_rec *cur_rec;
int next_rec;
- ocfs2_group_desc *cur_desc;
+ struct ocfs2_group_desc *cur_desc;
unsigned int count;
uint64_t cur_blkno;
char *group_buffer;
@@ -111,7 +111,7 @@
*/
static errcode_t get_next_chain(ocfs2_inode_scan *scan)
{
- ocfs2_dinode *di = scan->cur_inode_alloc->ci_inode;
+ struct ocfs2_dinode *di = scan->cur_inode_alloc->ci_inode;
if (scan->next_rec == di->id2.i_chain.cl_next_free_rec) {
if (!scan->next_rec) {
@@ -383,7 +383,7 @@
uint64_t blkno;
char *filename, *buf;
ocfs2_filesys *fs;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
ocfs2_inode_scan *scan;
initialize_ocfs_error_table();
@@ -409,7 +409,7 @@
goto out_close;
}
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
ret = ocfs2_open_inode_scan(fs, &scan);
if (ret) {
Modified: trunk/libocfs2/link.c
===================================================================
--- trunk/libocfs2/link.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/link.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -34,12 +34,12 @@
struct link_struct {
- const char *name;
- int namelen;
- uint64_t inode;
- int flags;
- int done;
- ocfs2_dinode *sb;
+ const char *name;
+ int namelen;
+ uint64_t inode;
+ int flags;
+ int done;
+ struct ocfs2_dinode *sb;
};
static int link_proc(struct ocfs2_dir_entry *dirent,
Modified: trunk/libocfs2/namei.c
===================================================================
--- trunk/libocfs2/namei.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/namei.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -51,8 +51,8 @@
char *pathname;
char *buffer = NULL;
errcode_t ret;
- ocfs2_dinode *di = NULL;
- ocfs2_extent_list *el;
+ struct ocfs2_dinode *di = NULL;
+ struct ocfs2_extent_list *el;
uint64_t blkno;
#ifdef NAMEI_DEBUG
Modified: trunk/libocfs2/openfs.c
===================================================================
--- trunk/libocfs2/openfs.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/openfs.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -45,7 +45,7 @@
{
errcode_t ret;
char *blk;
- ocfs1_vol_disk_hdr *hdr;
+ struct ocfs1_vol_disk_hdr *hdr;
ret = ocfs2_malloc_block(fs->fs_io, &blk);
if (ret)
@@ -54,7 +54,7 @@
ret = io_read_block(fs->fs_io, 0, 1, blk);
if (ret)
goto out;
- hdr = (ocfs1_vol_disk_hdr *)blk;
+ hdr = (struct ocfs1_vol_disk_hdr *)blk;
ret = OCFS2_ET_OCFS_REV;
if (le32_to_cpu(hdr->major_version) == OCFS1_MAJOR_VERSION)
@@ -75,7 +75,7 @@
{
errcode_t ret;
char *blk;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
ret = ocfs2_malloc_block(fs->fs_io, &blk);
if (ret)
@@ -84,7 +84,7 @@
ret = io_read_block(fs->fs_io, superblock, 1, blk);
if (ret)
goto out_blk;
- di = (ocfs2_dinode *)blk;
+ di = (struct ocfs2_dinode *)blk;
ret = OCFS2_ET_BAD_MAGIC;
if (memcmp(di->i_signature, OCFS2_SUPER_BLOCK_SIGNATURE,
@@ -106,13 +106,13 @@
{
errcode_t ret;
char *blk;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
if (!(fs->fs_flags & OCFS2_FLAG_RW))
return OCFS2_ET_RO_FILESYS;
blk = (char *)fs->fs_super;
- di = (ocfs2_dinode *)blk;
+ di = (struct ocfs2_dinode *)blk;
ret = OCFS2_ET_BAD_MAGIC;
if (memcmp(di->i_signature, OCFS2_SUPER_BLOCK_SIGNATURE,
Modified: trunk/libocfs2/truncate.c
===================================================================
--- trunk/libocfs2/truncate.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/libocfs2/truncate.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -38,7 +38,8 @@
* _CHANGED. It will delete unused extent blocks and file
* data for us. This only works with DEPTH_TRAVERSE..
*/
-static int truncate_iterate(ocfs2_filesys *fs, ocfs2_extent_rec *rec,
+static int truncate_iterate(ocfs2_filesys *fs,
+ struct ocfs2_extent_rec *rec,
int tree_depth, uint32_t ccount,
uint64_t ref_blkno, int ref_recno,
void *priv_data)
@@ -67,7 +68,7 @@
{
errcode_t ret;
char *buf;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
uint32_t new_i_clusters;
uint64_t new_i_blocks;
@@ -78,7 +79,7 @@
ret = ocfs2_read_inode(fs, ino, buf);
if (ret)
goto out;
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
if (di->i_size == new_i_size)
goto out;
Modified: trunk/mkfs.ocfs2/mkfs.c
===================================================================
--- trunk/mkfs.ocfs2/mkfs.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/mkfs.ocfs2/mkfs.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -1267,7 +1267,7 @@
void *buf = NULL;
int i, found, chain;
AllocGroup *group;
- ocfs2_group_desc *gd = NULL;
+ struct ocfs2_group_desc *gd = NULL;
unsigned int size;
found = 0;
@@ -1546,7 +1546,7 @@
format_superblock(State *s, SystemFileDiskRecord *rec,
SystemFileDiskRecord *root_rec, SystemFileDiskRecord *sys_rec)
{
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
uint32_t incompat;
uint64_t super_off = rec->fe_off;
@@ -1625,7 +1625,7 @@
static void
format_file(State *s, SystemFileDiskRecord *rec)
{
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
int mode, i;
uint32_t clusters;
AllocBitmap *bitmap;
@@ -1759,7 +1759,7 @@
{
int i;
uint64_t parent_blkno;
- ocfs2_group_desc *gd;
+ struct ocfs2_group_desc *gd;
char *buf = NULL;
buf = do_malloc(s, s->cluster_size);
@@ -1776,7 +1776,7 @@
* blkno until now. */
gd->bg_parent_dinode = parent_blkno;
memcpy(buf, gd, s->blocksize);
- ocfs2_swap_group_desc((ocfs2_group_desc *)buf);
+ ocfs2_swap_group_desc((struct ocfs2_group_desc *)buf);
do_pwrite(s, buf, s->cluster_size,
gd->bg_blkno << s->blocksize_bits);
}
@@ -1831,8 +1831,8 @@
format_leading_space(State *s)
{
int num_blocks = 2, size;
- ocfs1_vol_disk_hdr *hdr;
- ocfs1_vol_label *lbl;
+ struct ocfs1_vol_disk_hdr *hdr;
+ struct ocfs1_vol_label *lbl;
void *buf;
char *p;
@@ -1846,7 +1846,7 @@
strcpy(hdr->mount_point, "this is an ocfs2 volume");
p += 512;
- lbl = (ocfs1_vol_label *)p;
+ lbl = (struct ocfs1_vol_label *)p;
strcpy(lbl->label, "this is an ocfs2 volume");
strcpy(lbl->cluster_name, "this is an ocfs2 volume");
Modified: trunk/mkfs.ocfs2/mkfs.h
===================================================================
--- trunk/mkfs.ocfs2/mkfs.h 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/mkfs.ocfs2/mkfs.h 2005-11-17 22:00:21 UTC (rev 1127)
@@ -121,7 +121,7 @@
struct _AllocGroup {
char *name;
- ocfs2_group_desc *gd;
+ struct ocfs2_group_desc *gd;
SystemFileDiskRecord *alloc_inode;
uint32_t chain_free;
uint32_t chain_total;
Modified: trunk/ocfs2console/ocfs2interface/ocfs2module.c
===================================================================
--- trunk/ocfs2console/ocfs2interface/ocfs2module.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/ocfs2console/ocfs2interface/ocfs2module.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -49,7 +49,7 @@
typedef struct {
PyObject_HEAD
Filesystem *fs_obj;
- ocfs2_dinode dinode;
+ struct ocfs2_dinode dinode;
} DInode;
typedef struct {
@@ -61,7 +61,7 @@
typedef struct {
PyObject_HEAD
Filesystem *fs_obj;
- ocfs2_super_block super;
+ struct ocfs2_super_block super;
} SuperBlock;
typedef struct {
@@ -217,7 +217,7 @@
static PyObject *
dinode_new (Filesystem *fs_obj,
- ocfs2_dinode *dinode)
+ struct ocfs2_dinode *dinode)
{
DInode *self;
@@ -451,7 +451,7 @@
static PyObject *
super_new (Filesystem *fs_obj,
- ocfs2_dinode *fs_super)
+ struct ocfs2_dinode *fs_super)
{
SuperBlock *self;
Modified: trunk/tunefs.ocfs2/tunefs.c
===================================================================
--- trunk/tunefs.ocfs2/tunefs.c 2005-11-15 21:17:37 UTC (rev 1126)
+++ trunk/tunefs.ocfs2/tunefs.c 2005-11-17 22:00:21 UTC (rev 1127)
@@ -420,7 +420,7 @@
errcode_t ret;
char *buf = NULL;
uint64_t blkno;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
int i;
int cs_bits = OCFS2_RAW_SB(fs->fs_super)->s_clustersize_bits;
uint16_t max_slots = OCFS2_RAW_SB(fs->fs_super)->s_max_slots;
@@ -442,7 +442,7 @@
if (ret)
goto bail;
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
*jrnl_size = MAX(*jrnl_size, (di->i_clusters << cs_bits));
@@ -561,7 +561,7 @@
uint16_t max_slots = OCFS2_RAW_SB(fs->fs_super)->s_max_slots;
uint32_t num_clusters;
char *buf = NULL;
- ocfs2_dinode *di;
+ struct ocfs2_dinode *di;
num_clusters = opts.jrnl_size >>
OCFS2_RAW_SB(fs->fs_super)->s_clustersize_bits;
@@ -584,7 +584,7 @@
if (ret)
goto bail;
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
if (num_clusters <= di->i_clusters)
continue;
@@ -600,7 +600,7 @@
if (ret)
goto bail;
- di = (ocfs2_dinode *)buf;
+ di = (struct ocfs2_dinode *)buf;
di->i_size = di->i_clusters <<
OCFS2_RAW_SB(fs->fs_super)->s_clustersize_bits;
di->i_mtime = time(NULL);
More information about the Ocfs2-tools-commits
mailing list