Commit 773b7003 authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Ben Walker
Browse files

lib/ftl: add comments to ftl_restore's fields



The structures in this module had no comments, so it was a bit hard to
understand what they're used for.

Change-Id: I439c8a792f02b929006c60933e6b272751b1a675
Signed-off-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458102


Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarMateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 0f0af480
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -44,33 +44,33 @@

struct ftl_restore_band {
	struct ftl_restore		*parent;

	/* Associated band */
	struct ftl_band			*band;

	/* Status of retrieving this band's metadata */
	enum ftl_md_status		md_status;

	/* Padded queue link  */
	STAILQ_ENTRY(ftl_restore_band)	stailq;
};

struct ftl_restore {
	struct spdk_ftl_dev		*dev;

	/* Completion callback (called for each phase of the restoration) */
	ftl_restore_fn			cb;

	/* Number of inflight IOs */
	unsigned int			num_ios;

	/* Current band number (index in the below bands array) */
	unsigned int			current;

	/* Array of bands */
	struct ftl_restore_band		*bands;

	/* Queue of bands to be padded (due to unsafe shutdown) */
	STAILQ_HEAD(, ftl_restore_band) pad_bands;

	/* Status of the padding */
	int				pad_status;

	/* Metadata buffer */
	void				*md_buf;

	/* LBA map buffer */
	void				*lba_map;

	/* Indicates we're in the final phase of the restoration */
	bool				l2p_phase;
};