Whamcloud - gitweb
b=23094 add layout lock connect flag
[fs/lustre-release.git] / lustre / include / lustre / lustre_idl.h
index 54f0730..f8e5e23 100644 (file)
@@ -26,7 +26,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
 #ifndef _LUSTRE_IDL_H_
 #define _LUSTRE_IDL_H_
 
-#include <libcfs/libcfs.h>
-
 /* Defn's shared with user-space. */
 #include <lustre/lustre_user.h>
-#include <lustre/ll_fiemap.h>
 
 /*
  *  GENERAL STUFF
@@ -229,18 +226,6 @@ static inline int range_within(const struct lu_seq_range *range,
         return s >= range->lsr_start && s < range->lsr_end;
 }
 
-/**
- * allocate \a w units of sequence from range \a from.
- */
-static inline void range_alloc(struct lu_seq_range *to,
-                               struct lu_seq_range *from,
-                               __u64 width)
-{
-        to->lsr_start = from->lsr_start;
-        to->lsr_end = from->lsr_start + width;
-        from->lsr_start += width;
-}
-
 static inline int range_is_sane(const struct lu_seq_range *range)
 {
         return (range->lsr_end >= range->lsr_start);
@@ -484,7 +469,7 @@ static inline int fid_seq_is_idif(const __u64 seq)
 
 static inline int fid_is_idif(const struct lu_fid *fid)
 {
-        return fid_seq_is_igif(fid_seq(fid));
+        return fid_seq_is_idif(fid_seq(fid));
 }
 
 struct ost_id {
@@ -932,6 +917,7 @@ static inline void lustre_handle_copy(struct lustre_handle *tgt,
 
 /* flags for lm_flags */
 #define MSGHDR_AT_SUPPORT               0x1
+#define MSGHDR_CKSUM_INCOMPAT18         0x2
 
 #define lustre_msg lustre_msg_v2
 /* we depend on this structure to be 8-byte aligned */
@@ -1070,6 +1056,9 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
 #define OBD_CONNECT_LOV_V3        0x100000000ULL /*client supports LOV v3 EA */
 #define OBD_CONNECT_GRANT_SHRINK  0x200000000ULL /* support grant shrink */
 #define OBD_CONNECT_SKIP_ORPHAN   0x400000000ULL /* don't reuse orphan objids */
+#define OBD_CONNECT_MAX_EASIZE    0x800000000ULL /* preserved for large EA */
+#define OBD_CONNECT_FULL20       0x1000000000ULL /* it is 2.0 client */
+#define OBD_CONNECT_LAYOUTLOCK   0x2000000000ULL /* client supports layout lock */
 /* also update obd_connect_names[] for lprocfs_rd_connect_flags()
  * and lustre/utils/wirecheck.c */
 
@@ -1089,7 +1078,8 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
                                 OBD_CONNECT_MDS_CAPA | OBD_CONNECT_OSS_CAPA | \
                                 OBD_CONNECT_MDS_MDS | OBD_CONNECT_FID | \
                                 LRU_RESIZE_CONNECT_FLAG | OBD_CONNECT_VBR | \
-                                OBD_CONNECT_LOV_V3 | OBD_CONNECT_SOM)
+                                OBD_CONNECT_LOV_V3 | OBD_CONNECT_SOM | \
+                                OBD_CONNECT_FULL20)
 #define OST_CONNECT_SUPPORTED  (OBD_CONNECT_SRVLOCK | OBD_CONNECT_GRANT | \
                                 OBD_CONNECT_REQPORTAL | OBD_CONNECT_VERSION | \
                                 OBD_CONNECT_TRUNCLOCK | OBD_CONNECT_INDEX | \
@@ -1100,9 +1090,10 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
                                 OBD_CONNECT_OSS_CAPA  | OBD_CONNECT_RMT_CLIENT | \
                                 OBD_CONNECT_RMT_CLIENT_FORCE | OBD_CONNECT_VBR | \
                                 OBD_CONNECT_MDS | OBD_CONNECT_SKIP_ORPHAN | \
-                                OBD_CONNECT_GRANT_SHRINK)
+                                OBD_CONNECT_GRANT_SHRINK | OBD_CONNECT_FULL20)
 #define ECHO_CONNECT_SUPPORTED (0)
-#define MGS_CONNECT_SUPPORTED  (OBD_CONNECT_VERSION | OBD_CONNECT_AT)
+#define MGS_CONNECT_SUPPORTED  (OBD_CONNECT_VERSION | OBD_CONNECT_AT | \
+                                OBD_CONNECT_FULL20)
 
 #define OBD_OCD_VERSION(major,minor,patch,fix) (((major)<<24) + ((minor)<<16) +\
                                                 ((patch)<<8) + (fix))
@@ -1614,8 +1605,9 @@ struct mdt_body {
         __u32          aclsize;
         __u32          max_mdsize;
         __u32          max_cookiesize;
-        __u32          padding_4; /* also fix lustre_swab_mdt_body */
-        __u64          padding_5;
+        __u32          uid_h; /* high 32-bits of uid, for FUID */
+        __u32          gid_h; /* high 32-bits of gid, for FUID */
+        __u32          padding_5; /* also fix lustre_swab_mdt_body */
         __u64          padding_6;
         __u64          padding_7;
         __u64          padding_8;
@@ -1727,7 +1719,9 @@ struct mdt_remote_perm {
         __u32           rp_uid;
         __u32           rp_gid;
         __u32           rp_fsuid;
+        __u32           rp_fsuid_h;
         __u32           rp_fsgid;
+        __u32           rp_fsgid_h;
         __u32           rp_access_perm; /* MAY_READ/WRITE/EXEC */
 };
 
@@ -2601,7 +2595,8 @@ struct obdo {
         struct lustre_handle    o_handle;       /* brw: lock handle to prolong locks */
         struct llog_cookie      o_lcookie;      /* destroy: unlink cookie from MDS */
 
-        __u64                   o_padding_2;
+        __u32                   o_uid_h;
+        __u32                   o_gid_h;
         __u64                   o_padding_3;
         __u64                   o_padding_4;
         __u64                   o_padding_5;
@@ -2615,12 +2610,6 @@ struct obdo {
 #define o_dropped o_misc
 #define o_cksum   o_nlink
 
-static inline void obdo_unpack_ostid(struct obdo *oa, struct ost_id *ostid)
-{
-        ostid->oi_id = ostid_id(&oa->o_oi);
-        ostid->oi_seq = ostid_seq(&oa->o_oi);
-}
-
 static inline void lustre_set_wire_obdo(struct obdo *wobdo, struct obdo *lobdo)
 {
         memcpy(wobdo, lobdo, sizeof(*lobdo));
@@ -2861,8 +2850,6 @@ struct getinfo_fid2path {
 
 void lustre_swab_fid2path (struct getinfo_fid2path *gf);
 
-extern void lustre_swab_kuch(struct kuc_hdr *);
-
 
 #endif
 /** @} lustreidl */