Spdk/test/unit/lib
Tomasz Zawadzki 28a44891f1 lib/blob: add error path on persisting dirty bs
super->clean value signifies if blobstore was unloaded
cleanly.
If it was not, then during bs_load the _spdk_bs_recover()
procedure if called.

Meanwhile bs->clean is always set to 1 after load, causing very first
blob_persist to also re-write super block with the super->clean
set to 0. To signify that md has changed and possibly trigger
the recovery if clean bs unload does not occur.
When the re-write of super block succeeds the bs->clean is set to 0,
because further re-writes of super block are not needed on next
blob persist.

This patch resolves issue when:
1) reading super block fails - execution should backoff, to prevent
writing an empty buffer as super block !
2) writing super->clean = 0 to the super block fails - execution
again should fail, and bs->clean should not be set to 0. It will
cause next persist to attempt re-write again.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia07cc5c6c107310059b50886edb7283c176b9169
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1164
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-03-24 07:39:47 +00:00
..
bdev bdev/nvme: asynchronous module_finish 2020-03-13 08:53:39 +00:00
blob lib/blob: add error path on persisting dirty bs 2020-03-24 07:39:47 +00:00
blobfs blobfs: start a poller to do cache buffer reclaim regularly 2020-03-06 10:27:45 +00:00
event lib/event: Count number of threads per reactor 2020-03-12 09:04:02 +00:00
ftl ftl ut: Fix the compilation issue. 2020-03-04 05:02:35 +00:00
ioat test/unit: remove duplicate mk/spdk.common.mk includes 2019-02-11 09:30:27 +00:00
iscsi lib/iscsi: Remove dry run processing from portal config file parsing 2020-02-17 10:06:47 +00:00
json ut/cunit: added missing semicolon on CU_ASSERT macros 2019-07-24 18:21:22 +00:00
jsonrpc jsonrpc: always allocate response for request 2019-07-19 20:56:54 +00:00
log log: passing user-defined log 2019-06-18 03:56:50 +00:00
lvol ut/lvol: fixed scan-build error on spdk_bs_init 2019-07-01 13:08:33 +00:00
notify lib/notify: rename spdk_notify_get_events to spdk_notify_foreach_event 2019-05-07 06:11:27 +00:00
nvme ut/nvme: Test Set Num Queues controller intialization step 2020-03-18 08:02:48 +00:00
nvmf lib/nvmf: Make spdk_nvmf_poll_group_destroy() asynchronous 2020-03-17 08:49:00 +00:00
reduce lib/reduce: add array bounds checking for iovs. 2019-12-19 11:04:57 +00:00
scsi lib/scsi: Remove workaround for astyle format check about break-after-return-type 2020-03-04 10:04:26 +00:00
sock sock/uring: Add the async network I/O support for socket 2020-03-20 08:41:28 +00:00
thread test: fix error about unittest_thread uninitialised parameters 2020-03-03 07:55:01 +00:00
util lib/util: Add spdk_sn32_lt/gt() to compare two numbers based on serial number arithmetic 2020-03-19 08:51:31 +00:00
vhost vhost: add a protocol_features parameter in vdev 2019-12-30 11:46:24 +00:00
json_mock.c subsystem: add per module configuration dump 2018-03-23 02:47:40 -04:00
Makefile test/unit: remove vhost dependency from ftl tests 2020-01-15 13:37:19 +00:00