27 #include <linux/types.h>
59 trace_ocfs2_get_dentry_begin(sb, handle, (
unsigned long long)blkno);
80 mlog(
ML_ERROR,
"getting nfs sync lock(EX) failed %d\n", status);
85 trace_ocfs2_get_dentry_test_bit(status,
set);
102 goto unlock_nfs_sync;
113 trace_ocfs2_get_dentry_stale((
unsigned long long)blkno,
116 result = ERR_PTR(status);
122 result = (
void *)inode;
129 trace_ocfs2_get_dentry_generation((
unsigned long long)blkno,
132 result = ERR_PTR(-
ESTALE);
141 trace_ocfs2_get_dentry_end(result);
152 trace_ocfs2_get_parent(child, child->
d_name.len, child->
d_name.name,
153 (
unsigned long long)OCFS2_I(dir)->ip_blkno);
159 parent = ERR_PTR(status);
165 parent = ERR_PTR(-
ENOENT);
175 trace_ocfs2_get_parent_end(parent);
180 static int ocfs2_encode_fh(
struct inode *inode,
u32 *fh_in,
int *max_len,
181 struct inode *parent)
189 #ifdef TRACE_HOOKS_ARE_NOT_BRAINDEAD_IN_YOUR_OPINION
190 #error "You go ahead and fix that mess, then. Somehow"
193 fh, len, connectable);
196 if (parent && (len < 6)) {
200 }
else if (len < 3) {
206 blkno = OCFS2_I(inode)->ip_blkno;
209 trace_ocfs2_encode_fh_self((
unsigned long long)blkno, generation);
217 blkno = OCFS2_I(parent)->ip_blkno;
227 trace_ocfs2_encode_fh_parent((
unsigned long long)blkno,
234 trace_ocfs2_encode_fh_type(type);
239 struct fid *
fid,
int fh_len,
int fh_type)
243 if (fh_len < 3 || fh_type > 2)
249 return ocfs2_get_dentry(sb, &handle);
253 struct fid *fid,
int fh_len,
int fh_type)
257 if (fh_type != 2 || fh_len < 6)
263 return ocfs2_get_dentry(sb, &parent);
267 .encode_fh = ocfs2_encode_fh,
268 .fh_to_dentry = ocfs2_fh_to_dentry,
269 .fh_to_parent = ocfs2_fh_to_parent,