* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2013, Intel Corporation.
+ * Copyright (c) 2011, 2014, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
if (rc != 0)
RETURN(rc);
- rc = __mdd_lookup(env, pobj, pattr, lname, fid, MAY_EXEC);
+ rc = __mdd_lookup(env, pobj, pattr, lname, fid,
+ (spec != NULL && spec->sp_permitted) ? 0 : MAY_EXEC);
RETURN(rc);
}
struct lu_buf *mdd_links_get(const struct lu_env *env,
struct mdd_object *mdd_obj)
{
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
int rc;
rc = mdd_links_read(env, mdd_obj, &ldata);
/* During creation, there are only a few cases we need do xattr_set to
* create stripes.
* 1. regular file: see comments above.
- * 2. create striped directory with provided stripeEA.
- * 3. create striped directory because inherit default layout from the
- * parent. */
+ * 2. dir: inherit default striping or pool settings from parent.
+ * 3. create striped directory with provided stripeEA.
+ * 4. create striped directory because inherit default layout from the
+ * parent.
+ */
if (spec->no_create ||
(S_ISREG(attr->la_mode) && spec->sp_cr_flags & MDS_OPEN_HAS_EA) ||
S_ISDIR(attr->la_mode)) {
bool declare)
{
struct mdd_thread_info *info = mdd_env_info(env);
- struct linkea_data ldata = {0};
+ struct linkea_data ldata = { NULL };
struct lu_buf *buf = &info->mti_link_buf;
int count;
int rc = 0;
struct mdd_thread_info *info = mdd_env_info(env);
struct mdd_device *mdd = mdo2mdd(&mdd_sobj->mod_obj);
struct md_op_spec *spec = &info->mti_spec;
- struct lu_buf lmm_buf = { 0 };
- struct lu_buf link_buf = { 0 };
+ struct lu_buf lmm_buf = { NULL };
+ struct lu_buf link_buf = { NULL };
const struct lu_buf *buf;
struct thandle *handle;
struct lmv_mds_md_v1 *mgr_ea;
if (unlikely(OBD_FAIL_CHECK_RESET(OBD_FAIL_MIGRATE_NET_REP,
OBD_FAIL_MDS_REINT_NET_REP)))
GOTO(put, rc = 0);
+ } else {
+ OBD_FAIL_TIMEOUT(OBD_FAIL_MIGRATE_DELAY, cfs_fail_val);
}
/* step 4: update name entry to the new object */