-#ifdef HAVE_FILE_WRITEV
-static ssize_t ll_file_writev(struct file *file, const struct iovec *iov,
- unsigned long nr_segs, loff_t *ppos)
-{
- struct lu_env *env;
- struct vvp_io_args *args;
- size_t count;
- ssize_t result;
- int refcheck;
- ENTRY;
-
- result = ll_file_get_iov_count(iov, &nr_segs, &count);
- if (result)
- RETURN(result);
-
- env = cl_env_get(&refcheck);
- if (IS_ERR(env))
- RETURN(PTR_ERR(env));
-
- args = vvp_env_args(env, IO_NORMAL);
- args->u.normal.via_iov = (struct iovec *)iov;
- args->u.normal.via_nrsegs = nr_segs;
-
- result = ll_file_io_generic(env, args, file, CIT_WRITE, ppos, count);
- cl_env_put(env, &refcheck);
- RETURN(result);
-}
-
-static ssize_t ll_file_write(struct file *file, const char *buf, size_t count,
- loff_t *ppos)
-{
- struct lu_env *env;
- struct iovec *local_iov;
- ssize_t result;
- int refcheck;
- ENTRY;
-
- env = cl_env_get(&refcheck);
- if (IS_ERR(env))
- RETURN(PTR_ERR(env));
-
- local_iov = &vvp_env_info(env)->vti_local_iov;
- local_iov->iov_base = (void __user *)buf;
- local_iov->iov_len = count;
-
- result = ll_file_writev(file, local_iov, 1, ppos);
- cl_env_put(env, &refcheck);
- RETURN(result);
-}
-
-#else /* AIO stuff */