* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
rec->sa_ctime = LTIME_S(op_data->op_attr.ia_ctime);
rec->sa_attr_flags = ((struct ll_iattr *)&op_data->op_attr)->ia_attr_flags;
if ((op_data->op_attr.ia_valid & ATTR_GID) &&
- in_group_p(op_data->op_attr.ia_gid))
+ cfs_curproc_is_in_groups(op_data->op_attr.ia_gid))
rec->sa_suppgid = op_data->op_attr.ia_gid;
else
rec->sa_suppgid = op_data->op_suppgids[0];
{
struct mdt_rec_setattr *rec;
struct mdt_ioepoch *epoch;
+ struct lov_user_md *lum = NULL;
CLASSERT(sizeof(struct mdt_rec_reint) ==sizeof(struct mdt_rec_setattr));
rec = req_capsule_client_get(&req->rq_pill, &RMF_REC_REINT);
if (ealen == 0)
return;
- memcpy(req_capsule_client_get(&req->rq_pill, &RMF_EADATA), ea, ealen);
+ lum = req_capsule_client_get(&req->rq_pill, &RMF_EADATA);
+ if (ea == NULL) { /* Remove LOV EA */
+ lum->lmm_magic = LOV_USER_MAGIC_V1;
+ lum->lmm_stripe_size = 0;
+ lum->lmm_stripe_count = 0;
+ lum->lmm_stripe_offset = (typeof(lum->lmm_stripe_offset))(-1);
+ } else {
+ memcpy(lum, ea, ealen);
+ }
if (ea2len == 0)
return;
b->valid |= OBD_MD_FLCKSPLIT;
if (op_data->op_bias & MDS_CROSS_REF)
b->valid |= OBD_MD_FLCROSSREF;
- b->flags = flags | MDS_BFLAG_EXT_FLAGS;
+ b->flags = flags;
b->suppgid = op_data->op_suppgids[0];
b->fid1 = op_data->op_fid1;
int rc;
ENTRY;
client_obd_list_lock(&cli->cl_loi_list_lock);
- rc = list_empty(&mcw->mcw_entry);
+ rc = cfs_list_empty(&mcw->mcw_entry);
client_obd_list_unlock(&cli->cl_loi_list_lock);
RETURN(rc);
};
client_obd_list_lock(&cli->cl_loi_list_lock);
if (cli->cl_r_in_flight >= cli->cl_max_rpcs_in_flight) {
- list_add_tail(&mcw.mcw_entry, &cli->cl_cache_waiters);
+ cfs_list_add_tail(&mcw.mcw_entry, &cli->cl_cache_waiters);
cfs_waitq_init(&mcw.mcw_waitq);
client_obd_list_unlock(&cli->cl_loi_list_lock);
l_wait_event(mcw.mcw_waitq, mdc_req_avail(cli, &mcw), &lwi);
void mdc_exit_request(struct client_obd *cli)
{
- struct list_head *l, *tmp;
+ cfs_list_t *l, *tmp;
struct mdc_cache_waiter *mcw;
client_obd_list_lock(&cli->cl_loi_list_lock);
cli->cl_r_in_flight--;
- list_for_each_safe(l, tmp, &cli->cl_cache_waiters) {
+ cfs_list_for_each_safe(l, tmp, &cli->cl_cache_waiters) {
if (cli->cl_r_in_flight >= cli->cl_max_rpcs_in_flight) {
/* No free request slots anymore */
break;
}
- mcw = list_entry(l, struct mdc_cache_waiter, mcw_entry);
- list_del_init(&mcw->mcw_entry);
+ mcw = cfs_list_entry(l, struct mdc_cache_waiter, mcw_entry);
+ cfs_list_del_init(&mcw->mcw_entry);
cli->cl_r_in_flight++;
cfs_waitq_signal(&mcw->mcw_waitq);
}