*/
/*
* This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
*
* Author: Nikita Danilov <nikita.danilov@sun.com>
*/
{
struct lu_env *env;
struct cl_io *io;
- int result;
- __u16 refcheck;
+ int result;
+ __u16 refcheck;
ENTRY;
io->u.ci_setattr.sa_avalid = attr->ia_valid;
io->u.ci_setattr.sa_xvalid = xvalid;
io->u.ci_setattr.sa_parent_fid = lu_object_fid(&obj->co_lu);
-
+ if (attr->ia_valid & ATTR_SIZE)
+ io->u.ci_setattr.sa_subtype = CL_SETATTR_TRUNC;
again:
if (attr->ia_valid & ATTR_FILE)
ll_io_set_mirror(io, attr->ia_file);
struct vvp_io *vio = vvp_env_io(env);
if (attr->ia_valid & ATTR_FILE)
- /* populate the file descriptor for ftruncate to honor
- * group lock - see LU-787 */
+ /*
+ * populate the file descriptor for ftruncate to honor
+ * group lock - see LU-787
+ */
vio->vui_fd = attr->ia_file->private_data;
result = cl_io_loop(env, io);