Whamcloud - gitweb
LU-12806 llapi: use name_to_handle_at in llapi_fd2fid
[fs/lustre-release.git] / lustre / include / uapi / linux / lustre / lustre_user.h
index fdcc379..f90725a 100644 (file)
@@ -61,6 +61,7 @@
 /* # include <sys/quota.h> - this causes complaints about caddr_t */
 # include <sys/stat.h>
 # include <linux/lustre/lustre_fiemap.h>
+# define FILEID_LUSTRE 0x97 /* for name_to_handle_at() (and llapi_fd2fid()) */
 #endif /* __KERNEL__ */
 
 /* Handle older distros */
@@ -331,6 +332,12 @@ static inline bool fid_is_zero(const struct lu_fid *fid)
        return fid->f_seq == 0 && fid->f_oid == 0;
 }
 
+/* The data name_to_handle_at() places in a struct file_handle (at f_handle) */
+struct lustre_file_handle {
+       struct lu_fid lfh_child;
+       struct lu_fid lfh_parent;
+};
+
 /* Currently, the filter_fid::ff_parent::f_ver is not the real parent
  * MDT-object's FID::f_ver, instead it is the OST-object index in its
  * parent MDT-object's layout EA. */