read_wbuf(fd, buf, mp);
ASSERT(buf->length >= length);
- ag->xfs_sb = (xfs_dsb_t *) (buf->data + diff);
+ ag->xfs_sb = (struct xfs_dsb *) (buf->data + diff);
ASSERT(be32_to_cpu(ag->xfs_sb->sb_magicnum) == XFS_SB_MAGIC);
ag->xfs_agf = (xfs_agf_t *) (buf->data + diff + sectorsize);
ASSERT(be32_to_cpu(ag->xfs_agf->agf_magicnum) == XFS_AGF_MAGIC);
* each of which is an AG and has an ag_header at the beginning.
*/
typedef struct ag_header {
- xfs_dsb_t *xfs_sb; /* superblock for filesystem or AG */
+ struct xfs_dsb *xfs_sb; /* superblock for filesystem or AG */
xfs_agf_t *xfs_agf; /* free space info */
xfs_agi_t *xfs_agi; /* free inode info */
struct xfs_agfl *xfs_agfl; /* AG freelist */
* Superblock - on disk version. Must match the in core version above.
* Must be padded to 64 bit alignment.
*/
-typedef struct xfs_dsb {
+struct xfs_dsb {
__be32 sb_magicnum; /* magic number == XFS_SB_MAGIC */
__be32 sb_blocksize; /* logical block size, bytes */
__be64 sb_dblocks; /* number of data blocks */
uuid_t sb_meta_uuid; /* metadata file system unique id */
/* must be padded to 64 bit alignment */
-} xfs_dsb_t;
+};
/*
* Misc. Flags - warning - these will be cleared by xfs_repair unless
static void
__xfs_sb_from_disk(
struct xfs_sb *to,
- xfs_dsb_t *from,
+ struct xfs_dsb *from,
bool convert_xquota)
{
to->sb_magicnum = be32_to_cpu(from->sb_magicnum);
void
xfs_sb_from_disk(
struct xfs_sb *to,
- xfs_dsb_t *from)
+ struct xfs_dsb *from)
{
__xfs_sb_from_disk(to, from, true);
}
* Conjure up a mount structure
*/
sb = &mp->m_sb;
- libxfs_sb_from_disk(sb, (xfs_dsb_t *)buf);
+ libxfs_sb_from_disk(sb, (struct xfs_dsb *)buf);
mp->m_features |= libxfs_sb_version_to_features(&mp->m_sb);
mp->m_blkbb_log = sb->sb_blocklog - BBSHIFT;
if (fread(block_buffer, mb_count << mbp->mb_blocklog, 1, src_f) != 1)
fatal("error reading from metadump file\n");
- libxfs_sb_from_disk(&sb, (xfs_dsb_t *)block_buffer);
+ libxfs_sb_from_disk(&sb, (struct xfs_dsb *)block_buffer);
if (sb.sb_magicnum != XFS_SB_MAGIC)
fatal("bad magic number for primary superblock\n");
sb.sb_sectsize > max_indices * block_size)
fatal("bad sector size %u in metadump image\n", sb.sb_sectsize);
- ((xfs_dsb_t*)block_buffer)->sb_inprogress = 1;
+ ((struct xfs_dsb*)block_buffer)->sb_inprogress = 1;
if (is_target_file) {
/* ensure regular files are correctly sized */
memset(block_buffer, 0, sb.sb_sectsize);
sb.sb_inprogress = 0;
- libxfs_sb_to_disk((xfs_dsb_t *)block_buffer, &sb);
+ libxfs_sb_to_disk((struct xfs_dsb *)block_buffer, &sb);
if (xfs_sb_version_hascrc(&sb)) {
xfs_update_cksum(block_buffer, sb.sb_sectsize,
offsetof(struct xfs_sb, sb_crc));
*/
for (i = 0; !done && i < bsize; i += BBSIZE) {
c_bufsb = (char *)sb + i;
- libxfs_sb_from_disk(&bufsb, (xfs_dsb_t *)c_bufsb);
+ libxfs_sb_from_disk(&bufsb, (struct xfs_dsb *)c_bufsb);
if (verify_sb(c_bufsb, &bufsb, 0) != XR_OK)
continue;
void
write_primary_sb(xfs_sb_t *sbp, int size)
{
- xfs_dsb_t *buf;
+ struct xfs_dsb *buf;
if (no_modify)
return;
get_sb(xfs_sb_t *sbp, xfs_off_t off, int size, xfs_agnumber_t agno)
{
int error, rval;
- xfs_dsb_t *buf;
+ struct xfs_dsb *buf;
buf = memalign(libxfs_device_alignment(), size);
if (buf == NULL) {