-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2011, 2012, Whamcloud, Inc.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
#define DEBUG_SUBSYSTEM S_CLASS
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
#include <obd_class.h>
#include <obd_support.h>
ENTRY;
- lock = cl_lock_request(env, io, &link->cill_descr, "io", io);
+ if (io->ci_lockreq == CILR_PEEK) {
+ lock = cl_lock_peek(env, io, &link->cill_descr, "io", io);
+ if (lock == NULL)
+ lock = ERR_PTR(-ENODATA);
+ } else
+ lock = cl_lock_request(env, io, &link->cill_descr, "io", io);
+
if (!IS_ERR(lock)) {
link->cill_lock = lock;
cfs_list_move(&link->cill_linkage, &set->cls_curr);
}
cl_io_iter_fini(env, io);
} while (result == 0 && io->ci_continue);
- RETURN(result < 0 ? result : 0);
+ if (result == 0)
+ result = io->ci_result;
+ RETURN(result < 0 ? result : 0);
}
EXPORT_SYMBOL(cl_io_loop);
ENTRY;
page = cl_page_top(page);
- LINVRNT(cl_page_is_vmlocked(env, page));
LASSERT(cfs_list_empty(&page->cp_flight));
LASSERT(page->cp_req == NULL);
ENTRY;
page = cl_page_top(page);
- LINVRNT(cl_page_is_vmlocked(env, page));
LASSERT(!cfs_list_empty(&page->cp_flight));
LASSERT(req->crq_nrpages > 0);