Commit f719268e authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Jim Harris
Browse files

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: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453681


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 3cdd17f5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);