Save and restore oa_present bitfield

Implements most of #17, except that we would like to restore OA_VARY
with the log read...

This should be backwards and forwards compatible, because the default
in both cases is 0, and varnish-cache will not use the bitfield
if it is 0.

 Conflicts:
	src/fellow_cache.c

 because fellow_disk_obj_compat() in master but not in 7.3
parent bb4813fe
......@@ -448,8 +448,9 @@ struct fellow_disk_obj {
#define FDO_FIXATTR(U, l, s, vs) \
uint8_t fa_##l[s];
#include "tbl/fellow_obj_attr.h"
uint8_t fa_reserve[64];
uint8_t fa_reserve[62];
uint16_t fdoa_present;
#define FDO_VARATTR(U, l) \
struct fellow_disk_obj_attr va_##l;
#include "tbl/fellow_obj_attr.h"
......@@ -3857,6 +3858,7 @@ fellow_busy_done(struct fellow_busy *fbo, struct objcore *oc, unsigned inlog)
if (inlog) {
fdo->fdo_flags |= FDO_F_INLOG;
fco->oc = oc;
fdo->fdoa_present = oa2fdoa_present(oc->oa_present);
}
fellow_cache_obj_unbusy(fbo, inlog ? FCOL_WANTLOG : FCOL_NOLOG);
}
......@@ -4167,6 +4169,10 @@ fellow_cache_obj_get(struct fellow_cache *fc,
if (err != NULL)
goto err;
// or because oa_inlog_bit
if (fco->oc)
fco->oc->oa_present |= fdoa2oa_present(fdo->fdoa_present);
fdsl = (void *)((uint8_t *)fdo + sizeof *fdo + fdo->va_data_len);
assert(PAOK(fdsl));
// XXX load of folow-up seglists could be async
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment