if (IS_ERR(op_data))
RETURN(PTR_ERR(op_data));
- /* swabbing is done in lov_setstripe() on server side */
+ /* swabbing is done in lov_setstripe() on server side */
rc = md_setattr(sbi->ll_md_exp, op_data, lump, lum_size, &req);
- ll_finish_md_op_data(op_data);
- ptlrpc_req_finished(req);
- if (rc) {
- if (rc != -EPERM && rc != -EACCES)
- CERROR("mdc_setattr fails: rc = %d\n", rc);
- }
+ ll_finish_md_op_data(op_data);
+ ptlrpc_req_finished(req);
+ if (rc)
+ RETURN(rc);
- /* In the following we use the fact that LOV_USER_MAGIC_V1 and
- LOV_USER_MAGIC_V3 have the same initial fields so we do not
- need the make the distiction between the 2 versions */
- if (set_default && mgc->u.cli.cl_mgc_mgsexp) {
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 9, 50, 0)
+ /*
+ * 2.9 server has stored filesystem default stripe in ROOT xattr,
+ * and it's stored into system config for backward compatibility.
+ *
+ * In the following we use the fact that LOV_USER_MAGIC_V1 and
+ * LOV_USER_MAGIC_V3 have the same initial fields so we do not
+ * need the make the distiction between the 2 versions
+ */
+ if (set_default && mgc->u.cli.cl_mgc_mgsexp) {
char *param = NULL;
char *buf;
if (param != NULL)
OBD_FREE(param, MGS_PARAM_MAXLEN);
}
+#endif
RETURN(rc);
}
}
run_test 65l "lfs find on -1 stripe dir ========================"
+test_65m() {
+ $RUNAS $SETSTRIPE -c 2 $MOUNT && error "setstripe should fail"
+ true
+}
+run_test 65m "normal user can't set filesystem default stripe"
+
# bug 2543 - update blocks count on client
test_66() {
[ $PARALLEL == "yes" ] && skip "skip parallel run" && return
argv[0], migrate_mode ? "migrate" : "create",
fname,
pool_name_arg != NULL && result == EINVAL ?
- "OST not in pool?" : strerror(result));
+ "OST not in pool?" : strerror(errno));
continue;
}
}