From: rpeterso@sourceware.org <rpeterso@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/gfs2/convert gfs2_convert.c
Date: 17 Jul 2006 22:06:19 -0000 [thread overview]
Message-ID: <20060717220619.905.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rpeterso at sourceware.org 2006-07-17 22:06:19
Modified files:
gfs2/convert : gfs2_convert.c
Log message:
Accomodate changes Steve Whitehouse made to gfs2's dinode structure.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/convert/gfs2_convert.c.diff?cvsroot=cluster&r1=1.4&r2=1.5
--- cluster/gfs2/convert/gfs2_convert.c 2006/06/19 20:46:17 1.4
+++ cluster/gfs2/convert/gfs2_convert.c 2006/07/17 22:06:18 1.5
@@ -35,6 +35,8 @@
#include "libgfs2.h"
#include "global.h"
+/* The following declares are needed because gfs2 can't have */
+/* dependencies on gfs1: */
#define RGRP_STUFFED_BLKS(sb) (((sb)->sb_bsize - sizeof(struct gfs2_rgrp)) * GFS2_NBBY)
#define RGRP_BITMAP_BLKS(sb) (((sb)->sb_bsize - sizeof(struct gfs2_meta_header)) * GFS2_NBBY)
@@ -117,6 +119,52 @@
char sb_reserved[96];
};
+struct gfs1_dinode {
+ struct gfs2_meta_header di_header;
+
+ struct gfs2_inum di_num; /* formal inode # and block address */
+
+ uint32_t di_mode; /* mode of file */
+ uint32_t di_uid; /* owner's user id */
+ uint32_t di_gid; /* owner's group id */
+ uint32_t di_nlink; /* number (qty) of links to this file */
+ uint64_t di_size; /* number (qty) of bytes in file */
+ uint64_t di_blocks; /* number (qty) of blocks in file */
+ int64_t di_atime; /* time last accessed */
+ int64_t di_mtime; /* time last modified */
+ int64_t di_ctime; /* time last changed */
+
+ /* Non-zero only for character or block device nodes */
+ uint32_t di_major; /* device major number */
+ uint32_t di_minor; /* device minor number */
+
+ /* Block allocation strategy */
+ uint64_t di_rgrp; /* dinode rgrp block number */
+ uint64_t di_goal_rgrp; /* rgrp to alloc from next */
+ uint32_t di_goal_dblk; /* data block goal */
+ uint32_t di_goal_mblk; /* metadata block goal */
+
+ uint32_t di_flags; /* GFS_DIF_... */
+
+ /* struct gfs_rindex, struct gfs_jindex, or struct gfs_dirent */
+ uint32_t di_payload_format; /* GFS_FORMAT_... */
+ uint16_t di_type; /* GFS_FILE_... type of file */
+ uint16_t di_height; /* height of metadata (0 == stuffed) */
+ uint32_t di_incarn; /* incarnation (unused, see gfs_meta_header) */
+ uint16_t di_pad;
+
+ /* These only apply to directories */
+ uint16_t di_depth; /* Number of bits in the table */
+ uint32_t di_entries; /* The # (qty) of entries in the directory */
+
+ /* This formed an on-disk chain of unused dinodes */
+ struct gfs2_inum di_next_unused; /* used in old versions only */
+
+ uint64_t di_eattr; /* extended attribute block number */
+
+ char di_reserved[56];
+};
+
struct inode_block {
osi_list_t list;
uint64_t di_addr;
@@ -282,10 +330,13 @@
/* don't want to shift the data around. */
/* ----------------------------------------------------------- */
if (inode_was_gfs1) {
+ struct gfs1_dinode *gfs1_dinode_struct;
+
+ gfs1_dinode_struct = (struct gfs1_dinode *)&inode->i_di;
inode->i_di.di_goal_meta = inode->i_di.di_goal_data;
inode->i_di.di_goal_data = 0; /* make sure the upper 32b are 0 */
- inode->i_di.di_goal_data = inode->i_di.__pad[0];
- inode->i_di.__pad[1] = 0;
+ inode->i_di.di_goal_data = gfs1_dinode_struct->di_goal_dblk;
+ inode->i_di.di_generation = 0;
}
gfs2_dinode_out(&inode->i_di, bh->b_data);
next reply other threads:[~2006-07-17 22:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-17 22:06 rpeterso [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-11-15 20:16 [Cluster-devel] cluster/gfs2/convert gfs2_convert.c rpeterso
2006-11-08 21:15 rpeterso
2006-11-08 21:14 rpeterso
2006-08-14 2:03 rpeterso
2006-08-11 23:22 rpeterso
2006-06-19 20:46 rpeterso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060717220619.905.qmail@sourceware.org \
--to=rpeterso@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.