xfs
[Top] [All Lists]

Re: [DMAPI] code error in dm_ip_to_handle()

To: Dean Roehrich <roehrich@xxxxxxx>
Subject: Re: [DMAPI] code error in dm_ip_to_handle()
From: Aurelien Degremont - Stagiaire <degremont@xxxxxxxxxxx>
Date: Fri, 13 May 2005 18:03:49 +0200
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20050513152947.909404FE8A@xxxxxxxxxxxxxxxxxxxxxxxx>
References: <20050513152947.909404FE8A@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.2.1) Gecko/20030225
Dean Roehrich a écrit:
Certainly, dm_handle_to_ip() is intended to return any type of handle,
including filesystem handles.  In the case of XFS, when a filesystem handle is
requested we contruct it from the filesystem's root vnode.

I suppose dm_handle_to_ip() could be called with the handle from the mount
event.  That handle would have a fid_len of 0, due to the memset() in
dm_sb_data()...the HSM would call to things like dm_get_config() and
dm_set_disp() with that handle.

Yes, in fh_to_inode(), we could recognize the fshandle, using the fid_len value.

But, in inode_to_fh(), how know that we must return a fshandle (with the dm_fid part filled with 0) or a filehandle (ino, len and gen filled) ?

What's the difference between
dm_path_to_fshandle("/")
and
dm_path_to_handle("/") ?

(Assuming / is a DMAPI compatible filesystem)


Aurelien


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