* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
ENTRY;
LOCK_INODE_MUTEX(inode);
- ofd = inode->i_filterdata;
+ ofd = INODE_PRIVATE_DATA(inode);
if (ofd && ofd->ofd_epoch >= ioepoch) {
if (ofd->ofd_epoch > ioepoch)
if (!ofd)
GOTO(out, rc = -ENOMEM);
igrab(inode);
- inode->i_filterdata = ofd;
+ INODE_PRIVATE_DATA(inode) = ofd;
ofd->ofd_epoch = ioepoch;
}
/* the decision to write a record is now made, unlock */
oa->o_id = lur->lur_oid;
oa->o_gr = lur->lur_ogen;
oa->o_valid = OBD_MD_FLID | OBD_MD_FLGROUP;
- memcpy(obdo_logcookie(oa), cookie, sizeof(*cookie));
+ oa->o_lcookie = *cookie;
oid = oa->o_id;
- rc = filter_destroy(exp, oa, NULL, NULL, NULL);
+ rc = filter_destroy(exp, oa, NULL, NULL, NULL, NULL);
OBDO_FREE(oa);
if (rc == -ENOENT) {
CDEBUG(D_RPCTRACE, "object already removed, send cookie\n");
{
struct obd_device *obd = ctxt->loc_obd;
struct obd_export *exp = obd->obd_self_export;
- struct llog_setattr_rec *lsr;
struct obd_info oinfo = { { { 0 } } };
obd_id oid;
int rc = 0;
ENTRY;
- lsr = (struct llog_setattr_rec *)rec;
OBDO_ALLOC(oinfo.oi_oa);
if (oinfo.oi_oa == NULL)
RETURN(-ENOMEM);
+ if (rec->lrh_type == MDS_SETATTR_REC) {
+ struct llog_setattr_rec *lsr = (struct llog_setattr_rec *)rec;
+
+ oinfo.oi_oa->o_id = lsr->lsr_oid;
+ oinfo.oi_oa->o_gr = lsr->lsr_ogen;
+ oinfo.oi_oa->o_uid = lsr->lsr_uid;
+ oinfo.oi_oa->o_gid = lsr->lsr_gid;
+ } else {
+ struct llog_setattr64_rec *lsr = (struct llog_setattr64_rec *)rec;
+
+ oinfo.oi_oa->o_id = lsr->lsr_oid;
+ oinfo.oi_oa->o_gr = lsr->lsr_ogen;
+ oinfo.oi_oa->o_uid = lsr->lsr_uid;
+ oinfo.oi_oa->o_gid = lsr->lsr_gid;
+ }
+
oinfo.oi_oa->o_valid |= (OBD_MD_FLID | OBD_MD_FLUID | OBD_MD_FLGID |
OBD_MD_FLCOOKIE);
- oinfo.oi_oa->o_id = lsr->lsr_oid;
- oinfo.oi_oa->o_gr = lsr->lsr_ogen;
oinfo.oi_oa->o_valid = OBD_MD_FLID | OBD_MD_FLGROUP;
- oinfo.oi_oa->o_uid = lsr->lsr_uid;
- oinfo.oi_oa->o_gid = lsr->lsr_gid;
- memcpy(obdo_logcookie(oinfo.oi_oa), cookie, sizeof(*cookie));
+ oinfo.oi_oa->o_lcookie = *cookie;
oid = oinfo.oi_oa->o_id;
rc = filter_setattr(exp, &oinfo, NULL);
}
int filter_recov_log_mds_ost_cb(struct llog_handle *llh,
- struct llog_rec_hdr *rec, void *data)
+ struct llog_rec_hdr *rec, void *data)
{
struct llog_ctxt *ctxt = llh->lgh_ctxt;
struct llog_cookie cookie;
rc = filter_recov_log_unlink_cb(ctxt, rec, &cookie);
break;
case MDS_SETATTR_REC:
+ case MDS_SETATTR64_REC:
rc = filter_recov_log_setattr_cb(ctxt, rec, &cookie);
break;
case LLOG_GEN_REC: {