Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Branch HEAD
[fs/lustre-release.git]
/
lustre
/
liblustre
/
file.c
diff --git
a/lustre/liblustre/file.c
b/lustre/liblustre/file.c
index
cf5267b
..
34706f3
100644
(file)
--- a/
lustre/liblustre/file.c
+++ b/
lustre/liblustre/file.c
@@
-112,7
+112,8
@@
void obdo_refresh_inode(struct inode *dst,
valid &= src->o_valid;
if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
valid &= src->o_valid;
if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
- CDEBUG(D_INODE,"valid "LPX64", cur time %lu/%lu, new %lu/%lu\n",
+ CDEBUG(D_INODE,"valid "LPX64", cur time "CFS_TIME_T"/"CFS_TIME_T
+ ", new %lu/%lu\n",
src->o_valid, LTIME_S(st->st_mtime),
LTIME_S(st->st_ctime),
(long)src->o_mtime, (long)src->o_ctime);
src->o_valid, LTIME_S(st->st_mtime),
LTIME_S(st->st_ctime),
(long)src->o_mtime, (long)src->o_ctime);
@@
-146,10
+147,8
@@
int llu_local_open(struct llu_inode_info *lli, struct lookup_intent *it)
struct mdt_body *body;
ENTRY;
struct mdt_body *body;
ENTRY;
- body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF, sizeof(*body));
- LASSERT(body != NULL); /* reply already checked out */
- /* and swabbed down */
- LASSERT(lustre_rep_swabbed(req, DLM_REPLY_REC_OFF));
+ body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
+ LASSERT(body != NULL);
/* already opened? */
if (lli->lli_open_count++)
/* already opened? */
if (lli->lli_open_count++)
@@
-246,7
+245,7
@@
int llu_iop_open(struct pnode *pnode, int flags, mode_t mode)
RETURN(rc);
}
RETURN(rc);
}
-int llu_objects_destroy(struct ptlrpc_request *req
uest
, struct inode *dir)
+int llu_objects_destroy(struct ptlrpc_request *req, struct inode *dir)
{
struct mdt_body *body;
struct lov_mds_md *eadata;
{
struct mdt_body *body;
struct lov_mds_md *eadata;
@@
-256,8
+255,7
@@
int llu_objects_destroy(struct ptlrpc_request *request, struct inode *dir)
int rc;
ENTRY;
int rc;
ENTRY;
- /* req is swabbed so this is safe */
- body = lustre_msg_buf(request->rq_repmsg, REPLY_REC_OFF, sizeof(*body));
+ body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
if (!(body->valid & OBD_MD_FLEASIZE))
RETURN(0);
if (!(body->valid & OBD_MD_FLEASIZE))
RETURN(0);
@@
-271,13
+269,10
@@
int llu_objects_destroy(struct ptlrpc_request *request, struct inode *dir)
* to this file. Use this EA to unlink the objects on the OST.
* It's opaque so we don't swab here; we leave it to obd_unpackmd() to
* check it is complete and sensible. */
* to this file. Use this EA to unlink the objects on the OST.
* It's opaque so we don't swab here; we leave it to obd_unpackmd() to
* check it is complete and sensible. */
- eadata = lustre_swab_repbuf(request, REPLY_REC_OFF+1, body->eadatasize,
- NULL);
+ eadata = req_capsule_server_sized_get(&req->rq_pill, &RMF_MDT_MD,
+ body->eadatasize);
+
LASSERT(eadata != NULL);
LASSERT(eadata != NULL);
- if (eadata == NULL) {
- CERROR("Can't unpack MDS EA data\n");
- GOTO(out, rc = -EPROTO);
- }
rc = obd_unpackmd(llu_i2obdexp(dir), &lsm, eadata,body->eadatasize);
if (rc < 0) {
rc = obd_unpackmd(llu_i2obdexp(dir), &lsm, eadata,body->eadatasize);
if (rc < 0) {
@@
-298,9
+293,10
@@
int llu_objects_destroy(struct ptlrpc_request *request, struct inode *dir)
if (body->valid & OBD_MD_FLCOOKIE) {
oa->o_valid |= OBD_MD_FLCOOKIE;
oti.oti_logcookies =
if (body->valid & OBD_MD_FLCOOKIE) {
oa->o_valid |= OBD_MD_FLCOOKIE;
oti.oti_logcookies =
- lustre_msg_buf(request->rq_repmsg, REPLY_REC_OFF + 2,
- sizeof(struct llog_cookie) *
- lsm->lsm_stripe_count);
+ req_capsule_server_sized_get(&req->rq_pill,
+ &RMF_LOGCOOKIES,
+ sizeof(struct llog_cookie) *
+ lsm->lsm_stripe_count);
if (oti.oti_logcookies == NULL) {
oa->o_valid &= ~OBD_MD_FLCOOKIE;
body->valid &= ~OBD_MD_FLCOOKIE;
if (oti.oti_logcookies == NULL) {
oa->o_valid &= ~OBD_MD_FLCOOKIE;
body->valid &= ~OBD_MD_FLCOOKIE;
@@
-485,7
+481,7
@@
int llu_iop_close(struct inode *inode)
}
/* if open count == 0 && stale_flag is set, should we
* remove the inode immediately? */
}
/* if open count == 0 && stale_flag is set, should we
* remove the inode immediately? */
- liblustre_wait_
event(0
);
+ liblustre_wait_
idle(
);
return 0;
}
return 0;
}