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/store_dir.c'
#
#
# patch "src/store_dir.c"
# from [e795049d82fdee67d27f34a53aed344c9c60f488]
# to [299ef0c831c2b8f781cfe9992ca0912e5baa5792]
#
============================================================
--- src/store_dir.c e795049d82fdee67d27f34a53aed344c9c60f488
+++ src/store_dir.c 299ef0c831c2b8f781cfe9992ca0912e5baa5792
@@ -156,7 +156,10 @@ storeDirSelectSwapDirRoundRobin(const St
if (!storeDirValidSwapDirSize(dirn, objsize))
continue;
/* check for error or overload condition */
- load = sd->checkobj(sd, e);
+ if (sd->checkobj(sd, e) == 0) {
+ continue;
+ }
+ load = sd->checkload(sd, ST_OP_CREATE);
if (load < 0 || load > 1000) {
continue;
}
@@ -197,7 +200,10 @@ storeDirSelectSwapDirLeastLoad(const Sto
for (i = 0; i < Config.cacheSwap.n_configured; i++) {
SD = &Config.cacheSwap.swapDirs[i];
SD->flags.selected = 0;
- load = SD->checkobj(SD, e);
+ if (SD->checkobj(SD, e) == 0) {
+ continue;
+ }
+ load = SD->checkload(SD, ST_OP_CREATE);
if (load < 0 || load > 1000) {
continue;
}