Subject: Re: bug in filehandle code?
To: None <blymn@baesystems.com.au>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 09/06/2006 23:20:16
> Folks,
>
> It seems that some filehandle calls are returning file handles that
> are less than FHANDLE_SIZE_MIN in size. the comments in
> <sys/fstypes.h> lead one to believe that FHANDLE_SIZE_MIN is the
> smallest size a filehandle may be. Indeed, the FHANDLE_SIZE is the MAX
> of the actual filehandle size and FHANDLE_SIZE_MIN.
what are "some filehandle calls"?
> So, should not
> all the foo_vptofh calls be returning something of at least
> FHANDLE_SIZE_MIN (possibly zero padded)? I (probably foolishly)
> trusted this was so and spent a while tracking down why my kernel
> paniced when playing with file handles.
well, i guess you are confused between fhandle_t and struct fid.
what VFS_VPTOFH composes is a fid, not a fhandle_t.
yes, i think it's a good idea to move the FHANDLE_SIZE_MIN constraint to
each filesystems. i eventually want to remove fid_len references from
filesystem independent code, but there are some obstacles around.
i'm even not sure if it's possible without breaking some sort of
compatibility.
YAMOTOTO Takashi