Whamcloud - gitweb
LU-3843 clio: add debug message in osc_completion()
[fs/lustre-release.git] / lustre / osc / osc_cache.c
index 750491e..4cabaca 100644 (file)
@@ -1263,8 +1263,10 @@ static int osc_completion(const struct lu_env *env, struct osc_async_page *oap,
        ENTRY;
 
        cmd &= ~OBD_BRW_NOQUOTA;
-       LASSERT(equi(page->cp_state == CPS_PAGEIN,  cmd == OBD_BRW_READ));
-       LASSERT(equi(page->cp_state == CPS_PAGEOUT, cmd == OBD_BRW_WRITE));
+       LASSERTF(equi(page->cp_state == CPS_PAGEIN,  cmd == OBD_BRW_READ),
+                "cp_state:%u, cmd:%d\n", page->cp_state, cmd);
+       LASSERTF(equi(page->cp_state == CPS_PAGEOUT, cmd == OBD_BRW_WRITE),
+               "cp_state:%u, cmd:%d\n", page->cp_state, cmd);
        LASSERT(opg->ops_transfer_pinned);
 
        /*
@@ -2207,7 +2209,7 @@ int osc_prep_async_page(struct osc_object *osc, struct osc_page *ops,
        oap->oap_obj_off = offset;
        LASSERT(!(offset & ~CFS_PAGE_MASK));
 
-       if (!client_is_remote(exp) && cfs_capable(CAP_SYS_RESOURCE))
+       if (!client_is_remote(exp) && cfs_capable(CFS_CAP_SYS_RESOURCE))
                oap->oap_brw_flags = OBD_BRW_NOQUOTA;
 
        CFS_INIT_LIST_HEAD(&oap->oap_pending_item);
@@ -2248,7 +2250,7 @@ int osc_queue_async_io(const struct lu_env *env, struct cl_io *io,
        /* Set the OBD_BRW_SRVLOCK before the page is queued. */
        brw_flags |= ops->ops_srvlock ? OBD_BRW_SRVLOCK : 0;
        if (!client_is_remote(osc_export(osc)) &&
-           cfs_capable(CAP_SYS_RESOURCE)) {
+           cfs_capable(CFS_CAP_SYS_RESOURCE)) {
                brw_flags |= OBD_BRW_NOQUOTA;
                cmd |= OBD_BRW_NOQUOTA;
        }