return rc;
}
+static inline char *get_gf_path(struct getinfo_fid2path *gf)
+{
+#ifndef HAVE_FID2PATH_ANON_UNIONS
+ return gf->gf_u.gf_path;
+#else
+ return gf->gf_path;
+#endif
+}
+
int llapi_fid2path_at(int mnt_fd, const struct lu_fid *fid,
char *path_buf, int path_buf_size,
long long *recno, int *linkno)
goto out;
}
- rc = copy_strip_dne_path(gf->gf_u.gf_path, path_buf, path_buf_size);
+ rc = copy_strip_dne_path(get_gf_path(gf), path_buf, path_buf_size);
if (recno != NULL)
*recno = gf->gf_recno;
static int fid_from_lma(const char *path, int fd, struct lu_fid *fid)
{
+#ifdef HAVE_SERVER_SUPPORT
struct lustre_mdt_attrs *lma;
char buf[512];
int rc = -1;
lma = (struct lustre_mdt_attrs *)buf;
memcpy(fid, &lma->lma_self_fid, sizeof(lma->lma_self_fid));
return 0;
+#else
+ return -ENOTSUP;
+#endif
}
int llapi_fd2fid(int fd, struct lu_fid *fid)