lib/ftl: trace RWB fill before advancing IO position

This fixes incorrect LBA reported by traces (it reported the next one,
as the IO position was advanced before storing the trace).

Change-Id: I788853d729dd25e90c6c899be0616aa3a79d08b3
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453681
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Konrad Sztyber 2019-05-08 12:01:11 +02:00 committed by Jim Harris
parent 3cdd17f518
commit f719268ef8

View File

@ -1279,6 +1279,7 @@ ftl_rwb_fill(struct ftl_io *io)
ppa.offset = entry->pos;
ftl_trace_rwb_fill(dev, io);
ftl_io_advance(io, 1);
ftl_update_l2p(dev, entry, ppa);
@ -1286,7 +1287,6 @@ ftl_rwb_fill(struct ftl_io *io)
/* write completion callback when it's processed faster than */
/* L2P is set in update_l2p(). */
ftl_rwb_push(entry);
ftl_trace_rwb_fill(dev, io);
}
ftl_io_complete(io);