#include <file.h>
#endif
-#undef LIST_HEAD
-
#include "llite_lib.h"
typedef ssize_t llu_file_piov_t(const struct iovec *iovec, int iovlen,
lvb = req_capsule_server_get(&req->rq_pill, &RMF_DLM_LVB);
lvb->lvb_size = lli->lli_smd->lsm_oinfo[stripe]->loi_kms;
- LDLM_DEBUG(lock, "i_size: %llu -> stripe number %u -> kms "LPU64,
+ LDLM_DEBUG(lock, "i_size: "LPU64" -> stripe number %u -> kms "LPU64,
(__u64)llu_i2stat(inode)->st_size, stripe,lvb->lvb_size);
iput:
I_RELE(inode);
(sbi->ll_flags & LL_SBI_NOLCK) || mode == LCK_NL)
RETURN(0);
- CDEBUG(D_DLMTRACE, "Locking inode %llu, start "LPU64" end "LPU64"\n",
+ CDEBUG(D_DLMTRACE, "Locking inode "LPU64", start "LPU64" end "LPU64"\n",
(__u64)st->st_ino, policy->l_extent.start,
policy->l_extent.end);
/* XXX this is not right: cio->cui_iov can be modified. */
cio->cui_iov = (struct iovec *)iovec;
cio->cui_nrsegs = iovlen;
+ cio->cui_tot_nrsegs = iovlen;
sio->sio_session = session;
err = cl_io_loop(env, io);
} else {
{
struct llu_io_session *session;
- OBD_ALLOC(session, LLU_IO_SESSION_SIZE(ngroups));
+ OBD_ALLOC_PTR(session);
if (!session)
return NULL;
static void put_io_session(struct llu_io_session *session)
{
- int i;
-
- for (i = 0; i < session->lis_ngroups; i++) {
- if (session->lis_groups[i]) {
- put_io_group(session->lis_groups[i]);
- session->lis_groups[i] = NULL;
- }
- }
-
I_RELE(session->lis_inode);
- OBD_FREE(session, LLU_IO_SESSION_SIZE(session->lis_max_groups));
+ OBD_FREE_PTR(session);
}
static int llu_file_rwx(struct inode *ino,
int ret;
/* BUG: 5972 */
- st->st_atime = CURRENT_TIME;
+ st->st_atime = CFS_CURRENT_TIME;
env = cl_env_get(&refcheck);
if (IS_ERR(env))
int refcheck;
int ret;
- st->st_mtime = st->st_ctime = CURRENT_TIME;
+ st->st_mtime = st->st_ctime = CFS_CURRENT_TIME;
env = cl_env_get(&refcheck);
if (IS_ERR(env))
int llu_iop_iodone(struct ioctx *ioctx)
{
struct llu_io_session *session;
- struct llu_io_group *group;
- int i, rc = 0;
struct lu_env *env;
struct cl_io *io;
int refcheck;
LASSERT(session);
LASSERT(!IS_ERR(session));
- for (i = 0; i < session->lis_ngroups; i++) {
- group = session->lis_groups[i];
- if (group) {
- if (!rc)
- rc = group->lig_rc;
- if (!rc)
- ioctx->ioctx_cc += group->lig_rwcount;
- put_io_group(group);
- session->lis_groups[i] = NULL;
- }
- }
-
- if (rc) {
- LASSERT(rc < 0);
+ if (session->lis_rc == 0) {
+ ioctx->ioctx_cc = session->lis_rwcount;
+ } else {
+ LASSERT(session->lis_rc < 0);
ioctx->ioctx_cc = -1;
- ioctx->ioctx_errno = -rc;
+ ioctx->ioctx_errno = -session->lis_rc;
}
put_io_session(session);