Clients and MDSs have supported and required OBD_CONNECT_IBITS since
before 1.6 so remove obsolete code to handle clients that do not
support this flag.
Lustre-change: https://review.whamcloud.com/30009
Lustre-commit:
c7a833830de691967081cd7a42199b924ea7efdc
Change-Id: I9233bc3cdc5b4e2543c25e44e68acbecf77ff81d
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: https://review.whamcloud.com/30009
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34027
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
#define OBD_CONNECT_LARGE_ACL 0x200ULL /* more than 32 ACL entries */
#define OBD_CONNECT_TRUNCLOCK 0x400ULL /*locks on server for punch */
#define OBD_CONNECT_TRANSNO 0x800ULL /*replay sends init transno */
-#define OBD_CONNECT_IBITS 0x1000ULL /*support for inodebits locks*/
+#define OBD_CONNECT_IBITS 0x1000ULL /* not checked in 2.11+ */
#define OBD_CONNECT_BARRIER 0x2000ULL /* write barrier */
#define OBD_CONNECT_ATTRFID 0x4000ULL /*Server can GetAttr By Fid*/
#define OBD_CONNECT_NODEVOH 0x8000ULL /*No open hndl on specl nodes*/
#define MGS_CONNECT_SUPPORTED2 0
/* Features required for this version of the client to work with server */
-#define CLIENT_CONNECT_MDT_REQD (OBD_CONNECT_IBITS | OBD_CONNECT_FID | \
- OBD_CONNECT_FULL20)
+#define CLIENT_CONNECT_MDT_REQD (OBD_CONNECT_FID | \
+ OBD_CONNECT_FULL20)
/* This structure is used for both request and reply.
*
GOTO(out, rc = -EFAULT);
}
- if (exp_connect_flags(req->rq_export) & OBD_CONNECT_IBITS) {
- if (unlikely(dlm_req->lock_desc.l_resource.lr_type ==
- LDLM_PLAIN)) {
- DEBUG_REQ(D_ERROR, req,
- "PLAIN lock request from IBITS client?");
- GOTO(out, rc = -EPROTO);
- }
- } else if (unlikely(dlm_req->lock_desc.l_resource.lr_type ==
- LDLM_IBITS)) {
- DEBUG_REQ(D_ERROR, req,
- "IBITS lock request from unaware client?");
- GOTO(out, rc = -EPROTO);
- }
-
if (unlikely((flags & LDLM_FL_REPLAY) ||
(lustre_msg_get_flags(req->rq_reqmsg) & MSG_RESENT))) {
/* Find an existing lock in the per-export lock hash */
GOTO(cleanup, rc = -ENOMEM);
LDLM_DEBUG(lock, "client-side enqueue, new resource");
}
- if (with_policy)
- if (!(type == LDLM_IBITS &&
- !(exp_connect_flags(exp) & OBD_CONNECT_IBITS)))
- /* We assume lock type cannot change on server*/
- ldlm_convert_policy_to_local(exp,
+
+ if (with_policy) {
+ /* We assume lock type cannot change on server*/
+ ldlm_convert_policy_to_local(exp,
lock->l_resource->lr_type,
&reply->lock_desc.l_policy_data,
&lock->l_policy_data);
+ }
+
if (type != LDLM_PLAIN)
LDLM_DEBUG(lock,"client-side enqueue, new policy data");
}
data->ocd_ibits_known &= MDS_INODELOCK_FULL;
- if (!(data->ocd_connect_flags & OBD_CONNECT_MDS_MDS) &&
- !(data->ocd_connect_flags & OBD_CONNECT_IBITS)) {
- CWARN("%s: client %s does not support ibits lock, either "
- "very old or an invalid client: flags %#llx\n",
- mdt_obd_name(mdt), exp->exp_client_uuid.uuid,
- data->ocd_connect_flags);
- return -EBADE;
- }
-
if (!mdt->mdt_opts.mo_acl)
data->ocd_connect_flags &= ~OBD_CONNECT_ACL;
static bool warned;
struct client_obd *cli = &imp->imp_obd->u.cli;
- if ((imp->imp_connect_flags_orig & OBD_CONNECT_IBITS) &&
- !(ocd->ocd_connect_flags & OBD_CONNECT_IBITS)) {
- LCONSOLE_WARN("%s: MDS %s does not support ibits "
- "lock, either very old or invalid: "
- "requested %#llx, replied %#llx\n",
- imp->imp_obd->obd_name,
- imp->imp_connection->c_remote_uuid.uuid,
- imp->imp_connect_flags_orig,
- ocd->ocd_connect_flags);
- return -EPROTO;
- }
-
spin_lock(&imp->imp_lock);
list_del(&imp->imp_conn_current->oic_item);
list_add(&imp->imp_conn_current->oic_item,