>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
|