[PVFS2-CVS]
commit by robl in pvfs2-1/src/client/sysint: sys-setattr.sm
CVS commit program
cvs at parl.clemson.edu
Wed Jun 8 12:49:29 EDT 2005
Update of /projects/cvsroot/pvfs2-1/src/client/sysint
In directory parlweb:/tmp/cvs-serv9495/src/client/sysint
Modified Files:
Tag: pvfs2-bugfix-67
sys-setattr.sm
Log Message:
phil's patch which "Prevents the client library from allowing the dfile_array
and distribution from being overwritten during a setattr operation. These
fields shouldn't be writable once a file is created"
Index: sys-setattr.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/client/sysint/sys-setattr.sm,v
diff -u -w -p -u -r1.34 -r1.34.10.1
--- sys-setattr.sm 11 Jan 2005 14:00:26 -0000 1.34
+++ sys-setattr.sm 8 Jun 2005 15:49:28 -0000 1.34.10.1
@@ -251,31 +251,19 @@ static int setattr_msg_setup_msgpair(PIN
sm_p->u.setattr.sys_attr,
PVFS_ATTR_COMMON_TYPE);
- if (attr->objtype == PVFS_TYPE_METAFILE)
- {
- if (attr->mask & PVFS_ATTR_META_DFILES)
- {
- msg_p->req.u.setattr.attr.u.meta.dfile_array =
- attr->u.meta.dfile_array;
- msg_p->req.u.setattr.attr.u.meta.dfile_count =
- attr->u.meta.dfile_count;
- msg_p->req.u.setattr.attr.mask |= PVFS_ATTR_META_DFILES;
- }
-
- if (attr->mask & PVFS_ATTR_META_DIST)
- {
- msg_p->req.u.setattr.attr.u.meta.dist =
- attr->u.meta.dist;
- msg_p->req.u.setattr.attr.u.meta.dist_size =
- attr->u.meta.dist_size;
- msg_p->req.u.setattr.attr.mask |= PVFS_ATTR_META_DIST;
- }
- }
+ /* clients should not be able to mess with dfile and distribution
+ * information here. Those parameters should only be set at create time.
+ * Maybe at some point we'll have a utility to adjust those attributes. At
+ * this time if they somehow get changed we'll have garbage on disk */
msg_p->fs_id = sm_p->object_ref.fs_id;
msg_p->handle = sm_p->object_ref.handle;
msg_p->retry_flag = PVFS_MSGPAIR_RETRY;
msg_p->comp_fn = setattr_msg_comp_fn;
+
+ gossip_debug(
+ GOSSIP_CLIENT_DEBUG, "setattr attr mask sent to server: 0x%x\n",
+ (int)sm_p->u.setattr.sys_attr.mask);
ret = PINT_cached_config_map_to_server(
&msg_p->svr_addr, msg_p->handle, msg_p->fs_id);
More information about the PVFS2-CVS
mailing list