denty_to_fh/fh_to_dentry
Hello,
I am trying to implement dentry_to_fh/fh_to_dentry in my fs. What is
the proper return value in dentry_to_fh? I saw that 'fat' returns 3 and reiserfs returns 3 or 6 depends on needparent flag. I try to copy the same concept but it does not work. when I try to cat a file, unknown error 521 is returned. I checked that 521 is EBADHANDLE.
Any hints?
TIA.
- Joe
Quoted 7 lines · On April 9, [email protected] wrote:
Hello,
I am trying to implement dentry_to_fh/fh_to_dentry in my fs. What is
the proper return value indentry_to_fh? I saw that 'fat' returns 3 and reiserfs returns 3 or 6 depends on needparent flag. I try to copy the same concept but it does not work. when I try to cat a file, unknown error 521 is returned. I checked that 521 is EBADHANDLE.
dentry_to_fh can return anything you like between 2 and 254. Whatever you return will be stored in the file handle and passed as the 4th arg to fh_to_dentry when the filehandle is presented.
You need to make sure you get the "size" right to. Remember that "size" is in units of 4 bytes (like everything else that is XDRed).
NeilBrown