* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011 Whamcloud, Inc.
- *
+ * Copyright (c) 2011, 2012, Whamcloud, Inc.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
if (!cl_is_normalio(env, io))
RETURN(0);
+ if (vio->cui_iov == NULL) /* nfs or loop back device write */
+ RETURN(0);
+
for (seg = 0; seg < vio->cui_nrsegs; seg++) {
const struct iovec *iv = &vio->cui_iov[seg];
{
struct vvp_io *vio = vvp_env_io(env);
struct ccc_io *cio = ccc_env_io(env);
- struct inode *inode = ccc_object_inode(obj);
- struct ll_sb_info *sbi = ll_i2sbi(inode);
int result;
CLOBINVRNT(env, obj, ccc_object_invariant(obj));
cio->cui_tot_nrsegs = 0;
}
} else if (io->ci_type == CIT_SETATTR) {
- if (cl_io_is_trunc(io))
- /* lockless truncate? */
- ll_stats_ops_tally(sbi, LPROC_LL_TRUNC, 1);
- else
+ if (!cl_io_is_trunc(io))
io->ci_lockreq = CILR_MANDATORY;
}
RETURN(result);