summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lustre/osc/osc_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/lustre/lustre/osc/osc_cache.c')
-rw-r--r--drivers/staging/lustre/lustre/osc/osc_cache.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c
index 00f38eeb5786..57d7dba23479 100644
--- a/drivers/staging/lustre/lustre/osc/osc_cache.c
+++ b/drivers/staging/lustre/lustre/osc/osc_cache.c
@@ -871,7 +871,8 @@ static int osc_extent_wait(const struct lu_env *env, struct osc_extent *ext,
LASSERT(sanity_check_nolock(ext) == 0);
/* `Kick' this extent only if the caller is waiting for it to be
* written out. */
- if (state == OES_INV && !ext->oe_urgent && !ext->oe_hp) {
+ if (state == OES_INV && !ext->oe_urgent && !ext->oe_hp &&
+ !ext->oe_trunc_pending) {
if (ext->oe_state == OES_ACTIVE) {
ext->oe_urgent = 1;
} else if (ext->oe_state == OES_CACHE) {
@@ -922,8 +923,8 @@ static int osc_extent_truncate(struct osc_extent *ext, pgoff_t trunc_index,
int rc = 0;
LASSERT(sanity_check(ext) == 0);
- LASSERT(ext->oe_state == OES_TRUNC);
- LASSERT(!ext->oe_urgent);
+ EASSERT(ext->oe_state == OES_TRUNC, ext);
+ EASSERT(!ext->oe_urgent, ext);
/* Request new lu_env.
* We can't use that env from osc_cache_truncate_start() because
@@ -2153,7 +2154,7 @@ int osc_prep_async_page(struct osc_object *osc, struct osc_page *ops,
INIT_LIST_HEAD(&oap->oap_rpc_item);
spin_lock_init(&oap->oap_lock);
- CDEBUG(D_INFO, "oap %p page %p obj off "LPU64"\n",
+ CDEBUG(D_INFO, "oap %p page %p obj off %llu\n",
oap, page, oap->oap_obj_off);
return 0;
}
@@ -2594,7 +2595,7 @@ again:
break;
}
- OSC_EXTENT_DUMP(D_CACHE, ext, "try to trunc:"LPU64".\n", size);
+ OSC_EXTENT_DUMP(D_CACHE, ext, "try to trunc:%llu.\n", size);
osc_extent_get(ext);
if (ext->oe_state == OES_ACTIVE) {
@@ -2655,7 +2656,7 @@ again:
LASSERT(oio->oi_trunc == NULL);
oio->oi_trunc = osc_extent_get(ext);
OSC_EXTENT_DUMP(D_CACHE, ext,
- "trunc at "LPU64"\n", size);
+ "trunc at %llu\n", size);
}
osc_extent_put(env, ext);
}