#define OBD_CONNECT_LAYOUTLOCK 0x2000000000ULL /* client supports layout lock */
#define OBD_CONNECT_64BITHASH 0x4000000000ULL /* client supports 64-bits
* directory hash */
+#define OBD_CONNECT_MAXBYTES 0x8000000000ULL /* max stripe size */
/* also update obd_connect_names[] for lprocfs_rd_connect_flags()
* and lustre/utils/wirecheck.c */
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_64BITHASH | OBD_CONNECT_MAXBYTES)
#define ECHO_CONNECT_SUPPORTED (0)
#define MGS_CONNECT_SUPPORTED (OBD_CONNECT_VERSION | OBD_CONNECT_AT | \
OBD_CONNECT_FULL20)
*
* If we eventually have separate connect data for different types, which we
* almost certainly will, then perhaps we stick a union in here. */
+struct obd_connect_data_v1 {
+ __u64 ocd_connect_flags; /* OBD_CONNECT_* per above */
+ __u32 ocd_version; /* lustre release version number */
+ __u32 ocd_grant; /* initial cache grant amount (bytes) */
+ __u32 ocd_index; /* LOV index to connect to */
+ __u32 ocd_brw_size; /* Maximum BRW size in bytes */
+ __u64 ocd_ibits_known; /* inode bits this client understands */
+ __u32 ocd_nllu; /* non-local-lustre-user */
+ __u32 ocd_nllg; /* non-local-lustre-group */
+ __u64 ocd_transno; /* first transno from client to be replayed */
+ __u32 ocd_group; /* MDS group on OST */
+ __u32 ocd_cksum_types; /* supported checksum algorithms */
+ __u32 ocd_max_easize; /* How big LOV EA can be on MDS */
+ __u32 padding; /* also fix lustre_swab_connect */
+ __u64 ocd_maxbytes; /* Maximum stripe size in bytes */
+};
+
struct obd_connect_data {
__u64 ocd_connect_flags; /* OBD_CONNECT_* per above */
__u32 ocd_version; /* lustre release version number */
__u64 ocd_transno; /* first transno from client to be replayed */
__u32 ocd_group; /* MDS group on OST */
__u32 ocd_cksum_types; /* supported checksum algorithms */
- __u64 padding1; /* also fix lustre_swab_connect */
- __u64 padding2; /* also fix lustre_swab_connect */
+ __u32 ocd_max_easize; /* How big LOV EA can be on MDS */
+ __u32 padding; /* also fix lustre_swab_connect */
+ __u64 ocd_maxbytes; /* Maximum stripe size in bytes */
+ /* Fields after ocd_maxbytes are only accessible by the receiver
+ * if the corresponding flag in ocd_connect_flags is set. Accessing
+ * any field after ocd_maxbytes on the receiver without a valid flag
+ * may result in out-of-bound memory access and kernel oops. */
+ __u64 padding1; /* added 2.2.0. also fix lustre_swab_connect */
+ __u64 padding2; /* added 2.2.0. also fix lustre_swab_connect */
+ __u64 padding3; /* added 2.2.0. also fix lustre_swab_connect */
+ __u64 padding4; /* added 2.2.0. also fix lustre_swab_connect */
+ __u64 padding5; /* added 2.2.0. also fix lustre_swab_connect */
+ __u64 padding6; /* added 2.2.0. also fix lustre_swab_connect */
+ __u64 padding7; /* added 2.2.0. also fix lustre_swab_connect */
+ __u64 padding8; /* added 2.2.0. also fix lustre_swab_connect */
+ __u64 padding9; /* added 2.2.0. also fix lustre_swab_connect */
+ __u64 paddingA; /* added 2.2.0. also fix lustre_swab_connect */
+ __u64 paddingB; /* added 2.2.0. also fix lustre_swab_connect */
+ __u64 paddingC; /* added 2.2.0. also fix lustre_swab_connect */
+ __u64 paddingD; /* added 2.2.0. also fix lustre_swab_connect */
+ __u64 paddingE; /* added 2.2.0. also fix lustre_swab_connect */
+ __u64 paddingF; /* added 2.2.0. also fix lustre_swab_connect */
};
+
extern void lustre_swab_connect(struct obd_connect_data *ocd);
/*
OBD_CONNECT_SRVLOCK | OBD_CONNECT_TRUNCLOCK|
OBD_CONNECT_AT | OBD_CONNECT_RMT_CLIENT |
OBD_CONNECT_OSS_CAPA | OBD_CONNECT_VBR|
- OBD_CONNECT_FULL20 | OBD_CONNECT_64BITHASH;
+ OBD_CONNECT_FULL20 | OBD_CONNECT_64BITHASH |
+ OBD_CONNECT_MAXBYTES;
if (sbi->ll_flags & LL_SBI_SOM_PREVIEW)
data->ocd_connect_flags |= OBD_CONNECT_SOM;
valid |= OBD_MD_FLACL;
OBD_ALLOC_PTR(op_data);
- if (op_data == NULL)
+ if (op_data == NULL)
GOTO(out_lock_cn_cb, err = -ENOMEM);
op_data->op_fid1 = sbi->ll_root_fid;
* Use is subject to license terms.
*/
/*
+ * Copyright (c) 2011 Whamcloud, Inc.
+ */
+/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*
{
struct lov_oinfo *loi;
int i;
+ __u64 stripe_maxbytes = OBD_OBJECT_EOF;
lsm_unpackmd_common(lsm, lmm);
for (i = 0; i < lsm->lsm_stripe_count; i++) {
+ struct obd_import *imp;
+
/* XXX LOV STACKING call down to osc_unpackmd() */
loi = lsm->lsm_oinfo[i];
loi->loi_id = le64_to_cpu(lmm->lmm_objects[i].l_object_id);
lov_dump_lmm_v1(D_WARNING, lmm);
return -EINVAL;
}
+ /* calculate the minimum stripe max bytes */
+ imp = lov->lov_tgts[loi->loi_ost_idx]->ltd_obd->u.cli.cl_import;
+ if (imp != NULL) {
+ if (!(imp->imp_connect_data.ocd_connect_flags &
+ OBD_CONNECT_MAXBYTES)) {
+ imp->imp_connect_data.ocd_maxbytes =
+ LUSTRE_STRIPE_MAXBYTES;
+ }
+ if (stripe_maxbytes>imp->imp_connect_data.ocd_maxbytes){
+ stripe_maxbytes =
+ imp->imp_connect_data.ocd_maxbytes;
+ }
+ }
}
+ /* no ost connected yet */
+ if (stripe_maxbytes == OBD_OBJECT_EOF)
+ stripe_maxbytes = LUSTRE_STRIPE_MAXBYTES;
+ lsm->lsm_maxbytes = stripe_maxbytes * lsm->lsm_stripe_count;
+
return 0;
}
struct lov_mds_md_v3 *lmm;
struct lov_oinfo *loi;
int i;
+ __u64 stripe_maxbytes = OBD_OBJECT_EOF;
lmm = (struct lov_mds_md_v3 *)lmmv1;
strncpy(lsm->lsm_pool_name, lmm->lmm_pool_name, LOV_MAXPOOLNAME);
for (i = 0; i < lsm->lsm_stripe_count; i++) {
+ struct obd_import *imp;
+
/* XXX LOV STACKING call down to osc_unpackmd() */
loi = lsm->lsm_oinfo[i];
loi->loi_id = le64_to_cpu(lmm->lmm_objects[i].l_object_id);
lov_dump_lmm_v3(D_WARNING, lmm);
return -EINVAL;
}
+ /* calculate the minimum stripe max bytes */
+ imp = lov->lov_tgts[loi->loi_ost_idx]->ltd_obd->u.cli.cl_import;
+ if (imp != NULL) {
+ if (!(imp->imp_connect_data.ocd_connect_flags &
+ OBD_CONNECT_MAXBYTES)) {
+ imp->imp_connect_data.ocd_maxbytes =
+ LUSTRE_STRIPE_MAXBYTES;
+ }
+ if (stripe_maxbytes>imp->imp_connect_data.ocd_maxbytes){
+ stripe_maxbytes =
+ imp->imp_connect_data.ocd_maxbytes;
+ }
+ }
}
+ /* no ost connected yet */
+ if (stripe_maxbytes == OBD_OBJECT_EOF)
+ stripe_maxbytes = LUSTRE_STRIPE_MAXBYTES;
+ lsm->lsm_maxbytes = stripe_maxbytes * lsm->lsm_stripe_count;
+
return 0;
}
* Use is subject to license terms.
*/
/*
+ * Copyright (c) 2011 Whamcloud, Inc.
+ */
+/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*/
int lov_getstripe(struct obd_export *exp,
struct lov_stripe_md *lsm, struct lov_user_md *lump);
int lov_alloc_memmd(struct lov_stripe_md **lsmp, int stripe_count,
- int pattern, int magic);
+ int pattern, int magic);
void lov_free_memmd(struct lov_stripe_md **lsmp);
void lov_dump_lmm_v1(int level, struct lov_mds_md_v1 *lmm);
* Use is subject to license terms.
*/
/*
+ * Copyright (c) 2011 Whamcloud, Inc.
+ */
+/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*
err = obd_set_info_async(tgt->ltd_exp, keylen, key,
sizeof(*info->capa),
info->capa, set);
-
} else {
/* Only want a specific OSC */
if (check_uuid &&
* Use is subject to license terms.
*/
/*
+ * Copyright (c) 2011 Whamcloud, Inc.
+ */
+/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*
}
int lov_alloc_memmd(struct lov_stripe_md **lsmp, int stripe_count,
- int pattern, int magic)
+ int pattern, int magic)
{
int i, lsm_size;
ENTRY;
"full20",
"layout_lock",
"64bithash",
+ "object_max_bytes",
NULL
};
* Use is subject to license terms.
*/
/*
+ * Copyright (c) 2011 Whamcloud, Inc.
+ */
+/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*
obd_export_nid2str(exp));
}
+ if (data->ocd_connect_flags & OBD_CONNECT_MAXBYTES)
+ data->ocd_maxbytes = exp->exp_obd->u.obt.obt_sb->s_maxbytes;
+
RETURN(0);
}
LASSERT((*lsmp)->lsm_object_id);
}
- (*lsmp)->lsm_maxbytes = LUSTRE_STRIPE_MAXBYTES;
+ (*lsmp)->lsm_maxbytes = exp->exp_obd->u.obt.obt_sb->s_maxbytes;
RETURN(lsm_size);
}
* Use is subject to license terms.
*/
/*
+ * Copyright (c) 2011 Whamcloud, Inc.
+ */
+/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*/
struct lov_mds_md *lmm, int lmm_bytes)
{
int lsm_size;
+ struct obd_import *imp = class_exp2cliimp(exp);
ENTRY;
if (lmm != NULL) {
LASSERT_SEQ_IS_MDT((*lsmp)->lsm_object_seq);
}
- (*lsmp)->lsm_maxbytes = LUSTRE_STRIPE_MAXBYTES;
+ if (imp != NULL &&
+ (imp->imp_connect_data.ocd_connect_flags & OBD_CONNECT_MAXBYTES))
+ (*lsmp)->lsm_maxbytes = imp->imp_connect_data.ocd_maxbytes;
+ else
+ (*lsmp)->lsm_maxbytes = LUSTRE_STRIPE_MAXBYTES;
RETURN(lsm_size);
}
CWARN("%s: available grant < 0, the OSS is probably not running"
" with patch from bug20278 (%ld) \n",
cli->cl_import->imp_obd->obd_name, cli->cl_avail_grant);
- /* workaround for 1.6 servers which do not have
+ /* workaround for 1.6 servers which do not have
* the patch from bug20278 */
cli->cl_avail_grant = ocd->ocd_grant;
}
* to be canceled, the pages covered by the lock will be sent out
* with ASYNC_HP. We have to send out them as soon as possible. */
cfs_list_for_each_entry_safe(oap, tmp, &lop->lop_urgent, oap_urgent_item) {
- if (oap->oap_async_flags & ASYNC_HP)
+ if (oap->oap_async_flags & ASYNC_HP)
cfs_list_move(&oap->oap_pending_item, &tmp_list);
else
cfs_list_move_tail(&oap->oap_pending_item, &tmp_list);
* avail < ~0.1% max max = avail + used
* 1025 * avail < avail + used used = blocks - free
* 1024 * avail < used
- * 1024 * avail < blocks - free
- * avail < ((blocks - free) >> 10)
+ * 1024 * avail < blocks - free
+ * avail < ((blocks - free) >> 10)
*
* On very large disk, say 16TB 0.1% will be 16 GB. We don't want to
* lose that amount of space so in those cases we report no space left
* If we came to server that is in recovery, we enter IMP_REPLAY import state.
* We go through our list of requests to replay and send them to server one by
* one.
- * After sending all request from the list we change import state to
+ * After sending all request from the list we change import state to
* IMP_REPLAY_LOCKS and re-request all the locks we believe we have from server
* and also all the locks we don't yet have and wait for server to grant us.
* After that we send a special "replay completed" request and change import
* Use is subject to license terms.
*/
/*
+ * Copyright (c) 2011 Whamcloud, Inc.
+ */
+/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*
struct req_msg_field RMF_CONNECT_DATA =
DEFINE_MSGF("cdata",
RMF_F_NO_SIZE_CHECK /* we allow extra space for interop */,
- sizeof(struct obd_connect_data), lustre_swab_connect, NULL);
+#if LUSTRE_VERSION_CODE > OBD_OCD_VERSION(2, 9, 0, 0)
+ sizeof(struct obd_connect_data),
+#else
+/* For interoperability with 1.8 and 2.0 clients/servers.
+ * The RPC verification code allows larger RPC buffers, but not
+ * smaller buffers. Until we no longer need to keep compatibility
+ * with older servers/clients we can only check that the buffer
+ * size is at least as large as obd_connect_data_v1. That is not
+ * not in itself harmful, since the chance of just corrupting this
+ * field is low. See JIRA LU-16 for details. */
+ sizeof(struct obd_connect_data_v1),
+#endif
+ lustre_swab_connect, NULL);
EXPORT_SYMBOL(RMF_CONNECT_DATA);
struct req_msg_field RMF_DLM_REQ =
* Use is subject to license terms.
*/
/*
+ * Copyright (c) 2011 Whamcloud, Inc.
+ */
+/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*
__swab64s(&ocd->ocd_transno);
__swab32s(&ocd->ocd_group);
__swab32s(&ocd->ocd_cksum_types);
+ /* Fields after ocd_cksum_types are only accessible by the receiver
+ * if the corresponding flag in ocd_connect_flags is set. Accessing
+ * any field after ocd_maxbytes on the receiver without a valid flag
+ * may result in out-of-bound memory access and kernel oops. */
+ if (ocd->ocd_connect_flags & OBD_CONNECT_MAX_EASIZE)
+ __swab32s(&ocd->ocd_max_easize);
+ CLASSERT(offsetof(typeof(*ocd), padding) != 0);
+ if (ocd->ocd_connect_flags & OBD_CONNECT_MAXBYTES)
+ __swab64s(&ocd->ocd_maxbytes);
CLASSERT(offsetof(typeof(*ocd), padding1) != 0);
CLASSERT(offsetof(typeof(*ocd), padding2) != 0);
+ CLASSERT(offsetof(typeof(*ocd), padding3) != 0);
+ CLASSERT(offsetof(typeof(*ocd), padding4) != 0);
+ CLASSERT(offsetof(typeof(*ocd), padding5) != 0);
+ CLASSERT(offsetof(typeof(*ocd), padding6) != 0);
+ CLASSERT(offsetof(typeof(*ocd), padding7) != 0);
+ CLASSERT(offsetof(typeof(*ocd), padding8) != 0);
+ CLASSERT(offsetof(typeof(*ocd), padding9) != 0);
+ CLASSERT(offsetof(typeof(*ocd), paddingA) != 0);
+ CLASSERT(offsetof(typeof(*ocd), paddingB) != 0);
+ CLASSERT(offsetof(typeof(*ocd), paddingC) != 0);
+ CLASSERT(offsetof(typeof(*ocd), paddingD) != 0);
+ CLASSERT(offsetof(typeof(*ocd), paddingE) != 0);
+ CLASSERT(offsetof(typeof(*ocd), paddingF) != 0);
}
void lustre_swab_obdo (struct obdo *o)
* Use is subject to license terms.
*/
/*
+ * Copyright (c) 2011 Whamcloud, Inc.
+ */
+/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*/
* Use is subject to license terms.
*/
/*
+ * Copyright (c) 2011 Whamcloud, Inc.
+ */
+/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*/
(long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_pre_versions[4]));
/* Checks for struct obd_connect_data */
- LASSERTF((int)sizeof(struct obd_connect_data) == 72, " found %lld\n",
+ LASSERTF((int)sizeof(struct obd_connect_data) == 192, " found %lld\n",
(long long)(int)sizeof(struct obd_connect_data));
LASSERTF((int)offsetof(struct obd_connect_data, ocd_connect_flags) == 0, " found %lld\n",
(long long)(int)offsetof(struct obd_connect_data, ocd_connect_flags));
(long long)(int)offsetof(struct obd_connect_data, ocd_cksum_types));
LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_cksum_types) == 4, " found %lld\n",
(long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_cksum_types));
- LASSERTF((int)offsetof(struct obd_connect_data, padding1) == 56, " found %lld\n",
+ LASSERTF((int)offsetof(struct obd_connect_data, ocd_max_easize) == 56, " found %lld\n",
+ (long long)(int)offsetof(struct obd_connect_data, ocd_max_easize));
+ LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_max_easize) == 4, " found %lld\n",
+ (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_max_easize));
+ LASSERTF((int)offsetof(struct obd_connect_data, padding) == 60, " found %lld\n",
+ (long long)(int)offsetof(struct obd_connect_data, padding));
+ LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding) == 4, " found %lld\n",
+ (long long)(int)sizeof(((struct obd_connect_data *)0)->padding));
+ LASSERTF((int)offsetof(struct obd_connect_data, ocd_maxbytes) == 64, " found %lld\n",
+ (long long)(int)offsetof(struct obd_connect_data, ocd_maxbytes));
+ LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_maxbytes) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_maxbytes));
+ LASSERTF((int)offsetof(struct obd_connect_data, padding1) == 72, " found %lld\n",
(long long)(int)offsetof(struct obd_connect_data, padding1));
LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding1) == 8, " found %lld\n",
(long long)(int)sizeof(((struct obd_connect_data *)0)->padding1));
- LASSERTF((int)offsetof(struct obd_connect_data, padding2) == 64, " found %lld\n",
+ LASSERTF((int)offsetof(struct obd_connect_data, padding2) == 80, " found %lld\n",
(long long)(int)offsetof(struct obd_connect_data, padding2));
LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding2) == 8, " found %lld\n",
(long long)(int)sizeof(((struct obd_connect_data *)0)->padding2));
- CLASSERT(OBD_CONNECT_RDONLY == 0x1ULL);
- CLASSERT(OBD_CONNECT_INDEX == 0x2ULL);
- CLASSERT(OBD_CONNECT_GRANT == 0x8ULL);
- CLASSERT(OBD_CONNECT_SRVLOCK == 0x10ULL);
- CLASSERT(OBD_CONNECT_VERSION == 0x20ULL);
- CLASSERT(OBD_CONNECT_REQPORTAL == 0x40ULL);
- CLASSERT(OBD_CONNECT_ACL == 0x80ULL);
- CLASSERT(OBD_CONNECT_XATTR == 0x100ULL);
- CLASSERT(OBD_CONNECT_REAL == 0x8000000ULL);
- CLASSERT(OBD_CONNECT_CKSUM == 0x20000000ULL);
- CLASSERT(OBD_CONNECT_TRUNCLOCK == 0x400ULL);
- CLASSERT(OBD_CONNECT_IBITS == 0x1000ULL);
- CLASSERT(OBD_CONNECT_JOIN == 0x2000ULL);
- CLASSERT(OBD_CONNECT_ATTRFID == 0x4000ULL);
- CLASSERT(OBD_CONNECT_NODEVOH == 0x8000ULL);
- CLASSERT(OBD_CONNECT_RMT_CLIENT == 0x10000ULL);
- CLASSERT(OBD_CONNECT_RMT_CLIENT_FORCE == 0x20000ULL);
- CLASSERT(OBD_CONNECT_BRW_SIZE == 0x40000ULL);
- CLASSERT(OBD_CONNECT_QUOTA64 == 0x80000ULL);
- CLASSERT(OBD_CONNECT_MDS_CAPA == 0x100000ULL);
- CLASSERT(OBD_CONNECT_OSS_CAPA == 0x200000ULL);
- CLASSERT(OBD_CONNECT_MDS_MDS == 0x4000000ULL);
- CLASSERT(OBD_CONNECT_SOM == 0x800000ULL);
- CLASSERT(OBD_CONNECT_AT == 0x1000000ULL);
- CLASSERT(OBD_CONNECT_CANCELSET == 0x400000ULL);
- CLASSERT(OBD_CONNECT_LRU_RESIZE == 0x2000000ULL);
- CLASSERT(OBD_CONNECT_VBR == 0x80000000ULL);
- CLASSERT(OBD_CONNECT_SKIP_ORPHAN == 0x400000000ULL);
- CLASSERT(OBD_CONNECT_FULL20 == 0x1000000000ULL);
- CLASSERT(OBD_CONNECT_LAYOUTLOCK == 0x2000000000ULL);
- CLASSERT(OBD_CONNECT_64BITHASH == 0x4000000000ULL);
+ CLASSERT(OBD_CONNECT_RDONLY == 0x1ULL);
+ CLASSERT(OBD_CONNECT_INDEX == 0x2ULL);
+ CLASSERT(OBD_CONNECT_MDS == 0x4ULL);
+ CLASSERT(OBD_CONNECT_GRANT == 0x8ULL);
+ CLASSERT(OBD_CONNECT_SRVLOCK == 0x10ULL);
+ CLASSERT(OBD_CONNECT_VERSION == 0x20ULL);
+ CLASSERT(OBD_CONNECT_REQPORTAL == 0x40ULL);
+ CLASSERT(OBD_CONNECT_ACL == 0x80ULL);
+ CLASSERT(OBD_CONNECT_XATTR == 0x100ULL);
+ CLASSERT(OBD_CONNECT_CROW == 0x200ULL);
+ CLASSERT(OBD_CONNECT_TRUNCLOCK == 0x400ULL);
+ CLASSERT(OBD_CONNECT_TRANSNO == 0x800ULL);
+ CLASSERT(OBD_CONNECT_IBITS == 0x1000ULL);
+ CLASSERT(OBD_CONNECT_JOIN == 0x2000ULL);
+ CLASSERT(OBD_CONNECT_ATTRFID == 0x4000ULL);
+ CLASSERT(OBD_CONNECT_NODEVOH == 0x8000ULL);
+ CLASSERT(OBD_CONNECT_RMT_CLIENT == 0x10000ULL);
+ CLASSERT(OBD_CONNECT_RMT_CLIENT_FORCE == 0x20000ULL);
+ CLASSERT(OBD_CONNECT_BRW_SIZE == 0x40000ULL);
+ CLASSERT(OBD_CONNECT_QUOTA64 == 0x80000ULL);
+ CLASSERT(OBD_CONNECT_MDS_CAPA == 0x100000ULL);
+ CLASSERT(OBD_CONNECT_OSS_CAPA == 0x200000ULL);
+ CLASSERT(OBD_CONNECT_CANCELSET == 0x400000ULL);
+ CLASSERT(OBD_CONNECT_SOM == 0x800000ULL);
+ CLASSERT(OBD_CONNECT_AT == 0x1000000ULL);
+ CLASSERT(OBD_CONNECT_LRU_RESIZE == 0x2000000ULL);
+ CLASSERT(OBD_CONNECT_MDS_MDS == 0x4000000ULL);
+ CLASSERT(OBD_CONNECT_REAL == 0x8000000ULL);
+ CLASSERT(OBD_CONNECT_CHANGE_QS == 0x10000000ULL);
+ CLASSERT(OBD_CONNECT_CKSUM == 0x20000000ULL);
+ CLASSERT(OBD_CONNECT_FID == 0x40000000ULL);
+ CLASSERT(OBD_CONNECT_VBR == 0x80000000ULL);
+ CLASSERT(OBD_CONNECT_LOV_V3 == 0x100000000ULL);
+ CLASSERT(OBD_CONNECT_GRANT_SHRINK == 0x200000000ULL);
+ CLASSERT(OBD_CONNECT_SKIP_ORPHAN == 0x400000000ULL);
+ CLASSERT(OBD_CONNECT_MAX_EASIZE == 0x800000000ULL);
+ CLASSERT(OBD_CONNECT_FULL20 == 0x1000000000ULL);
+ CLASSERT(OBD_CONNECT_LAYOUTLOCK == 0x2000000000ULL);
+ CLASSERT(OBD_CONNECT_64BITHASH == 0x4000000000ULL);
+ CLASSERT(OBD_CONNECT_MAXBYTES == 0x8000000000ULL);
/* Checks for struct obdo */
LASSERTF((int)sizeof(struct obdo) == 208, " found %lld\n",
* Use is subject to license terms.
*/
/*
+ * Copyright (c) 2011 Whamcloud, Inc.
+ */
+/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*/
CHECK_MEMBER(obd_connect_data, ocd_transno);
CHECK_MEMBER(obd_connect_data, ocd_group);
CHECK_MEMBER(obd_connect_data, ocd_cksum_types);
+ CHECK_MEMBER(obd_connect_data, ocd_max_easize);
+ CHECK_MEMBER(obd_connect_data, padding);
+ CHECK_MEMBER(obd_connect_data, ocd_maxbytes);
CHECK_MEMBER(obd_connect_data, padding1);
CHECK_MEMBER(obd_connect_data, padding2);
CHECK_CDEFINE(OBD_CONNECT_RDONLY);
CHECK_CDEFINE(OBD_CONNECT_INDEX);
+ CHECK_CDEFINE(OBD_CONNECT_MDS);
CHECK_CDEFINE(OBD_CONNECT_GRANT);
CHECK_CDEFINE(OBD_CONNECT_SRVLOCK);
CHECK_CDEFINE(OBD_CONNECT_VERSION);
CHECK_CDEFINE(OBD_CONNECT_REQPORTAL);
CHECK_CDEFINE(OBD_CONNECT_ACL);
CHECK_CDEFINE(OBD_CONNECT_XATTR);
- CHECK_CDEFINE(OBD_CONNECT_REAL);
- CHECK_CDEFINE(OBD_CONNECT_CKSUM);
+ CHECK_CDEFINE(OBD_CONNECT_CROW);
CHECK_CDEFINE(OBD_CONNECT_TRUNCLOCK);
+ CHECK_CDEFINE(OBD_CONNECT_TRANSNO);
CHECK_CDEFINE(OBD_CONNECT_IBITS);
CHECK_CDEFINE(OBD_CONNECT_JOIN);
CHECK_CDEFINE(OBD_CONNECT_ATTRFID);
CHECK_CDEFINE(OBD_CONNECT_QUOTA64);
CHECK_CDEFINE(OBD_CONNECT_MDS_CAPA);
CHECK_CDEFINE(OBD_CONNECT_OSS_CAPA);
- CHECK_CDEFINE(OBD_CONNECT_MDS_MDS);
+ CHECK_CDEFINE(OBD_CONNECT_CANCELSET);
CHECK_CDEFINE(OBD_CONNECT_SOM);
CHECK_CDEFINE(OBD_CONNECT_AT);
- CHECK_CDEFINE(OBD_CONNECT_CANCELSET);
CHECK_CDEFINE(OBD_CONNECT_LRU_RESIZE);
+ CHECK_CDEFINE(OBD_CONNECT_MDS_MDS);
+ CHECK_CDEFINE(OBD_CONNECT_REAL);
+ CHECK_CDEFINE(OBD_CONNECT_CHANGE_QS);
+ CHECK_CDEFINE(OBD_CONNECT_CKSUM);
+ CHECK_CDEFINE(OBD_CONNECT_FID);
CHECK_CDEFINE(OBD_CONNECT_VBR);
+ CHECK_CDEFINE(OBD_CONNECT_LOV_V3);
+ CHECK_CDEFINE(OBD_CONNECT_GRANT_SHRINK);
CHECK_CDEFINE(OBD_CONNECT_SKIP_ORPHAN);
+ CHECK_CDEFINE(OBD_CONNECT_MAX_EASIZE);
CHECK_CDEFINE(OBD_CONNECT_FULL20);
CHECK_CDEFINE(OBD_CONNECT_LAYOUTLOCK);
CHECK_CDEFINE(OBD_CONNECT_64BITHASH);
+ CHECK_CDEFINE(OBD_CONNECT_MAXBYTES);
}
static void
CHECK_CVALUE(OBD_FL_CKSUM_ADLER);
CHECK_CVALUE(OBD_FL_SHRINK_GRANT);
CHECK_CVALUE(OBD_FL_MMAP);
- CHECK_CDEFINE(OBD_FL_RECOV_RESEND);
+ CHECK_CVALUE(OBD_FL_RECOV_RESEND);
CHECK_CVALUE(OBD_CKSUM_CRC32);
CHECK_CVALUE(OBD_CKSUM_ADLER);
}
CHECK_MEMBER(mdt_rec_rename, rn_padding_1);
CHECK_MEMBER(mdt_rec_rename, rn_padding_2);
CHECK_MEMBER(mdt_rec_rename, rn_padding_3);
- CHECK_MEMBER(mdt_rec_rename, rn_padding_4);
+ CHECK_MEMBER(mdt_rec_rename, rn_padding_4);
CHECK_MEMBER(mdt_rec_rename, rn_bias);
CHECK_MEMBER(mdt_rec_rename, rn_mode);
CHECK_MEMBER(mdt_rec_rename, rn_padding_5);
* Use is subject to license terms.
*/
/*
+ * Copyright (c) 2011 Whamcloud, Inc.
+ */
+/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*/
* Use is subject to license terms.
*/
/*
+ * Copyright (c) 2011 Whamcloud, Inc.
+ */
+/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*/
(long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_pre_versions[4]));
/* Checks for struct obd_connect_data */
- LASSERTF((int)sizeof(struct obd_connect_data) == 72, " found %lld\n",
+ LASSERTF((int)sizeof(struct obd_connect_data) == 192, " found %lld\n",
(long long)(int)sizeof(struct obd_connect_data));
LASSERTF((int)offsetof(struct obd_connect_data, ocd_connect_flags) == 0, " found %lld\n",
(long long)(int)offsetof(struct obd_connect_data, ocd_connect_flags));
(long long)(int)offsetof(struct obd_connect_data, ocd_cksum_types));
LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_cksum_types) == 4, " found %lld\n",
(long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_cksum_types));
- LASSERTF((int)offsetof(struct obd_connect_data, padding1) == 56, " found %lld\n",
+ LASSERTF((int)offsetof(struct obd_connect_data, ocd_max_easize) == 56, " found %lld\n",
+ (long long)(int)offsetof(struct obd_connect_data, ocd_max_easize));
+ LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_max_easize) == 4, " found %lld\n",
+ (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_max_easize));
+ LASSERTF((int)offsetof(struct obd_connect_data, padding) == 60, " found %lld\n",
+ (long long)(int)offsetof(struct obd_connect_data, padding));
+ LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding) == 4, " found %lld\n",
+ (long long)(int)sizeof(((struct obd_connect_data *)0)->padding));
+ LASSERTF((int)offsetof(struct obd_connect_data, ocd_maxbytes) == 64, " found %lld\n",
+ (long long)(int)offsetof(struct obd_connect_data, ocd_maxbytes));
+ LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_maxbytes) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_maxbytes));
+ LASSERTF((int)offsetof(struct obd_connect_data, padding1) == 72, " found %lld\n",
(long long)(int)offsetof(struct obd_connect_data, padding1));
LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding1) == 8, " found %lld\n",
(long long)(int)sizeof(((struct obd_connect_data *)0)->padding1));
- LASSERTF((int)offsetof(struct obd_connect_data, padding2) == 64, " found %lld\n",
+ LASSERTF((int)offsetof(struct obd_connect_data, padding2) == 80, " found %lld\n",
(long long)(int)offsetof(struct obd_connect_data, padding2));
LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding2) == 8, " found %lld\n",
(long long)(int)sizeof(((struct obd_connect_data *)0)->padding2));
- CLASSERT(OBD_CONNECT_RDONLY == 0x1ULL);
- CLASSERT(OBD_CONNECT_INDEX == 0x2ULL);
- CLASSERT(OBD_CONNECT_GRANT == 0x8ULL);
- CLASSERT(OBD_CONNECT_SRVLOCK == 0x10ULL);
- CLASSERT(OBD_CONNECT_VERSION == 0x20ULL);
- CLASSERT(OBD_CONNECT_REQPORTAL == 0x40ULL);
- CLASSERT(OBD_CONNECT_ACL == 0x80ULL);
- CLASSERT(OBD_CONNECT_XATTR == 0x100ULL);
- CLASSERT(OBD_CONNECT_REAL == 0x8000000ULL);
- CLASSERT(OBD_CONNECT_CKSUM == 0x20000000ULL);
- CLASSERT(OBD_CONNECT_TRUNCLOCK == 0x400ULL);
- CLASSERT(OBD_CONNECT_IBITS == 0x1000ULL);
- CLASSERT(OBD_CONNECT_JOIN == 0x2000ULL);
- CLASSERT(OBD_CONNECT_ATTRFID == 0x4000ULL);
- CLASSERT(OBD_CONNECT_NODEVOH == 0x8000ULL);
- CLASSERT(OBD_CONNECT_RMT_CLIENT == 0x10000ULL);
- CLASSERT(OBD_CONNECT_RMT_CLIENT_FORCE == 0x20000ULL);
- CLASSERT(OBD_CONNECT_BRW_SIZE == 0x40000ULL);
- CLASSERT(OBD_CONNECT_QUOTA64 == 0x80000ULL);
- CLASSERT(OBD_CONNECT_MDS_CAPA == 0x100000ULL);
- CLASSERT(OBD_CONNECT_OSS_CAPA == 0x200000ULL);
- CLASSERT(OBD_CONNECT_MDS_MDS == 0x4000000ULL);
- CLASSERT(OBD_CONNECT_SOM == 0x800000ULL);
- CLASSERT(OBD_CONNECT_AT == 0x1000000ULL);
- CLASSERT(OBD_CONNECT_CANCELSET == 0x400000ULL);
- CLASSERT(OBD_CONNECT_LRU_RESIZE == 0x2000000ULL);
- CLASSERT(OBD_CONNECT_VBR == 0x80000000ULL);
- CLASSERT(OBD_CONNECT_SKIP_ORPHAN == 0x400000000ULL);
- CLASSERT(OBD_CONNECT_FULL20 == 0x1000000000ULL);
- CLASSERT(OBD_CONNECT_LAYOUTLOCK == 0x2000000000ULL);
- CLASSERT(OBD_CONNECT_64BITHASH == 0x4000000000ULL);
+ CLASSERT(OBD_CONNECT_RDONLY == 0x1ULL);
+ CLASSERT(OBD_CONNECT_INDEX == 0x2ULL);
+ CLASSERT(OBD_CONNECT_MDS == 0x4ULL);
+ CLASSERT(OBD_CONNECT_GRANT == 0x8ULL);
+ CLASSERT(OBD_CONNECT_SRVLOCK == 0x10ULL);
+ CLASSERT(OBD_CONNECT_VERSION == 0x20ULL);
+ CLASSERT(OBD_CONNECT_REQPORTAL == 0x40ULL);
+ CLASSERT(OBD_CONNECT_ACL == 0x80ULL);
+ CLASSERT(OBD_CONNECT_XATTR == 0x100ULL);
+ CLASSERT(OBD_CONNECT_CROW == 0x200ULL);
+ CLASSERT(OBD_CONNECT_TRUNCLOCK == 0x400ULL);
+ CLASSERT(OBD_CONNECT_TRANSNO == 0x800ULL);
+ CLASSERT(OBD_CONNECT_IBITS == 0x1000ULL);
+ CLASSERT(OBD_CONNECT_JOIN == 0x2000ULL);
+ CLASSERT(OBD_CONNECT_ATTRFID == 0x4000ULL);
+ CLASSERT(OBD_CONNECT_NODEVOH == 0x8000ULL);
+ CLASSERT(OBD_CONNECT_RMT_CLIENT == 0x10000ULL);
+ CLASSERT(OBD_CONNECT_RMT_CLIENT_FORCE == 0x20000ULL);
+ CLASSERT(OBD_CONNECT_BRW_SIZE == 0x40000ULL);
+ CLASSERT(OBD_CONNECT_QUOTA64 == 0x80000ULL);
+ CLASSERT(OBD_CONNECT_MDS_CAPA == 0x100000ULL);
+ CLASSERT(OBD_CONNECT_OSS_CAPA == 0x200000ULL);
+ CLASSERT(OBD_CONNECT_CANCELSET == 0x400000ULL);
+ CLASSERT(OBD_CONNECT_SOM == 0x800000ULL);
+ CLASSERT(OBD_CONNECT_AT == 0x1000000ULL);
+ CLASSERT(OBD_CONNECT_LRU_RESIZE == 0x2000000ULL);
+ CLASSERT(OBD_CONNECT_MDS_MDS == 0x4000000ULL);
+ CLASSERT(OBD_CONNECT_REAL == 0x8000000ULL);
+ CLASSERT(OBD_CONNECT_CHANGE_QS == 0x10000000ULL);
+ CLASSERT(OBD_CONNECT_CKSUM == 0x20000000ULL);
+ CLASSERT(OBD_CONNECT_FID == 0x40000000ULL);
+ CLASSERT(OBD_CONNECT_VBR == 0x80000000ULL);
+ CLASSERT(OBD_CONNECT_LOV_V3 == 0x100000000ULL);
+ CLASSERT(OBD_CONNECT_GRANT_SHRINK == 0x200000000ULL);
+ CLASSERT(OBD_CONNECT_SKIP_ORPHAN == 0x400000000ULL);
+ CLASSERT(OBD_CONNECT_MAX_EASIZE == 0x800000000ULL);
+ CLASSERT(OBD_CONNECT_FULL20 == 0x1000000000ULL);
+ CLASSERT(OBD_CONNECT_LAYOUTLOCK == 0x2000000000ULL);
+ CLASSERT(OBD_CONNECT_64BITHASH == 0x4000000000ULL);
+ CLASSERT(OBD_CONNECT_MAXBYTES == 0x8000000000ULL);
/* Checks for struct obdo */
LASSERTF((int)sizeof(struct obdo) == 208, " found %lld\n",