* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2012, Intel Corporation.
+ * Copyright (c) 2011, 2014, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
/*
* memory shrinker
*/
-const int pools_shrinker_seeks = DEFAULT_SEEKS;
+static const int pools_shrinker_seeks = DEFAULT_SEEKS;
static struct shrinker *pools_shrinker;
"cache missing: %lu\n"
"low free mark: %lu\n"
"max waitqueue depth: %u\n"
- "max wait time: "CFS_TIME_T"/%u\n"
+ "max wait time: "CFS_TIME_T"/%lu\n"
,
totalram_pages,
PAGES_PER_POOL,
page_pools.epp_st_missings,
page_pools.epp_st_lowfree,
page_pools.epp_st_max_wqlen,
- page_pools.epp_st_max_wait, HZ
+ page_pools.epp_st_max_wait,
+ msecs_to_jiffies(MSEC_PER_SEC)
);
spin_unlock(&page_pools.epp_lock);
page_pools.epp_waitqlen;
set_current_state(TASK_UNINTERRUPTIBLE);
- init_waitqueue_entry_current(&waitlink);
+ init_waitqueue_entry(&waitlink, current);
add_wait_queue(&page_pools.epp_waitq, &waitlink);
spin_unlock(&page_pools.epp_lock);
- waitq_wait(&waitlink, TASK_UNINTERRUPTIBLE);
+ schedule();
remove_wait_queue(&page_pools.epp_waitq, &waitlink);
LASSERT(page_pools.epp_waitqlen > 0);
spin_lock(&page_pools.epp_lock);
desc->bd_iov_count * sizeof(*desc->bd_enc_iov));
desc->bd_enc_iov = NULL;
}
-EXPORT_SYMBOL(sptlrpc_enc_pool_put_pages);
/*
* we don't do much stuff for add_user/del_user anymore, except adding some
enc_pools_free();
- if (page_pools.epp_st_access > 0) {
- CDEBUG(D_SEC,
- "max pages %lu, grows %u, grow fails %u, shrinks %u, "
- "access %lu, missing %lu, max qlen %u, max wait "
- CFS_TIME_T"/%d\n",
- page_pools.epp_st_max_pages, page_pools.epp_st_grows,
- page_pools.epp_st_grow_fails,
+ if (page_pools.epp_st_access > 0) {
+ CDEBUG(D_SEC,
+ "max pages %lu, grows %u, grow fails %u, shrinks %u, "
+ "access %lu, missing %lu, max qlen %u, max wait "
+ CFS_TIME_T"/%lu\n",
+ page_pools.epp_st_max_pages, page_pools.epp_st_grows,
+ page_pools.epp_st_grow_fails,
page_pools.epp_st_shrinks, page_pools.epp_st_access,
page_pools.epp_st_missings, page_pools.epp_st_max_wqlen,
- page_pools.epp_st_max_wait, HZ);
+ page_pools.epp_st_max_wait,
+ msecs_to_jiffies(MSEC_PER_SEC));
}
}
{
return cfs_crypto_hash_name(cfs_hash_alg_id[hash_alg]);
}
-EXPORT_SYMBOL(sptlrpc_get_hash_name);
__u8 sptlrpc_get_hash_alg(const char *algname)
{
return cfs_crypto_hash_alg(algname);
}
-EXPORT_SYMBOL(sptlrpc_get_hash_alg);
int bulk_sec_desc_unpack(struct lustre_msg *msg, int offset, int swabbed)
{
for (i = 0; i < desc->bd_iov_count; i++) {
cfs_crypto_hash_update_page(hdesc, desc->bd_iov[i].kiov_page,
- desc->bd_iov[i].kiov_offset & ~CFS_PAGE_MASK,
+ desc->bd_iov[i].kiov_offset & ~PAGE_MASK,
desc->bd_iov[i].kiov_len);
}
return err;
}
-EXPORT_SYMBOL(sptlrpc_get_bulk_checksum);
-
-