* the right cookies are passed back to the right OSTs at the client side.
* Unset cookies should be all-zero (which will never occur naturally). */
static int lov_llog_origin_add(struct llog_ctxt *ctxt, struct llog_rec_hdr *rec,
* the right cookies are passed back to the right OSTs at the client side.
* Unset cookies should be all-zero (which will never occur naturally). */
static int lov_llog_origin_add(struct llog_ctxt *ctxt, struct llog_rec_hdr *rec,
struct llog_cookie *logcookies, int numcookies)
{
struct obd_device *obd = ctxt->loc_obd;
struct llog_cookie *logcookies, int numcookies)
{
struct obd_device *obd = ctxt->loc_obd;
"logcookies %p, numcookies %d lsm->lsm_stripe_count %d \n",
logcookies, numcookies, lsm->lsm_stripe_count);
for (i = 0; i < lsm->lsm_stripe_count; i++) {
struct lov_oinfo *loi = lsm->lsm_oinfo[i];
"logcookies %p, numcookies %d lsm->lsm_stripe_count %d \n",
logcookies, numcookies, lsm->lsm_stripe_count);
for (i = 0; i < lsm->lsm_stripe_count; i++) {
struct lov_oinfo *loi = lsm->lsm_oinfo[i];
struct llog_ctxt *cctxt = llog_get_context(child, ctxt->loc_idx);
/* fill mds unlink/setattr log record */
struct llog_ctxt *cctxt = llog_get_context(child, ctxt->loc_idx);
/* fill mds unlink/setattr log record */
- lsr->lsr_ogen = loi->loi_gr;
+ lsr->lsr_ogr = loi->loi_gr;
+ break;
+ }
+ case MDS_SETATTR64_REC: {
+ struct llog_setattr64_rec *lsr = (struct llog_setattr64_rec *)rec;
+ lsr->lsr_oid = loi->loi_id;
+ lsr->lsr_ogr = loi->loi_gr;
if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active)
continue;
if (uuid && !obd_uuid_equals(uuid, &lov->lov_tgts[i]->ltd_uuid))
if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active)
continue;
if (uuid && !obd_uuid_equals(uuid, &lov->lov_tgts[i]->ltd_uuid))
cctxt = llog_get_context(child, ctxt->loc_idx);
rc = llog_connect(cctxt, logid, gen, uuid);
llog_ctxt_put(cctxt);
cctxt = llog_get_context(child, ctxt->loc_idx);
rc = llog_connect(cctxt, logid, gen, uuid);
llog_ctxt_put(cctxt);
for (i = 0; i < count; i++, cookies++) {
struct lov_oinfo *loi = lsm->lsm_oinfo[i];
for (i = 0; i < count; i++, cookies++) {
struct lov_oinfo *loi = lsm->lsm_oinfo[i];
- rc = llog_setup(obd, olg, LLOG_MDS_OST_ORIG_CTXT, tgt, 0, NULL,
+ rc = llog_setup(obd, olg, LLOG_MDS_OST_ORIG_CTXT, disk_obd, 0, NULL,
- rc = llog_setup(obd, olg, LLOG_SIZE_REPL_CTXT, tgt, 0, NULL,
+ rc = llog_setup(obd, olg, LLOG_SIZE_REPL_CTXT, disk_obd, 0, NULL,
/* count may not match lov->desc.ld_tgt_count during dynamic ost add */
for (i = 0; i < lov->desc.ld_tgt_count; i++) {
/* count may not match lov->desc.ld_tgt_count during dynamic ost add */
for (i = 0; i < lov->desc.ld_tgt_count; i++) {
- LASSERT(lov->lov_tgts[i]->ltd_exp);
- child = lov->lov_tgts[i]->ltd_exp->exp_obd;
- rc = obd_llog_init(child, &child->obd_olg, tgt, 1, logid, uuid);
+ child = lov->lov_tgts[i]->ltd_obd;
+ rc = obd_llog_init(child, &child->obd_olg, disk_obd, &i);
- "(rc=%d)\n", i, child->obd_name, tgt->obd_name,
- rc);
- break;
+ "(rc=%d)\n", i, child->obd_name,
+ disk_obd->obd_name, rc);
+ rc = 0;