/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2011 Whamcloud, Inc.
+ *
*/
/*
* This file is part of Lustre, http://www.lustre.org/
repbody->ioepoch = mo->mot_ioepoch;
mdt_object_get(info->mti_env, mo);
- mdt_mfd_set_mode(mfd, FMODE_TRUNC);
+ mdt_mfd_set_mode(mfd, MDS_FMODE_TRUNC);
mfd->mfd_object = mo;
mfd->mfd_xid = req->rq_xid;
info->mti_ioepoch->handle.cookie);
GOTO(out_put, rc = -ESTALE);
}
- LASSERT(mfd->mfd_mode == FMODE_SOM);
+ LASSERT(mfd->mfd_mode == MDS_FMODE_SOM);
LASSERT(!(info->mti_ioepoch->flags & MF_EPOCH_CLOSE));
class_handle_unhash(&mfd->mfd_handle);
/* Close the found mfd, update attributes. */
ma->ma_lmm_size = info->mti_mdt->mdt_max_mdsize;
- OBD_ALLOC(ma->ma_lmm, info->mti_mdt->mdt_max_mdsize);
+ OBD_ALLOC_LARGE(ma->ma_lmm, info->mti_mdt->mdt_max_mdsize);
if (ma->ma_lmm == NULL)
GOTO(out_put, rc = -ENOMEM);
mdt_mfd_close(info, mfd);
- OBD_FREE(ma->ma_lmm, info->mti_mdt->mdt_max_mdsize);
+ OBD_FREE_LARGE(ma->ma_lmm, info->mti_mdt->mdt_max_mdsize);
} else {
rc = mdt_attr_set(info, mo, ma, rr->rr_flags);
if (rc)
out_put:
mdt_object_put(info->mti_env, mo);
out:
+ if (rc == 0)
+ mdt_counter_incr(req->rq_export, LPROC_MDT_SETATTR);
+
mdt_shrink_reply(info);
return rc;
}