#define OBD_MD_FLCOOKIE (0x00800000ULL) /* log cancellation cookie */
#define OBD_MD_FLGROUP (0x01000000ULL) /* group */
#define OBD_MD_FLFID (0x02000000ULL) /* ->ost write inline fid */
-#define OBD_MD_FLEPOCH (0x04000000ULL) /* ->ost write easize is epoch */
+#define OBD_MD_FLEPOCH (0x04000000ULL) /* ->ost write with ioepoch */
/* ->mds if epoch opens or closes */
#define OBD_MD_FLGRANT (0x08000000ULL) /* ost preallocation space grant */
#define OBD_MD_FLDIREA (0x10000000ULL) /* dir's extended attribute data */
#define FMODE_WRITE 00000002
#endif
+/* IO Epoch is opened on a closed file. */
#define FMODE_EPOCH 01000000
-#define FMODE_EPOCHLCK 02000000
+/* IO Epoch is opened on a file truncate. */
+#define FMODE_TRUNC 02000000
+/* Size-on-MDS Attribute Update is pending. */
#define FMODE_SOM 04000000
#define FMODE_CLOSED 0
st->st_blocks = src->o_blocks;
}
+/**
+ * Assign an obtained @ioepoch to client's inode. No lock is needed, MDS does
+ * not believe attributes if a few ioepoch holders exist. Attributes for
+ * previous ioepoch if new one is opened are also skipped by MDS.
+ */
void llu_ioepoch_open(struct llu_inode_info *lli, __u64 ioepoch)
{
if (ioepoch && lli->lli_ioepoch != ioepoch) {
return rc;
}
-int llu_sizeonmds_update(struct inode *inode, struct lustre_handle *fh,
- __u64 ioepoch)
+/** Cliens updates SOM attributes on MDS: obd_getattr and md_setattr. */
+int llu_som_update(struct inode *inode, struct md_op_data *op_data)
{
struct llu_inode_info *lli = llu_i2info(inode);
struct llu_sb_info *sbi = llu_i2sbi(inode);
- struct md_op_data op_data = {{ 0 }};
struct obdo oa = { 0 };
int rc;
ENTRY;
LASSERT(!(lli->lli_flags & LLIF_MDS_SIZE_LOCK));
LASSERT(sbi->ll_lco.lco_flags & OBD_CONNECT_SOM);
+ op_data->op_flags = MF_SOM_CHANGE;
+
/* If inode is already in another epoch, skip getattr from OSTs. */
- if (lli->lli_ioepoch == ioepoch) {
- rc = llu_inode_getattr(inode, &oa);
- if (rc == -ENOENT) {
+ if (lli->lli_ioepoch == op_data->op_ioepoch) {
+ rc = llu_inode_getattr(inode, &oa, op_data->op_ioepoch);
+ if (rc) {
oa.o_valid = 0;
- CDEBUG(D_INODE, "objid "LPX64" is already destroyed\n",
- lli->lli_smd->lsm_object_id);
- } else if (rc) {
- CERROR("inode_getattr failed (%d): unable to send a "
- "Size-on-MDS attribute update for inode "
- "%llu/%lu\n", rc,
- (long long)llu_i2stat(inode)->st_ino,
- lli->lli_st_generation);
- RETURN(rc);
+ if (rc == -ENOENT)
+ CDEBUG(D_INODE, "objid "LPX64" is destroyed\n",
+ lli->lli_smd->lsm_object_id);
+ else
+ CERROR("inode_getattr failed (%d): unable to "
+ "send a Size-on-MDS attribute update "
+ "for inode %llu/%lu\n", rc,
+ (long long)llu_i2stat(inode)->st_ino,
+ lli->lli_st_generation);
+ } else {
+ CDEBUG(D_INODE, "Size-on-MDS update on "DFID"\n",
+ PFID(&lli->lli_fid));
}
- md_from_obdo(&op_data, &oa, oa.o_valid);
+ /* Install attributes into op_data. */
+ md_from_obdo(op_data, &oa, oa.o_valid);
}
- memcpy(&op_data.op_handle, fh, sizeof(*fh));
- op_data.op_ioepoch = ioepoch;
- op_data.op_flags |= MF_SOM_CHANGE;
- rc = llu_md_setattr(inode, &op_data, NULL);
+ rc = llu_md_setattr(inode, op_data, NULL);
RETURN(rc);
}
EXIT;
}
+/** Pack SOM attributes info @opdata for CLOSE, DONE_WRITING rpc. */
void llu_done_writing_attr(struct inode *inode, struct md_op_data *op_data)
{
struct llu_inode_info *lli = llu_i2info(inode);
EXIT;
}
+static void llu_prepare_close(struct inode *inode, struct md_op_data *op_data,
+ struct ll_file_data *fd)
+{
+ struct obd_client_handle *och = &fd->fd_mds_och;
+
+ op_data->op_attr.ia_valid = ATTR_MODE | ATTR_ATIME_SET |
+ ATTR_MTIME_SET | ATTR_CTIME_SET;
+
+ if (fd->fd_flags & FMODE_WRITE) {
+ struct llu_sb_info *sbi = llu_i2sbi(inode);
+ if (!(sbi->ll_lco.lco_flags & OBD_CONNECT_SOM) ||
+ !S_ISREG(llu_i2stat(inode)->st_mode)) {
+ op_data->op_attr.ia_valid |= ATTR_SIZE | ATTR_BLOCKS;
+ } else {
+ /* Inode cannot be dirty. Close the epoch. */
+ op_data->op_flags |= MF_EPOCH_CLOSE;
+ /* XXX: Send SOM attributes only if they are really
+ * changed. */
+ llu_done_writing_attr(inode, op_data);
+ }
+ }
+ llu_pack_inode2opdata(inode, op_data, &och->och_fh);
+ llu_prep_md_op_data(op_data, inode, NULL, NULL,
+ 0, 0, LUSTRE_OPC_ANY);
+}
+
int llu_md_close(struct obd_export *md_exp, struct inode *inode)
{
struct llu_inode_info *lli = llu_i2info(inode);
if (fd->fd_flags & LL_FILE_GROUP_LOCKED)
llu_put_grouplock(inode, fd->fd_grouplock.cg_gid);
- op_data.op_attr.ia_valid = ATTR_MODE | ATTR_ATIME_SET |
- ATTR_MTIME_SET | ATTR_CTIME_SET;
-
- if (lli->lli_open_flags & FMODE_WRITE) {
- struct llu_sb_info *sbi = llu_i2sbi(inode);
- if (!(sbi->ll_lco.lco_flags & OBD_CONNECT_SOM) ||
- !S_ISREG(llu_i2stat(inode)->st_mode)) {
- op_data.op_attr.ia_valid |= ATTR_SIZE | ATTR_BLOCKS;
- } else {
- /* Inode cannot be dirty. Close the epoch. */
- op_data.op_flags |= MF_EPOCH_CLOSE;
- /* XXX: Send SOM attributes only if they are really
- * changed. */
- llu_done_writing_attr(inode, &op_data);
- }
- }
- llu_pack_inode2opdata(inode, &op_data, &och->och_fh);
-
+ llu_prepare_close(inode, &op_data, fd);
rc = md_close(md_exp, &op_data, och->och_mod, &req);
if (rc == -EAGAIN) {
/* We are the last writer, so the MDS has instructed us to get
* the file size and any write cookies, then close again. */
LASSERT(lli->lli_open_flags & FMODE_WRITE);
- rc = llu_sizeonmds_update(inode, &och->och_fh,
- op_data.op_ioepoch);
+ rc = llu_som_update(inode, &op_data);
if (rc) {
CERROR("inode %llu mdc Size-on-MDS update failed: "
"rc = %d\n", (long long)st->st_ino, rc);
void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid);
int ll_it_open_error(int phase, struct lookup_intent *it);
struct inode *llu_iget(struct filesys *fs, struct lustre_md *md);
-int llu_inode_getattr(struct inode *inode, struct obdo *obdo);
+int llu_inode_getattr(struct inode *inode, struct obdo *obdo, __u64 ioepoch);
int llu_md_setattr(struct inode *inode, struct md_op_data *op_data,
struct md_open_data **mod);
int llu_setattr_raw(struct inode *inode, struct iattr *attr);
void llu_pack_inode2opdata(struct inode *inode, struct md_op_data *op_data,
struct lustre_handle *fh);
int llu_file_release(struct inode *inode);
-int llu_sizeonmds_update(struct inode *inode, struct lustre_handle *fh,
- __u64 ioepoch);
+int llu_som_update(struct inode *inode, struct md_op_data *op_data);
int llu_iop_close(struct inode *inode);
_SYSIO_OFF_T llu_iop_pos(struct inode *ino, _SYSIO_OFF_T off);
int llu_vmtruncate(struct inode * inode, loff_t offset, obd_flag obd_flags);
/*
* really does the getattr on the inode and updates its fields
*/
-int llu_inode_getattr(struct inode *inode, struct obdo *obdo)
+int llu_inode_getattr(struct inode *inode, struct obdo *obdo, __u64 ioepoch)
{
struct llu_inode_info *lli = llu_i2info(inode);
struct ptlrpc_request_set *set;
oinfo.oi_oa->o_id = lsm->lsm_object_id;
oinfo.oi_oa->o_gr = lsm->lsm_object_gr;
oinfo.oi_oa->o_mode = S_IFREG;
+ oinfo.oi_oa->o_ioepoch = ioepoch;
oinfo.oi_oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE |
OBD_MD_FLSIZE | OBD_MD_FLBLOCKS |
OBD_MD_FLBLKSZ | OBD_MD_FLMTIME |
- OBD_MD_FLCTIME | OBD_MD_FLGROUP;
+ OBD_MD_FLCTIME | OBD_MD_FLGROUP |
+ OBD_MD_FLATIME | OBD_MD_FLEPOCH;
set = ptlrpc_prep_set();
if (set == NULL) {
if (rc == -EAGAIN) {
/* MDS has instructed us to obtain Size-on-MDS attribute
* from OSTs and send setattr to back to MDS. */
- rc = llu_sizeonmds_update(inode, &op_data->op_handle,
- op_data->op_ioepoch);
+ rc = llu_som_update(inode, op_data);
} else if (rc) {
CERROR("inode %llu mdc truncate failed: rc = %d\n",
(unsigned long long)st->st_ino, rc);
op_data->op_capa1 = ll_mdscapa_get(inode);
}
+/**
+ * Closes the IO epoch and packs all the attributes into @op_data for
+ * the CLOSE rpc.
+ */
static void ll_prepare_close(struct inode *inode, struct md_op_data *op_data,
struct obd_client_handle *och)
{
out:
ll_pack_inode2opdata(inode, op_data, &och->och_fh);
+ ll_prep_md_op_data(op_data, inode, NULL, NULL,
+ 0, 0, LUSTRE_OPC_ANY, NULL);
EXIT;
}
LASSERT(epoch_close);
/* MDS has instructed us to obtain Size-on-MDS attribute from
* OSTs and send setattr to back to MDS. */
- rc = ll_sizeonmds_update(inode, &op_data->op_handle,
- op_data->op_ioepoch);
+ rc = ll_som_update(inode, op_data);
if (rc) {
CERROR("inode %lu mdc Size-on-MDS update failed: "
"rc = %d\n", inode->i_ino, rc);
RETURN(rc);
}
+/**
+ * Assign an obtained @ioepoch to client's inode. No lock is needed, MDS does
+ * not believe attributes if a few ioepoch holders exist. Attributes for
+ * previous ioepoch if new one is opened are also skipped by MDS.
+ */
void ll_ioepoch_open(struct ll_inode_info *lli, __u64 ioepoch)
{
if (ioepoch && lli->lli_ioepoch != ioepoch) {
/* Fills the obdo with the attributes for the lsm */
static int ll_lsm_getattr(struct lov_stripe_md *lsm, struct obd_export *exp,
- struct obd_capa *capa, struct obdo *obdo)
+ struct obd_capa *capa, struct obdo *obdo,
+ __u64 ioepoch)
{
struct ptlrpc_request_set *set;
struct obd_info oinfo = { { { 0 } } };
oinfo.oi_oa->o_id = lsm->lsm_object_id;
oinfo.oi_oa->o_gr = lsm->lsm_object_gr;
oinfo.oi_oa->o_mode = S_IFREG;
+ oinfo.oi_oa->o_ioepoch = ioepoch;
oinfo.oi_oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE |
OBD_MD_FLSIZE | OBD_MD_FLBLOCKS |
OBD_MD_FLBLKSZ | OBD_MD_FLATIME |
OBD_MD_FLMTIME | OBD_MD_FLCTIME |
- OBD_MD_FLGROUP;
+ OBD_MD_FLGROUP | OBD_MD_FLEPOCH;
oinfo.oi_capa = capa;
set = ptlrpc_prep_set();
RETURN(rc);
}
-/* Fills the obdo with the attributes for the inode defined by lsm */
-int ll_inode_getattr(struct inode *inode, struct obdo *obdo)
+/** Performs the getattr for @ioepoch on the inode and updates its fields. */
+int ll_inode_getattr(struct inode *inode, struct obdo *obdo, __u64 ioepoch)
{
struct ll_inode_info *lli = ll_i2info(inode);
struct obd_capa *capa = ll_mdscapa_get(inode);
int rc;
ENTRY;
- rc = ll_lsm_getattr(lli->lli_smd, ll_i2dtexp(inode), capa, obdo);
+ rc = ll_lsm_getattr(lli->lli_smd, ll_i2dtexp(inode),
+ capa, obdo, ioepoch);
capa_put(capa);
if (rc == 0) {
obdo_refresh_inode(inode, obdo, obdo->o_valid);
struct obdo obdo = { 0 };
int rc;
- rc = ll_lsm_getattr(lsm, sbi->ll_dt_exp, NULL, &obdo);
+ rc = ll_lsm_getattr(lsm, sbi->ll_dt_exp, NULL, &obdo, 0);
if (rc == 0) {
st->st_size = obdo.o_size;
st->st_blocks = obdo.o_blocks;
EXIT;
}
+/** Pack SOM attributes info @opdata for CLOSE, DONE_WRITING rpc. */
void ll_done_writing_attr(struct inode *inode, struct md_op_data *op_data)
{
struct ll_inode_info *lli = ll_i2info(inode);
EXIT;
}
-/** Closes epoch and sends Size-on-MDS attribute update if possible. Call
- * this under ll_inode_info::lli_lock spinlock. */
+/** Closes ioepoch and packs Size-on-MDS attribute if needed into @op_data. */
void ll_ioepoch_close(struct inode *inode, struct md_op_data *op_data,
- struct obd_client_handle **och, unsigned long flags)
+ struct obd_client_handle **och, unsigned long flags)
{
struct ll_inode_info *lli = ll_i2info(inode);
struct ccc_object *club = cl2ccc(ll_i2info(inode)->lli_clob);
return;
}
-int ll_sizeonmds_update(struct inode *inode, struct lustre_handle *fh,
- __u64 ioepoch)
+/**
+ * Cliens updates SOM attributes on MDS (including llog cookies):
+ * obd_getattr with no lock and md_setattr.
+ */
+int ll_som_update(struct inode *inode, struct md_op_data *op_data)
{
struct ll_inode_info *lli = ll_i2info(inode);
- struct md_op_data *op_data;
+ struct ptlrpc_request *request = NULL;
struct obdo *oa;
int rc;
ENTRY;
lli->lli_flags);
OBDO_ALLOC(oa);
- OBD_ALLOC_PTR(op_data);
- if (!oa || !op_data) {
+ if (!oa) {
CERROR("can't allocate memory for Size-on-MDS update.\n");
RETURN(-ENOMEM);
}
+
+ op_data->op_flags = MF_SOM_CHANGE;
+
/* If inode is already in another epoch, skip getattr from OSTs. */
- if (lli->lli_ioepoch == ioepoch) {
- rc = ll_inode_getattr(inode, oa);
- if (rc == -ENOENT) {
+ if (lli->lli_ioepoch == op_data->op_ioepoch) {
+ rc = ll_inode_getattr(inode, oa, op_data->op_ioepoch);
+ if (rc) {
oa->o_valid = 0;
- CDEBUG(D_INODE, "objid "LPX64" is already destroyed\n",
- lli->lli_smd->lsm_object_id);
- } else if (rc) {
- CERROR("inode_getattr failed (%d): unable to send a "
- "Size-on-MDS attribute update for inode "
- "%lu/%u\n", rc, inode->i_ino,
- inode->i_generation);
- GOTO(out, rc);
+ if (rc == -ENOENT)
+ CDEBUG(D_INODE, "objid "LPX64" is destroyed\n",
+ lli->lli_smd->lsm_object_id);
+ else
+ CERROR("inode_getattr failed (%d): unable to "
+ "send a Size-on-MDS attribute update "
+ "for inode %lu/%u\n", rc, inode->i_ino,
+ inode->i_generation);
+ } else {
+ CDEBUG(D_INODE, "Size-on-MDS update on "DFID"\n",
+ PFID(&lli->lli_fid));
}
- CDEBUG(D_INODE, "Size-on-MDS update on "DFID"\n",
- PFID(&lli->lli_fid));
+ /* Install attributes into op_data. */
md_from_obdo(op_data, oa, oa->o_valid);
}
- memcpy(&op_data->op_handle, fh, sizeof(*fh));
- op_data->op_ioepoch = ioepoch;
- op_data->op_flags |= MF_SOM_CHANGE;
+ rc = md_setattr(ll_i2sbi(inode)->ll_md_exp, op_data,
+ NULL, 0, NULL, 0, &request, NULL);
+ ptlrpc_req_finished(request);
- rc = ll_md_setattr(inode, op_data, NULL);
- EXIT;
-out:
- if (oa)
- OBDO_FREE(oa);
- if (op_data)
- ll_finish_md_op_data(op_data);
- return rc;
+ OBDO_FREE(oa);
+ RETURN(rc);
}
-/** Sends a DONE_WRITING rpc, packs Size-on-MDS attributes into it, if
- * possible */
+/**
+ * Closes the ioepoch and packs all the attributes into @op_data for
+ * DONE_WRITING rpc.
+ */
+static void ll_prepare_done_writing(struct inode *inode,
+ struct md_op_data *op_data,
+ struct obd_client_handle **och)
+{
+ ll_ioepoch_close(inode, op_data, och, LLIF_DONE_WRITING);
+ /* If there is no @och, we do not do D_W yet. */
+ if (*och == NULL)
+ return;
+
+ ll_pack_inode2opdata(inode, op_data, &(*och)->och_fh);
+ ll_prep_md_op_data(op_data, inode, NULL, NULL,
+ 0, 0, LUSTRE_OPC_ANY, NULL);
+}
+
+/** Send a DONE_WRITING rpc. */
static void ll_done_writing(struct inode *inode)
{
struct obd_client_handle *och = NULL;
return;
}
- ll_ioepoch_close(inode, op_data, &och, LLIF_DONE_WRITING);
+ ll_prepare_done_writing(inode, op_data, &och);
/* If there is no @och, we do not do D_W yet. */
if (och == NULL)
GOTO(out, 0);
- ll_pack_inode2opdata(inode, op_data, &och->och_fh);
-
rc = md_done_writing(ll_i2sbi(inode)->ll_md_exp, op_data, NULL);
if (rc == -EAGAIN) {
/* MDS has instructed us to obtain Size-on-MDS attribute from
* OSTs and send setattr to back to MDS. */
- rc = ll_sizeonmds_update(inode, &op_data->op_handle,
- op_data->op_ioepoch);
+ rc = ll_som_update(inode, op_data);
} else if (rc) {
CERROR("inode %lu mdc done_writing failed: rc = %d\n",
inode->i_ino, rc);
void ll_ioepoch_close(struct inode *inode, struct md_op_data *op_data,
struct obd_client_handle **och, unsigned long flags);
void ll_done_writing_attr(struct inode *inode, struct md_op_data *op_data);
-int ll_sizeonmds_update(struct inode *inode, struct lustre_handle *fh,
- __u64 ioepoch);
-int ll_inode_getattr(struct inode *inode, struct obdo *obdo);
+int ll_som_update(struct inode *inode, struct md_op_data *op_data);
+int ll_inode_getattr(struct inode *inode, struct obdo *obdo, __u64 ioepoch);
int ll_md_setattr(struct inode *inode, struct md_op_data *op_data,
struct md_open_data **mod);
void ll_pack_inode2opdata(struct inode *inode, struct md_op_data *op_data,
if (rc == -EAGAIN) {
/* MDS has instructed us to obtain Size-on-MDS attribute
* from OSTs and send setattr to back to MDS. */
- rc = ll_sizeonmds_update(inode, &op_data->op_handle,
- op_data->op_ioepoch);
+ rc = ll_som_update(inode, op_data);
} else if (rc) {
CERROR("inode %lu mdc truncate failed: rc = %d\n",
inode->i_ino, rc);
tgt->o_id = lsm->lsm_object_id;
if (valid & OBD_MD_FLSIZE)
tgt->o_size = lov_stripe_size(lsm,src->o_size,stripeno);
- *set = 1;
}
+ *set += 1;
}
CERROR("No stripes had valid attrs\n");
rc = -EIO;
}
+ if ((set->set_oi->oi_oa->o_valid & OBD_MD_FLEPOCH) &&
+ (set->set_oi->oi_md->lsm_stripe_count != attrset)) {
+ /* When we take attributes of some epoch, we require all the
+ * ost to be active. */
+ CERROR("Not all the stripes had valid attrs\n");
+ GOTO(out, rc = -EIO);
+ }
+
tmp_oa->o_id = set->set_oi->oi_oa->o_id;
memcpy(set->set_oi->oi_oa, tmp_oa, sizeof(*set->set_oi->oi_oa));
out:
if (!lov->lov_tgts[loi->loi_ost_idx] ||
!lov->lov_tgts[loi->loi_ost_idx]->ltd_active) {
CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx);
+ if (oinfo->oi_oa->o_valid & OBD_MD_FLEPOCH)
+ /* SOM requires all the OSTs to be active. */
+ GOTO(out_set, rc = -EIO);
continue;
}
/* Check if Size-on-MDS is enabled. */
if ((mdt_conn_flags(info) & OBD_CONNECT_SOM) &&
- S_ISREG(attr->la_mode) && mdt_sizeonmds_enabled(o)) {
+ S_ISREG(attr->la_mode) && mdt_object_is_som_enabled(o)) {
b->valid |= (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS);
b->size = attr->la_size;
b->blocks = attr->la_blocks;
struct mdt_file_data *mdt_handle2mfd(struct mdt_thread_info *,
const struct lustre_handle *);
int mdt_ioepoch_open(struct mdt_thread_info *info, struct mdt_object *o);
-void mdt_sizeonmds_enable(struct mdt_thread_info *info, struct mdt_object *mo);
-int mdt_sizeonmds_enabled(struct mdt_object *mo);
+void mdt_object_som_enable(struct mdt_thread_info *info, struct mdt_object *mo);
+int mdt_object_is_som_enabled(struct mdt_object *mo);
int mdt_write_get(struct mdt_device *mdt, struct mdt_object *o);
int mdt_write_read(struct mdt_device *mdt, struct mdt_object *o);
struct mdt_file_data *mdt_mfd_new(void);
return mo->mot_ioepoch_count;
}
-int mdt_sizeonmds_enabled(struct mdt_object *mo)
+int mdt_object_is_som_enabled(struct mdt_object *mo)
{
return !mo->mot_ioepoch;
}
/* Re-enable Size-on-MDS. */
-void mdt_sizeonmds_enable(struct mdt_thread_info *info,
- struct mdt_object *mo)
+void mdt_object_som_enable(struct mdt_thread_info *info,
+ struct mdt_object *mo)
{
spin_lock(&info->mti_mdt->mdt_ioepoch_lock);
if (info->mti_ioepoch->ioepoch == mo->mot_ioepoch) {
LA_ATIME | LA_MTIME | LA_CTIME;
RETURN(mdt_attr_set(info, o, 0));
} else
- mdt_sizeonmds_enable(info, o);
+ mdt_object_som_enable(info, o);
RETURN(0);
}
}
#define MFD_CLOSED(mode) (((mode) & ~(FMODE_EPOCH | FMODE_SOM | \
- FMODE_EPOCHLCK)) == FMODE_CLOSED)
+ FMODE_TRUNC)) == FMODE_CLOSED)
static int mdt_mfd_closed(struct mdt_file_data *mfd)
{
mode = mfd->mfd_mode;
- if ((mode & FMODE_WRITE) || (mode & FMODE_EPOCHLCK)) {
+ if ((mode & FMODE_WRITE) || (mode & FMODE_TRUNC)) {
mdt_write_put(info->mti_mdt, o);
ret = mdt_ioepoch_close(info, o);
} else if (mode & MDS_FMODE_EXEC) {
}
LASSERT(mfd->mfd_mode == FMODE_EPOCH ||
- mfd->mfd_mode == FMODE_EPOCHLCK);
+ mfd->mfd_mode == FMODE_TRUNC);
class_handle_unhash(&mfd->mfd_handle);
list_del_init(&mfd->mfd_list);
spin_unlock(&med->med_open_lock);
". Count %d\n", mo->mot_ioepoch,
PFID(mdt_object_fid(mo)), ma->ma_attr.la_size,
mo->mot_ioepoch_count);
- mdt_sizeonmds_enable(info, mo);
+ mdt_object_som_enable(info, mo);
}
EXIT;
repbody->ioepoch = mo->mot_ioepoch;
mdt_object_get(info->mti_env, mo);
- mdt_mfd_set_mode(mfd, FMODE_EPOCHLCK);
+ mdt_mfd_set_mode(mfd, FMODE_TRUNC);
mfd->mfd_object = mo;
mfd->mfd_xid = req->rq_xid;
if (valid & OBD_MD_FLGENER)
CDEBUG(D_RPCTRACE, "obdo: o_generation = %u\n",
oa->o_generation);
- if (valid & OBD_MD_FLEASIZE)
- CDEBUG(D_RPCTRACE, "obdo: o_easize = %u\n", oa->o_easize);
else if (valid & OBD_MD_FLEPOCH)
- CDEBUG(D_RPCTRACE, "obdo: o_epoc (o_easize) = %u\n", oa->o_easize);
+ CDEBUG(D_RPCTRACE, "obdo: o_ioepoch = "LPD64"\n", oa->o_ioepoch);
if (valid & OBD_MD_FLID)
CDEBUG(D_RPCTRACE, "obdo: o_stripe_idx = %u\n", oa->o_stripe_idx);
if (valid & OBD_MD_FLHANDLE)