-tbd Cluster File Systems, Inc. <info@clusterfs.com>
+2004-03-04 Cluster File Systems, Inc. <info@clusterfs.com>
* version 1.2.0
* bug fixes
- account for cache space usage on clients to avoid data loss (974)
struct ost_lvb {
__u64 lvb_size;
- __u64 lvb_time;
+ __u64 lvb_mtime;
__u64 lvb_atime;
__u64 lvb_ctime;
__u64 lvb_blocks;
f_dput(dentry);
lvb->lvb_size = dentry->d_inode->i_size;
- lvb->lvb_time = LTIME_S(dentry->d_inode->i_mtime);
- CDEBUG(D_DLMTRACE, "res: "LPU64" initial lvb size: "LPU64", time: "
- LPU64"\n", res->lr_name.name[0], lvb->lvb_size, lvb->lvb_time);
+ lvb->lvb_mtime = LTIME_S(dentry->d_inode->i_mtime);
+ CDEBUG(D_DLMTRACE, "res: "LPU64" initial lvb size: "LPU64", mtime: "
+ LPU64"\n", res->lr_name.name[0], lvb->lvb_size, lvb->lvb_mtime);
out:
if (oa)
lvb->lvb_size, new->lvb_size);
lvb->lvb_size = new->lvb_size;
}
- if (new->lvb_time > lvb->lvb_time) {
- CDEBUG(D_DLMTRACE, "res: "LPU64" updating lvb time: "
+ if (new->lvb_mtime > lvb->lvb_mtime) {
+ CDEBUG(D_DLMTRACE, "res: "LPU64" updating lvb mtime: "
LPU64" -> "LPU64"\n", res->lr_name.name[0],
- lvb->lvb_time, new->lvb_time);
- lvb->lvb_time = new->lvb_time;
+ lvb->lvb_mtime, new->lvb_mtime);
+ lvb->lvb_mtime = new->lvb_mtime;
}
GOTO(out, rc = 0);
}
obdo_from_inode(oa, dentry->d_inode, FILTER_VALID_FLAGS);
lvb->lvb_size = dentry->d_inode->i_size;
- lvb->lvb_time = LTIME_S(dentry->d_inode->i_mtime);
- CDEBUG(D_DLMTRACE, "res: "LPU64" disk lvb size: "LPU64", time: "
- LPU64"\n", res->lr_name.name[0], lvb->lvb_size, lvb->lvb_time);
+ lvb->lvb_mtime = LTIME_S(dentry->d_inode->i_mtime);
+ CDEBUG(D_DLMTRACE, "res: "LPU64" disk lvb size: "LPU64", mtime: "
+ LPU64"\n", res->lr_name.name[0], lvb->lvb_size, lvb->lvb_mtime);
f_dput(dentry);
out:
{
char *ptr;
int i;
-
+
msg->magic = PTLRPC_MSG_MAGIC;
msg->version = PTLRPC_MSG_VERSION;
msg->bufcount = count;
}
}
-int lustre_pack_request (struct ptlrpc_request *req,
+int lustre_pack_request (struct ptlrpc_request *req,
int count, int *lens, char **bufs)
{
ENTRY;
-
+
req->rq_reqlen = lustre_msg_size (count, lens);
OBD_ALLOC(req->rq_reqmsg, req->rq_reqlen);
if (req->rq_reqmsg == NULL)
void lustre_swab_ost_lvb(struct ost_lvb *lvb)
{
__swab64s(&lvb->lvb_size);
- __swab64s(&lvb->lvb_time);
+ __swab64s(&lvb->lvb_mtime);
+ __swab64s(&lvb->lvb_atime);
+ __swab64s(&lvb->lvb_ctime);
+ __swab64s(&lvb->lvb_blocks);
}
void lustre_swab_ll_fid (struct ll_fid *fid)
LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2) == 8, " found %lld\n",
(long long)(int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2));
+ /* Checks for struct ost_lvb */
+ LASSERTF((int)sizeof(struct ost_lvb) == 40, " found %lld\n",
+ (long long)(int)sizeof(struct ost_lvb));
+ LASSERTF(offsetof(struct ost_lvb, lvb_size) == 0, " found %lld\n",
+ (long long)offsetof(struct ost_lvb, lvb_size));
+ LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_size) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_size));
+ LASSERTF(offsetof(struct ost_lvb, lvb_mtime) == 8, " found %lld\n",
+ (long long)offsetof(struct ost_lvb, lvb_mtime));
+ LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_mtime) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_mtime));
+ LASSERTF(offsetof(struct ost_lvb, lvb_atime) == 16, " found %lld\n",
+ (long long)offsetof(struct ost_lvb, lvb_atime));
+ LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_atime) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_atime));
+ LASSERTF(offsetof(struct ost_lvb, lvb_ctime) == 24, " found %lld\n",
+ (long long)offsetof(struct ost_lvb, lvb_ctime));
+ LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_ctime) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_ctime));
+ LASSERTF(offsetof(struct ost_lvb, lvb_blocks) == 32, " found %lld\n",
+ (long long)offsetof(struct ost_lvb, lvb_blocks));
+ LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_blocks) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_blocks));
+
/* Checks for struct ptlbd_op */
LASSERTF((int)sizeof(struct ptlbd_op) == 12, " found %lld\n",
(long long)(int)sizeof(struct ptlbd_op));
(long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx));
}
+
}
void
+check_ldlm_lvb(void)
+{
+ BLANK_LINE();
+ CHECK_STRUCT(ost_lvb);
+ CHECK_MEMBER(ost_lvb, lvb_size);
+ CHECK_MEMBER(ost_lvb, lvb_mtime);
+ CHECK_MEMBER(ost_lvb, lvb_atime);
+ CHECK_MEMBER(ost_lvb, lvb_ctime);
+ CHECK_MEMBER(ost_lvb, lvb_blocks);
+}
+
+void
check_ptlbd_op(void)
{
BLANK_LINE();
check_ldlm_lock_desc();
check_ldlm_request();
check_ldlm_reply();
+ check_ldlm_lvb();
check_ptlbd_op();
check_ptlbd_niob();
check_ptlbd_rsp();
LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2) == 8, " found %lld\n",
(long long)(int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2));
+ /* Checks for struct ost_lvb */
+ LASSERTF((int)sizeof(struct ost_lvb) == 40, " found %lld\n",
+ (long long)(int)sizeof(struct ost_lvb));
+ LASSERTF(offsetof(struct ost_lvb, lvb_size) == 0, " found %lld\n",
+ (long long)offsetof(struct ost_lvb, lvb_size));
+ LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_size) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_size));
+ LASSERTF(offsetof(struct ost_lvb, lvb_mtime) == 8, " found %lld\n",
+ (long long)offsetof(struct ost_lvb, lvb_mtime));
+ LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_mtime) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_mtime));
+ LASSERTF(offsetof(struct ost_lvb, lvb_atime) == 16, " found %lld\n",
+ (long long)offsetof(struct ost_lvb, lvb_atime));
+ LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_atime) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_atime));
+ LASSERTF(offsetof(struct ost_lvb, lvb_ctime) == 24, " found %lld\n",
+ (long long)offsetof(struct ost_lvb, lvb_ctime));
+ LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_ctime) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_ctime));
+ LASSERTF(offsetof(struct ost_lvb, lvb_blocks) == 32, " found %lld\n",
+ (long long)offsetof(struct ost_lvb, lvb_blocks));
+ LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_blocks) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_blocks));
+
/* Checks for struct ptlbd_op */
LASSERTF((int)sizeof(struct ptlbd_op) == 12, " found %lld\n",
(long long)(int)sizeof(struct ptlbd_op));