.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "FIND_EXPORTED_DENTRY" "" "06 October 2005" "" "" .SH NAME find_exported_dentry \- helper routine to implement export_operations->decode_fh .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp struct dentry * find_exported_dentry (struct super_block * \fIsb\fB, void * \fIobj\fB, void * \fIparent\fB, int (*\fIacceptable\fB) void *context, struct dentry *de, void * \fIcontext\fB); \fR .SH "ARGUMENTS" .TP \fB\fIsb\fB\fR The &super_block identifying the filesystem .TP \fB\fIobj\fB\fR An opaque identifier of the object to be found - passed to get_inode .TP \fB\fIparent\fB\fR An optional opqaue identifier of the parent of the object. .TP \fB\fIacceptable\fB\fR A function used to test possible &dentries to see if they are acceptable .TP \fB\fIcontext\fB\fR A parameter to \fIacceptable\fR so that it knows on what basis to judge. .SH "DESCRIPTION" .PP find_exported_dentry is the central helper routine to enable file systems to provide the \fBdecode_fh\fR export_operation. It's main task is to take an &inode, find or create an appropriate &dentry structure, and possibly splice this into the dcache in the correct place. .PP The \fBdecode_fh\fR operation provided by the filesystem should call \fBfind_exported_dentry\fR with the same parameters that it received except that instead of the file handle fragment, pointers to opaque identifiers for the object and optionally its parent are passed. The default decode_fh routine passes one pointer to the start of the filehandle fragment, and one 8 bytes into the fragment. It is expected that most filesystems will take this approach, though the offset to the parent identifier may well be different. .PP \fBfind_exported_dentry\fR will call get_dentry to get an dentry pointer from the file system. If any &dentry in the d_alias list is acceptable, it will be returned. Otherwise \fBfind_exported_dentry\fR will attempt to splice a new &dentry into the dcache using \fBget_name\fR and \fBget_parent\fR to find the appropriate place.