Commit 8daae334 authored by Federico Vaga's avatar Federico Vaga

sw:drv: bugfix resize block even on timetag error

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent fd07e18a
......@@ -656,11 +656,10 @@ static int zfad_block_timetag_extract(struct zio_block *block,
struct zfad_timetag *tg;
tg = block->data + block->datalen - FA_TRIG_TIMETAG_BYTES;
if (unlikely((tg->sec_high >> 8) != 0xACCE55))
return -EINVAL;
/* resize the datalen, by removing the trigger tstamp */
block->datalen = block->datalen - FA_TRIG_TIMETAG_BYTES;
if (unlikely((tg->sec_high >> 8) != 0xACCE55))
return -EINVAL;
memcpy(timetag, tg, sizeof(*timetag));
return 0;
......
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