Whamcloud - gitweb
LU-16479 utils: Add option to manage degraded ZFS OST
[fs/lustre-release.git] / lustre / include / uapi / linux / lustre / lustre_fid.h
index e741a8f..f11ad3b 100644 (file)
@@ -23,7 +23,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2014, Intel Corporation.
+ * Copyright (c) 2011, 2017, Intel Corporation.
  *
  * Copyright 2016 Cray Inc, all rights reserved.
  * Author: Ben Evans.
 #ifndef _UAPI_LUSTRE_FID_H_
 #define _UAPI_LUSTRE_FID_H_
 
-/*
- * This is due to us being out of kernel and the way the OpenSFS branch
- * handles CFLAGS.
- */
-#ifdef __KERNEL__
-# include <uapi/linux/lustre/lustre_idl.h>
-#else
-# include <linux/lustre/lustre_idl.h>
-#endif
+#include <linux/types.h>
+#include <linux/lustre/lustre_idl.h>
 
 /** returns fid object sequence */
 static inline __u64 fid_seq(const struct lu_fid *fid)
@@ -273,7 +266,8 @@ static inline bool fid_is_last_id(const struct lu_fid *fid)
                return false;
 
        if (fid_seq(fid) == FID_SEQ_UPDATE_LOG ||
-           fid_seq(fid) == FID_SEQ_UPDATE_LOG_DIR)
+           fid_seq(fid) == FID_SEQ_UPDATE_LOG_DIR ||
+           fid_seq_is_igif(fid_seq(fid)))
                return false;
 
        return true;
@@ -284,7 +278,7 @@ static inline bool fid_is_last_id(const struct lu_fid *fid)
  * \param fid an igif to get inode number from.
  * \return inode number for the igif.
  */
-static inline ino_t lu_igif_ino(const struct lu_fid *fid)
+static inline __kernel_ino_t lu_igif_ino(const struct lu_fid *fid)
 {
        return fid_seq(fid);
 }