X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fobdclass%2Fcl_io.c;h=00ffe6d899ee8753e516f59c55e525d6a097916e;hb=baf067a765ba658ea16e8f81909d6a364a6f5b18;hp=d5d52d905765779f59f1996d544d53600b625c8f;hpb=f49d4116040818a8b3888df55dacb1f16b0b65c6;p=fs%2Flustre-release.git diff --git a/lustre/obdclass/cl_io.c b/lustre/obdclass/cl_io.c index d5d52d9..00ffe6d 100644 --- a/lustre/obdclass/cl_io.c +++ b/lustre/obdclass/cl_io.c @@ -28,6 +28,8 @@ /* * 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/ @@ -377,7 +379,13 @@ static int cl_lockset_lock_one(const struct lu_env *env, 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); @@ -1543,7 +1551,6 @@ void cl_req_page_add(const struct lu_env *env, 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); @@ -1578,7 +1585,6 @@ void cl_req_page_done(const struct lu_env *env, struct cl_page *page) 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);