xfs
[Top] [All Lists]

Re: [DMAPI] code error in dm_ip_to_handle()

To: Aurelien Degremont - Stagiaire <degremont@xxxxxxxxxxx>
Subject: Re: [DMAPI] code error in dm_ip_to_handle()
From: Dean Roehrich <roehrich@xxxxxxx>
Date: Mon, 16 May 2005 09:49:14 -0500
Cc: linux-xfs@xxxxxxxxxxx
Sender: linux-xfs-bounce@xxxxxxxxxxx
>From:  Aurelien Degremont - Stagiaire <degremont@xxxxxxxxxxx>
>
>To sum up :
>  - inode_to_fh() only need to fill a dmfsfid (currently :)) with 
>something like that :
>
>         fid.dm_fid_len = sizeof(dm_fid_t) - sizeof(fid.dm_fid_len);
>         fid.dm_fid_pad = 0;
>         fid.dm_fid_gen = ip->i_generation;
>         fid.dm_fid_ino = ip->i_ino;
>         memcpy(dmfsfid, &fid, sizeof(fid));
>
>(The dm_fid_len don't need to be set to 0)

Okay.

>  - fh_to_inode() must test the fid_len field and return the root inode 
>number if its value is zero.

No.  fh_to_inode() doesn't have to modify the dm_fsfid at all.  It just needs
to check that it refers to a valid inode, and then it needs to return that
inode.

Dean


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