layer to be needed for llite->OBD operations to work properly.
- Set LOV EA size in mds_reint_unlink, so we use the EA data to unlink object.
- Remove extNisms from MDS code (mds_fs_get_md()) will return status if
there is an available EA, and what size it is.
- Handle error on open intent, to avoid spurious actions on non-existent file.
- Rename OBD_MD_FLOBJID to OBD_MD_FLEASIZE to more accurately name it.
__u64 last_committed;
__u64 transno;
__u32 status;
- __u32 bufcount;
- __u32 buflens[0];
+ __u32 bufcount;
+ __u32 buflens[0];
};
#define CONNMGR_REPLY 0
#define OBD_FL_CREATEONOPEN (0x00000004)
#define OBD_INLINESZ 60
-#define OBD_OBDMDSZ 60
+
/* Note: 64-bit types are 64-bit aligned in structure */
struct obdo {
obd_id o_id;
obd_count o_generation;
obd_flag o_valid; /* hot fields in this obdo */
obd_flag o_obdflags;
- __u32 o_easize;
+ __u32 o_easize;
char o_inline[OBD_INLINESZ];
};
#define OBD_MD_FLGENER (0x00004000)
#define OBD_MD_FLINLINE (0x00008000)
#define OBD_MD_FLRDEV (0x00010000)
-#define OBD_MD_FLOBJID (0x00020000)
+#define OBD_MD_FLEASIZE (0x00020000)
#define OBD_MD_LINKNAME (0x00040000)
#define OBD_MD_FLNOTOBD (~(OBD_MD_FLOBDFLG | OBD_MD_FLBLOCKS | OBD_MD_LINKNAME))
void mds_pack_inode2body(struct mds_body *b, struct inode *inode)
{
- b->valid = OBD_MD_FLID | OBD_MD_FLATIME | OBD_MD_FLMTIME | OBD_MD_FLCTIME | OBD_MD_FLMODE | OBD_MD_FLUID | OBD_MD_FLGID | OBD_MD_FLNLINK | OBD_MD_FLGENER | OBD_MD_FLSIZE | OBD_MD_FLOBJID;
- b->size = HTON__u64(inode->i_size);
+ b->valid = OBD_MD_FLID | OBD_MD_FLATIME | OBD_MD_FLMTIME |
+ OBD_MD_FLCTIME | OBD_MD_FLMODE | OBD_MD_FLSIZE | OBD_MD_FLUID |
+ OBD_MD_FLGID | OBD_MD_FLNLINK | OBD_MD_FLGENER;
+ b->ino = HTON__u32(inode->i_ino);
+ b->atime = HTON__u32(inode->i_atime);
+ b->mtime = HTON__u32(inode->i_mtime);
+ b->ctime = HTON__u32(inode->i_ctime);
b->mode = HTON__u32(inode->i_mode);
+ b->size = HTON__u64(inode->i_size);
b->uid = HTON__u32(inode->i_uid);
b->gid = HTON__u32(inode->i_gid);
- b->mtime = HTON__u32(inode->i_mtime);
- b->ctime = HTON__u32(inode->i_ctime);
- b->atime = HTON__u32(inode->i_atime);
b->flags = HTON__u32(inode->i_flags);
//b->major = HTON__u32(inode->i_major);
//b->minor = HTON__u32(inode->i_minor);
- b->ino = HTON__u32(inode->i_ino);
b->nlink = HTON__u32(inode->i_nlink);
b->generation = HTON__u32(inode->i_generation);
}
if (!oa) {
RETURN(-ENOMEM);
}
- oa->o_valid = OBD_MD_FLMODE;
oa->o_mode = S_IFREG | 0600;
oa->o_easize = mdc->cl_max_mdsize;
+ oa->o_valid = OBD_MD_FLMODE | OBD_MD_FLEASIZE;
rc = obd_create(ll_i2obdconn(inode), oa, &lli->lli_smd);
if (rc)
RETURN(rc);
if (!fd->fd_mdshandle)
CERROR("mdc_open didn't assign fd_mdshandle\n");
- if (oa == NULL) {
- oa = obdo_alloc();
- if (!oa)
- GOTO(out_mdc, rc = -EINVAL);
- }
+ if (oa == NULL && (oa = obdo_alloc()) == NULL)
+ GOTO(out_mdc, rc = -EINVAL);
+
oa->o_id = lli->lli_smd->lmd_object_id;
oa->o_mode = S_IFREG | inode->i_mode;
+ oa->o_valid = OBD_MD_FLMODE | OBD_MD_FLID;
rc = obd_open(ll_i2obdconn(inode), oa, lli->lli_smd);
obdo_free(oa);
oa = NULL;
out_req:
ptlrpc_free_req(req);
//out_fd:
- if (oa)
- obdo_free(oa);
+ obdo_free(oa);
kmem_cache_free(ll_file_data_slab, fd);
file->private_data = NULL;
out:
LBUG();
GOTO(out_fd, rc = -ENOENT);
}
+ oa->o_id = lli->lli_smd->lmd_object_id;
+ oa->o_mode = S_IFREG;
+ oa->o_valid = (OBD_MD_FLMODE | OBD_MD_FLID);
rc = obd_close(ll_i2obdconn(inode), oa, lli->lli_smd);
- obdo_free(oa);
+ obdo_free(oa);
if (rc)
GOTO(out_fd, abs(rc));
lock_mode = LCK_CR;
else {
LBUG();
- RETURN(-1);
+ RETURN(-EINVAL);
}
+#warning FIXME: add symlink tgt to intent and as a parameter here
err = mdc_enqueue(&sbi->ll_mdc_conn, LDLM_MDSINTENT, it, lock_mode, dir,
dentry, lockh, 0, NULL, 0, dir, sizeof(*dir));
RETURN(ERR_PTR(err));
memcpy(it->it_lock_handle, &lockh, sizeof(lockh));
- if ((it->it_op & (IT_CREAT | IT_MKDIR | IT_SYMLINK | IT_MKNOD)) &&
- it->it_disposition && !it->it_status)
- GOTO(negative, NULL);
-
- if ((it->it_op & (IT_RENAME | IT_GETATTR | IT_UNLINK | IT_RMDIR |
- IT_SETATTR | IT_LOOKUP)) &&
- it->it_disposition && it->it_status)
- GOTO(negative, NULL);
-
- request = (struct ptlrpc_request *)it->it_data;
- if (!it->it_disposition) {
+ if (it->it_disposition) {
+ offset = 1;
+ if (it->it_op & (IT_CREAT | IT_MKDIR | IT_SYMLINK | IT_MKNOD)) {
+ /* For create ops, we want the lookup to be negative */
+ request = (struct ptlrpc_request *)it->it_data;
+ if (!it->it_status)
+ GOTO(negative, NULL);
+ //else
+ // GOTO(err, it->it_status);
+ } else if (it->it_op & (IT_RENAME | IT_GETATTR | IT_UNLINK |
+ IT_RMDIR | IT_SETATTR | IT_LOOKUP |
+ IT_OPEN)) {
+ /* For remove/check, we want the lookup to succeed */
+ request = (struct ptlrpc_request *)it->it_data;
+ if (it->it_status)
+ GOTO(negative, NULL);
+ //else
+ // GOTO(err, it->it_status);
+ } else if (it->it_op == IT_RENAME2) {
+ /* Set below to be a dentry from the IT_RENAME op */
+ inode = ((struct dentry *)(it->it_data))->d_inode;
+ GOTO(out_req, NULL);
+ }
+ } else {
struct ll_inode_info *lli = ll_i2info(dir);
+ request = (struct ptlrpc_request *)it->it_data;
memcpy(&lli->lli_intent_lock_handle, &lockh, sizeof(lockh));
+ offset = 0;
ino = ll_inode_by_name(dir, dentry, &type);
#warning FIXME: handle negative inode case (see old ll_lookup)
err = mdc_getattr(&sbi->ll_mdc_conn, ino, type,
- OBD_MD_FLNOTOBD|OBD_MD_FLBLOCKS, 0, &request);
+ OBD_MD_FLNOTOBD|OBD_MD_FLEASIZE, 0, &request);
if (err) {
CERROR("failure %d inode %Ld\n", err, (long long)ino);
ptlrpc_free_req(request);
RETURN(ERR_PTR(-abs(err)));
}
- offset = 0;
- } else if (it->it_op == IT_RENAME2) {
- inode = ((struct dentry *)(it->it_data))->d_inode;
- GOTO(out_req, NULL);
- } else {
- offset = 1;
}
md.body = lustre_msg_buf(request->rq_repmsg, offset);
out_req:
ptlrpc_free_req(request);
+ request = NULL;
if (!inode || IS_ERR(inode)) {
ll_intent_release(dentry);
RETURN(ERR_PTR(-ENOMEM));
negative:
dentry->d_op = &ll_d_ops;
d_add(dentry, inode);
- if (it->it_op == IT_LOOKUP)
+ if (it->it_op == IT_LOOKUP || (it->it_op == IT_OPEN && it->it_status)) {
ll_intent_release(dentry);
+ ptlrpc_free_req(request);
+ }
return NULL;
}
struct inode *inode;
struct lov_stripe_md *smd;
struct ll_inode_info *ii = NULL;
+ ENTRY;
if (dentry->d_it->it_disposition == 0) {
memset(&oa, 0, sizeof(oa));
oa.o_valid = OBD_MD_FLMODE;
oa.o_mode = S_IFREG | 0600;
rc = obd_create(ll_i2obdconn(dir), &oa, &smd);
+ CDEBUG(D_DENTRY, "name %s mode %o o_id %lld: rc = %d\n",
+ dentry->d_name.name, mode, (long long)oa.o_id, rc);
if (rc)
RETURN(rc);
}
- CDEBUG(D_DENTRY, "name %s mode %o o_id %lld\n",
- dentry->d_name.name, mode, (unsigned long long)oa.o_id);
inode = ll_create_node(dir, dentry->d_name.name, dentry->d_name.len,
NULL, 0, mode, 0, dentry->d_it, smd);
RETURN(rc);
out_destroy:
+#warning FIXME: what about ii???
oa.o_easize = ii->lli_smd->lmd_easize;
err = obd_destroy(ll_i2obdconn(dir), &oa, ii->lli_smd);
if (err)
CDEBUG(D_INFO, "calling punch for %ld (all bytes after %Ld)\n",
(long)oa.o_id, (unsigned long long)oa.o_size);
- oa.o_size = inode->i_size;
oa.o_id = md->lmd_object_id;
oa.o_valid = OBD_MD_FLID;
/* truncate == punch to/from start from/to end:
set end to -1 for that. */
- err = obd_punch(ll_i2obdconn(inode), &oa, md, oa.o_size,
+ err = obd_punch(ll_i2obdconn(inode), &oa, md, inode->i_size,
0xffffffffffffffff);
if (err)
CERROR("obd_truncate fails (%d)\n", err);
/* XXX: need to store the last_* values somewhere */
err = mdc_getstatus(&sbi->ll_mdc_conn, &rootfid, &last_committed,
&last_rcvd, &last_xid, &request);
+ ptlrpc_req_finished(request);
if (err) {
- CERROR("cannot mdc_connect: rc = %d\n", err);
- GOTO(out_request, sb = NULL);
+ CERROR("cannot mds_connect: rc = %d\n", err);
+ GOTO(out_mdc, sb = NULL);
}
CDEBUG(D_SUPER, "rootfid %Ld\n", (unsigned long long)rootfid.id);
sbi->ll_rootino = rootfid.id;
memset(&sfs, 0, sizeof(sfs));
+ request = NULL;
err = mdc_statfs(&sbi->ll_mdc_conn, &sfs, &request);
+ ptlrpc_req_finished(request);
sb->s_blocksize = sfs.f_bsize;
sb->s_blocksize_bits = log2(sfs.f_bsize);
sb->s_magic = LL_SUPER_MAGIC;
sb->s_maxbytes = (1ULL << (32 + 9)) - sfs.f_bsize;
- ptlrpc_req_finished(request);
sb->s_op = &ll_super_operations;
/* make root inode */
+ request = NULL;
err = mdc_getattr(&sbi->ll_mdc_conn, sbi->ll_rootino, S_IFDIR,
OBD_MD_FLNOTOBD|OBD_MD_FLBLOCKS, 0, &request);
if (err) {
GOTO(out_cdb, sb = NULL);
}
- ptlrpc_free_req(request);
+ ptlrpc_req_finished(request);
out_dev:
if (mdc)
out_cdb:
ll_commitcbd_cleanup(sbi);
out_request:
- ptlrpc_free_req(request);
+ ptlrpc_req_finished(request);
obd_disconnect(&sbi->ll_osc_conn);
out_mdc:
obd_disconnect(&sbi->ll_mdc_conn);
{
if (S_ISREG(inode->i_mode)) {
int err;
- struct obdo oa;
+ struct obdo *oa;
struct lov_stripe_md *md = ll_i2info(inode)->lli_smd;
- if (!md)
+ if (!md)
GOTO(out, -EINVAL);
- oa.o_id = md->lmd_object_id;
- oa.o_easize = md->lmd_easize;
- if (oa.o_id == 0) {
+ if (md->lmd_object_id == 0) {
CERROR("This really happens\n");
/* No obdo was ever created */
GOTO(out, 0);
}
- err = obd_destroy(ll_i2obdconn(inode), &oa, md);
+ oa = obdo_alloc();
+ if (oa == NULL)
+ GOTO(out, -ENOMEM);
+
+ oa->o_id = md->lmd_object_id;
+ oa->o_easize = md->lmd_easize;
+ oa->o_mode = inode->i_mode;
+ oa->o_valid = OBD_MD_FLID | OBD_MD_FLEASIZE | OBD_MD_FLMODE;
+
+ err = obd_destroy(ll_i2obdconn(inode), oa, md);
+ obdo_free(oa);
CDEBUG(D_SUPER, "obd destroy of %Ld error %d\n",
md->lmd_object_id, err);
}
dst->i_generation = body->generation;
if (body->valid & OBD_MD_FLRDEV)
dst->i_rdev = body->extra;
+ //if (body->valid & OBD_MD_FLEASIZE)
if (md && md->md && md->md->lmd_stripe_count) {
struct lov_stripe_md *smd = md->md;
int size = ll_stripe_md_size(dst->i_sb);
CERROR("data_len should be %d, but is %d\n", sizeof(*inode),
data_len);
LBUG();
+ RETURN(-EINVAL);
}
/* FIXME: do something better than throwing away everything */
req->rq_replen = lustre_msg_size(1, repsize);
} else {
LBUG();
- RETURN(-1);
+ RETURN(-EINVAL);
}
#warning FIXME: the data here needs to be different if a lock was granted for a different inode
rc = ldlm_cli_enqueue(conn, req, obddev->obd_namespace, NULL, res_id, lock_type,
if (rc == -ENOENT || rc == ELDLM_LOCK_ABORTED) {
lock_mode = 0;
memset(lockh, 0, sizeof(*lockh));
+ /* rc = 0 */
} else if (rc != 0) {
CERROR("ldlm_cli_enqueue: %d\n", rc);
RETURN(rc);
body->size = inode->i_size;
body->mode = inode->i_mode;
body->nlink = inode->i_nlink;
- body->valid = ~0; /* FIXME: should be more selective */
+ body->valid = (OBD_MD_FLID | OBD_MD_FLATIME | OBD_MD_FLCTIME |
+ OBD_MD_FLMTIME | OBD_MD_FLSIZE | OBD_MD_FLUID |
+ OBD_MD_FLGID | OBD_MD_FLNLINK | OBD_MD_FLGENER |
+ OBD_MD_FLMODE);
if (S_ISREG(inode->i_mode)) {
rc = mds_fs_get_md(mds, inode,
CERROR("mds_fs_get_md failed: %d\n", rc);
GOTO(out, rc);
}
- }
+ body->valid |= OBD_MD_FLEASIZE;
+ } else if (S_ISLNK(inode->i_mode))
+ body->valid |= OBD_MD_LINKNAME;
+
out:
l_dput(de);
out_pop:
GOTO(out, rc = -EINVAL);
}
- if (req->rq_reqmsg->opc != MDS_CONNECT &&
- req->rq_export == NULL)
+ if (req->rq_reqmsg->opc != MDS_CONNECT && req->rq_export == NULL)
GOTO(out, rc = -ENOTCONN);
if (strcmp(req->rq_obd->obd_type->typ_name, "mds") != 0)
rc = mds_reint(0, req);
OBD_FAIL_RETURN(OBD_FAIL_MDS_REINT_NET_REP, 0);
break;
- }
+ }
case MDS_OPEN:
CDEBUG(D_INODE, "open\n");
/* a name was supplied by the client; fid1 is the directory */
dir = mds_fid2locked_dentry(obd, rec->ur_fid1, NULL, LCK_PR,
&dir_lockh);
- if (!dir || IS_ERR(dir)) {
- l_dput(dir);
+ if (IS_ERR(dir)) {
LBUG();
- GOTO(out_setattr, rc = -ESTALE);
+ GOTO(out_setattr, rc = PTR_ERR(dir));
}
name = lustre_msg_buf(req->rq_reqmsg, offset + 1);
de = mds_name2locked_dentry(obd, dir, NULL, name, namelen,
0, &child_lockh, LCK_PR);
l_dput(dir);
- if (!de || IS_ERR(de)) {
+ if (IS_ERR(de)) {
LBUG();
- GOTO(out_setattr_de, rc = -ESTALE);
+ GOTO(out_setattr_de, rc = PTR_ERR(de));
}
} else {
de = mds_fid2dentry(mds, rec->ur_fid1, NULL);
struct inode *dir;
void *handle;
struct lustre_handle lockh;
- int rc = 0, err, flags, lock_mode, type = rec->ur_mode & S_IFMT;
- __u64 res_id[3] = {0,0,0};
+ int rc = 0, err, lock_mode, type = rec->ur_mode & S_IFMT;
ENTRY;
/* requests were at offset 2, replies go back at 1 */
if (strcmp(req->rq_export->exp_obd->obd_type->typ_name, "mds") != 0)
LBUG();
- de = mds_fid2dentry(mds, rec->ur_fid1, NULL);
- if (IS_ERR(de) || OBD_FAIL_CHECK(OBD_FAIL_MDS_REINT_CREATE)) {
+ lock_mode = (req->rq_reqmsg->opc == MDS_REINT) ? LCK_CW : LCK_PW;
+
+ if (OBD_FAIL_CHECK(OBD_FAIL_MDS_REINT_CREATE))
+ GOTO(out_create, rc = -ESTALE);
+
+ de = mds_fid2locked_dentry(obd, rec->ur_fid1, NULL, lock_mode, &lockh);
+ if (IS_ERR(de)) {
+ rc = PTR_ERR(de);
+ CERROR("parent lookup error %d\n", rc);
LBUG();
- GOTO(out_create_de, rc = -ESTALE);
+ GOTO(out_create, rc);
}
dir = de->d_inode;
CDEBUG(D_INODE, "parent ino %ld name %s mode %o\n",
dir->i_ino, rec->ur_name, rec->ur_mode);
- lock_mode = (req->rq_reqmsg->opc == MDS_REINT) ? LCK_CW : LCK_PW;
- res_id[0] = dir->i_ino;
-
- rc = ldlm_lock_match(obd->obd_namespace, res_id, LDLM_PLAIN,
- NULL, 0, lock_mode, &lockh);
- if (rc == 0) {
- LDLM_DEBUG_NOLOCK("enqueue res %Lu", res_id[0]);
- rc = ldlm_cli_enqueue(NULL, NULL, obd->obd_namespace, NULL,
- res_id, LDLM_PLAIN, NULL, 0, lock_mode,
- &flags, ldlm_completion_ast, (void *)mds_lock_callback, NULL,
- 0, &lockh);
- if (rc != ELDLM_OK) {
- CERROR("lock enqueue: err: %d\n", rc);
- GOTO(out_create_de, rc = -EIO);
- }
- }
ldlm_lock_dump((void *)(unsigned long)lockh.addr);
down(&dir->i_sem);
dchild = lookup_one_len(rec->ur_name, de, rec->ur_namelen - 1);
if (IS_ERR(dchild)) {
CERROR("child lookup error %ld\n", PTR_ERR(dchild));
- up(&dir->i_sem);
LBUG();
- GOTO(out_create_dchild, rc = -ESTALE);
+ GOTO(out_create_de, rc = -ESTALE);
}
if (dchild->d_inode) {
body = lustre_msg_buf(req->rq_repmsg, offset);
mds_pack_inode2fid(&body->fid1, inode);
mds_pack_inode2body(body, inode);
-#warning FIXME: This ext3/N-specific code does not belong here
- /* If i_file_acl is set, this inode has an EA */
- if (S_ISREG(inode->i_mode) && inode->u.ext3_i.i_file_acl) {
+ if (S_ISREG(inode->i_mode)) {
md = lustre_msg_buf(req->rq_repmsg, offset + 1);
md->lmd_easize = mds->mds_max_mdsize;
- mds_fs_get_md(mds, inode, md);
+
+ if (mds_fs_get_md(mds, inode, md) < 0)
+ memset(md, 0, md->lmd_easize);
}
/* now a normal case for intent locking */
GOTO(out_create_dchild, rc = -EEXIST);
md = lustre_msg_buf(req->rq_reqmsg, 2);
rc = mds_fs_set_md(mds, inode, handle, md);
if (rc) {
- CERROR("error %d setting obdo for %ld\n",
+ CERROR("error %d setting LOV MD for %ld\n",
rc, inode->i_ino);
GOTO(out_create_unlink, rc);
}
body = lustre_msg_buf(req->rq_repmsg, offset);
body->ino = inode->i_ino;
body->generation = inode->i_generation;
+ body->valid = OBD_MD_FLID | OBD_MD_FLGENER;
}
EXIT;
out_create_commit:
}
out_create_dchild:
l_dput(dchild);
- up(&dir->i_sem);
ldlm_lock_decref(&lockh, lock_mode);
out_create_de:
+ up(&dir->i_sem);
l_dput(de);
+out_create:
req->rq_status = rc;
return 0;
RETURN(PTR_ERR(de));
}
-
name = lustre_msg_buf(req->rq_reqmsg, offset + 1);
namelen = req->rq_reqmsg->buflens[offset + 1] - 1;
dchild = mds_name2locked_dentry(obd, de, NULL, name, namelen,
OBD_FAIL_WRITE(OBD_FAIL_MDS_REINT_UNLINK_WRITE, dir->i_sb->s_dev);
+#warning FIXME: the file type needs to match the original requested operation
switch (inode->i_mode & S_IFMT) {
case S_IFDIR:
handle = mds_fs_start(mds, dir, MDS_FSOP_RMDIR);
rc = vfs_rmdir(dir, dchild);
break;
case S_IFREG:
- if (inode->u.ext3_i.i_file_acl && offset) {
+ if (offset) {
struct lov_stripe_md *md;
- md = lustre_msg_buf(req->rq_repmsg, 2);
- rc = mds_fs_get_md(mds, inode, md);
- if (rc < 0) {
- CDEBUG(D_INFO, "No md for ino %ld err %d\n",
+
+ md = lustre_msg_buf(req->rq_repmsg, 2);
+ md->lmd_easize = mds->mds_max_mdsize;
+ if ((rc = mds_fs_get_md(mds, inode, md)) < 0) {
+ CDEBUG(D_INFO, "No md for ino %ld: rc = %d\n",
inode->i_ino, rc);
- memset(md, 0, md->lmd_easize);
+ memset(md, 0, md->lmd_easize);
}
}
+ /* No break */
default:
handle = mds_fs_start(mds, dir, MDS_FSOP_UNLINK);
if (!handle)
RETURN(-ENOMEM);
body = lustre_msg_buf(request->rq_reqmsg, 0);
+#warning FIXME: pack only valid fields instead of memcpy, endianness
memcpy(&body->oa, oa, sizeof(*oa));
- body->oa.o_valid = ~0;
request->rq_replen = lustre_msg_size(1, &size);
RETURN(-ENOMEM);
body = lustre_msg_buf(request->rq_reqmsg, 0);
+#warning FIXME: pack only valid fields instead of memcpy, endianness
memcpy(&body->oa, oa, sizeof(*oa));
- body->oa.o_valid = (OBD_MD_FLMODE | OBD_MD_FLID);
request->rq_replen = lustre_msg_size(1, &size);
if (!request)
RETURN(-ENOMEM);
- oa->o_id = md->lmd_object_id;
- oa->o_mode = S_IFREG;
- oa->o_valid = (OBD_MD_FLMODE | OBD_MD_FLID);
body = lustre_msg_buf(request->rq_reqmsg, 0);
+#warning FIXME: pack only valid fields instead of memcpy, endianness
memcpy(&body->oa, oa, sizeof(*oa));
request->rq_replen = lustre_msg_size(1, &size);
RETURN(-ENOMEM);
body = lustre_msg_buf(request->rq_reqmsg, 0);
+#warning FIXME: pack only valid fields instead of memcpy, endianness, valid
memcpy(&body->oa, oa, sizeof(*oa));
/* overload the blocks and size fields in the oa with start/end */
+#warning FIXME: endianness, size=start, blocks=end?
body->oa.o_blocks = start;
body->oa.o_size = end;
body->oa.o_valid |= OBD_MD_FLBLOCKS | OBD_MD_FLSIZE;
RETURN(-ENOMEM);
body = lustre_msg_buf(request->rq_reqmsg, 0);
+#warning FIXME: pack only valid fields instead of memcpy, endianness
memcpy(&body->oa, oa, sizeof(*oa));
- body->oa.o_valid = ~0;
request->rq_replen = lustre_msg_size(1, &size);