xfs
[Top] [All Lists]

Re: Unable to match the Magic Number

To: KrishnaPradeep Tamma <krishnapradeep@xxxxxxxxx>
Subject: Re: Unable to match the Magic Number
From: Luciano Chavez <lnx1138@xxxxxxxxxx>
Date: Mon, 11 Apr 2005 16:03:07 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <2ca133d205041110111e3a43d5@xxxxxxxxxxxxxx>
Organization: IBM
References: <2ca133d205041110111e3a43d5@xxxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
Endianess problem maybe? What arch?

On Mon, 2005-04-11 at 12:11 -0500, KrishnaPradeep Tamma wrote:
> Hi,
> 
> 
> I am not able to read the super block using the following code. Can
> some one help in reading the super block.
> 
> read_block is a routine of a driver and debug is just a print statement.
> 
> XFS created different allocation groups, and when I try to read the
> first block of each allocation group the number returned is the same
> but not equal to Magic Number.
> 
>     if ((data = read_block(XFS_SB_DADDR)) != NULL) {
> 
>                 xfs_sb_t *xsb = (xfs_sb_t *)data;
>     
>                 if( xsb->magicnum == XFS_SB_MAGIC)
>                 {
>                         debug(1,"SUCCESS ! Found xfs superblock\n");
>                 }
>                 else
>                 {
>                         debug(1,"FAILED Not Found xfs superblock\n");
>                 }
>         }
>         else
>         {
>                         debug(1,"NULL Not Found xfs superblock\n");
>         }
> 
> 
> Thanks
> Pradeep
> 
> 
> 
-- 
Luciano Chavez <lnx1138@xxxxxxxxxx>
IBM


<Prev in Thread] Current Thread [Next in Thread>