| To: | Dean Roehrich <roehrich@xxxxxxx>, linux-xfs@xxxxxxxxxxx |
|---|---|
| Subject: | Re: [DMAPI] code error in dm_ip_to_handle() |
| From: | Aurelien Degremont - Stagiaire <degremont@xxxxxxxxxxx> |
| Date: | Mon, 16 May 2005 16:00:55 +0200 |
| In-reply-to: | <20050516133804.AD8574FE8A@xxxxxxxxxxxxxxxxxxxxxxxx> |
| References: | <20050516133804.AD8574FE8A@xxxxxxxxxxxxxxxxxxxxxxxx> |
| Sender: | linux-xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.2.1) Gecko/20030225 |
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)
- fh_to_inode() must test the fid_len field and return the root inode
number if its value is zero.
dm_fid_t fid;
/* FS HANDLE */
if (dmfsfid->fid_len == 0)
ino = EXT3_ROOT_INO;
/* FILE HANDLE */
else
{
memcpy(&fid, dmfsfid, sizeof(fid));
ino = fid.dm_fid_ino; /* Some alignement checks ? */
}
The other modification are managed by the DMAPI code and the FS code
don't need to bother with it ?
Aurelien |
| Previous by Date: | Re: [DMAPI] code error in dm_ip_to_handle(), Dean Roehrich |
|---|---|
| Next by Date: | Re: [DMAPI] code error in dm_ip_to_handle(), Dean Roehrich |
| Previous by Thread: | Re: [DMAPI] code error in dm_ip_to_handle(), Dean Roehrich |
| Next by Thread: | Re: [DMAPI] code error in dm_ip_to_handle(), Dean Roehrich |
| Indexes: | [Date] [Thread] [Top] [All Lists] |