OBD_CONNECT_RMT_CLIENT_FORCE | OBD_CONNECT_VBR | \
OBD_CONNECT_MDS | OBD_CONNECT_SKIP_ORPHAN | \
OBD_CONNECT_GRANT_SHRINK | OBD_CONNECT_FULL20 | \
- OBD_CONNECT_64BITHASH | OBD_CONNECT_MAXBYTES)
+ OBD_CONNECT_64BITHASH | OBD_CONNECT_MAXBYTES | \
+ OBD_CONNECT_MAX_EASIZE)
#define ECHO_CONNECT_SUPPORTED (0)
#define MGS_CONNECT_SUPPORTED (OBD_CONNECT_VERSION | OBD_CONNECT_AT | \
OBD_CONNECT_FULL20 | OBD_CONNECT_IMP_RECOV)
OBD_FL_CKSUM_RSVD2 = 0x00008000, /* for future cksum types */
OBD_FL_CKSUM_RSVD3 = 0x00010000, /* for future cksum types */
OBD_FL_SHRINK_GRANT = 0x00020000, /* object shrink the grant */
- OBD_FL_MMAP = 0x00040000, /* object is mmapped on the client */
+ OBD_FL_MMAP = 0x00040000, /* object is mmapped on the client.
+ * XXX: obsoleted - reserved for old
+ * clients prior than 2.2 */
OBD_FL_RECOV_RESEND = 0x00080000, /* recoverable resent */
OBD_FL_NOSPC_BLK = 0x00100000, /* no more block space on OST */
#define MF_SOM_LOCAL_FLAGS (MF_SOM_CHANGE | MF_EPOCH_OPEN | MF_EPOCH_CLOSE)
-#define MDS_BFLAG_UNCOMMITTED_WRITES 0x1
+#define LUSTRE_BFLAG_UNCOMMITTED_WRITES 0x1
-/* these should be identical to their EXT3_*_FL counterparts, and are
- * redefined here only to avoid dragging in ext3_fs.h */
-#define MDS_SYNC_FL 0x00000008 /* Synchronous updates */
-#define MDS_IMMUTABLE_FL 0x00000010 /* Immutable file */
-#define MDS_APPEND_FL 0x00000020 /* writes to file may only append */
-#define MDS_NOATIME_FL 0x00000080 /* do not update atime */
-#define MDS_DIRSYNC_FL 0x00010000 /* dirsync behaviour (dir only) */
+/* these should be identical to their EXT4_*_FL counterparts, they are
+ * redefined here only to avoid dragging in fs/ext4/ext4.h */
+#define LUSTRE_SYNC_FL 0x00000008 /* Synchronous updates */
+#define LUSTRE_IMMUTABLE_FL 0x00000010 /* Immutable file */
+#define LUSTRE_APPEND_FL 0x00000020 /* writes to file may only append */
+#define LUSTRE_NOATIME_FL 0x00000080 /* do not update atime */
+#define LUSTRE_DIRSYNC_FL 0x00010000 /* dirsync behaviour (dir only) */
#ifdef __KERNEL__
-/* Convert wire MDS_*_FL to corresponding client local VFS S_* values
- * for the client inode i_flags. The MDS_*_FL are the Lustre wire
+/* Convert wire LUSTRE_*_FL to corresponding client local VFS S_* values
+ * for the client inode i_flags. The LUSTRE_*_FL are the Lustre wire
* protocol equivalents of LDISKFS_*_FL values stored on disk, while
* the S_* flags are kernel-internal values that change between kernel
* versions. These flags are set/cleared via FSFILT_IOC_{GET,SET}_FLAGS.
* See b=16526 for a full history. */
static inline int ll_ext_to_inode_flags(int flags)
{
- return (((flags & MDS_SYNC_FL) ? S_SYNC : 0) |
- ((flags & MDS_NOATIME_FL) ? S_NOATIME : 0) |
- ((flags & MDS_APPEND_FL) ? S_APPEND : 0) |
+ return (((flags & LUSTRE_SYNC_FL) ? S_SYNC : 0) |
+ ((flags & LUSTRE_NOATIME_FL) ? S_NOATIME : 0) |
+ ((flags & LUSTRE_APPEND_FL) ? S_APPEND : 0) |
#if defined(S_DIRSYNC)
- ((flags & MDS_DIRSYNC_FL) ? S_DIRSYNC : 0) |
+ ((flags & LUSTRE_DIRSYNC_FL) ? S_DIRSYNC : 0) |
#endif
- ((flags & MDS_IMMUTABLE_FL) ? S_IMMUTABLE : 0));
+ ((flags & LUSTRE_IMMUTABLE_FL) ? S_IMMUTABLE : 0));
}
static inline int ll_inode_to_ext_flags(int iflags)
{
- return (((iflags & S_SYNC) ? MDS_SYNC_FL : 0) |
- ((iflags & S_NOATIME) ? MDS_NOATIME_FL : 0) |
- ((iflags & S_APPEND) ? MDS_APPEND_FL : 0) |
+ return (((iflags & S_SYNC) ? LUSTRE_SYNC_FL : 0) |
+ ((iflags & S_NOATIME) ? LUSTRE_NOATIME_FL : 0) |
+ ((iflags & S_APPEND) ? LUSTRE_APPEND_FL : 0) |
#if defined(S_DIRSYNC)
- ((iflags & S_DIRSYNC) ? MDS_DIRSYNC_FL : 0) |
+ ((iflags & S_DIRSYNC) ? LUSTRE_DIRSYNC_FL : 0) |
#endif
- ((iflags & S_IMMUTABLE) ? MDS_IMMUTABLE_FL : 0));
+ ((iflags & S_IMMUTABLE) ? LUSTRE_IMMUTABLE_FL : 0));
}
#endif
__u32 mode;
__u32 uid;
__u32 gid;
- __u32 flags; /* from vfs for pin/unpin, MDS_BFLAG for close */
+ __u32 flags; /* from vfs for pin/unpin, LUSTRE_BFLAG close */
__u32 rdev;
__u32 nlink; /* #bytes to read in the case of MDS_READPAGE */
__u32 generation;
MDS_SOM = 1 << 4,
MDS_QUOTA_IGNORE = 1 << 5,
MDS_CLOSE_CLEANUP = 1 << 6,
- MDS_KEEP_ORPHAN = 1 << 7
+ MDS_KEEP_ORPHAN = 1 << 7,
+ MDS_RECOV_OPEN = 1 << 8,
};
/* instance of mdt_reint_rec */
#define LOV_MIN_STRIPE_BITS 16 /* maximum PAGE_SIZE (ia64), power of 2 */
#define LOV_MIN_STRIPE_SIZE (1<<LOV_MIN_STRIPE_BITS)
-#define LOV_MAX_STRIPE_COUNT 160 /* until bug 4424 is fixed */
+#define LOV_MAX_STRIPE_COUNT_OLD 160
+/* This calculation is crafted so that input of 4096 will result in 160
+ * which in turn is equal to old maximal stripe count.
+ * XXX: In fact this is too simpified for now, what it also need is to get
+ * ea_type argument to clearly know how much space each stripe consumes.
+ *
+ * The limit of 12 pages is somewhat arbitrary, but is a reasonably large
+ * allocation that is sufficient for the current generation of systems.
+ *
+ * (max buffer size - lov+rpc header) / sizeof(struct lov_ost_data_v1) */
+#define LOV_MAX_STRIPE_COUNT 2000 /* ((12 * 4096 - 256) / 24) */
#define LOV_V1_INSANE_STRIPE_COUNT 65532 /* maximum stripe count bz13933 */
#define LOV_MAX_UUID_BUFFER_SIZE 8192
/** bits covering all \a changelog_rec_type's */
#define CHANGELOG_ALLMASK 0XFFFFFFFF
/** default \a changelog_rec_type mask */
-#define CHANGELOG_DEFMASK CHANGELOG_ALLMASK & ~(1 << CL_ATIME)
+#define CHANGELOG_DEFMASK CHANGELOG_ALLMASK & ~(1 << CL_ATIME | 1 << CL_CLOSE)
/* changelog llog name, needed by client replicators */
#define CHANGELOG_CATALOG "changelog_catalog"