The unified diff between revisions [6d9381f5..] and [f35cd536..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'src/fs/coss/store_dir_coss.c'
#
#
# patch "src/fs/coss/store_dir_coss.c"
# from [76fa0c36aeb9fe9686300c9510eee08786bfdb95]
# to [371e6c070f6001f5e22de7286ec60b880529ff4b]
#
============================================================
--- src/fs/coss/store_dir_coss.c 76fa0c36aeb9fe9686300c9510eee08786bfdb95
+++ src/fs/coss/store_dir_coss.c 371e6c070f6001f5e22de7286ec60b880529ff4b
@@ -691,28 +691,24 @@ storeCossDirShutdown(SwapDir * SD)
* not store everything. We don't check for maxobjsize here since its
* done by the upper layers.
*/
-int
+char
storeCossDirCheckObj(SwapDir * SD, const StoreEntry * e)
{
- CossInfo *cs = (CossInfo *) SD->fsdata;
- int loadav;
-
/* Check if the object is a special object, we can't cache these */
if (EBIT_TEST(e->flags, ENTRY_SPECIAL))
- return -1;
-
- /* Otherwise, we're ok */
- /* Return load, cs->aq.aq_numpending out of MAX_ASYNCOP */
- loadav = cs->aq.aq_numpending * 1000 / MAX_ASYNCOP;
- return loadav;
+ return 0;
+ return 1;
}
-char
+int
storeCossDirCheckLoadAv(SwapDir *SD, store_op_t op)
{
CossInfo *cs = (CossInfo *) SD->fsdata;
+ int loadav;
- return (cs->aq.aq_numpending < MAX_ASYNCOP);
+ /* Return load, cs->aq.aq_numpending out of MAX_ASYNCOP */
+ loadav = cs->aq.aq_numpending * 1000 / MAX_ASYNCOP;
+ return loadav;
}