numam-spdk/lib/blobfs
Ziye Yang 644678258f blobfs: move the location of next buffer check.
This patch address the issue:
https://github.com/spdk/spdk/issues/151.

For cache_append_no_cache in cache_ut testcase,
there is resource contention for buffer among two
threads in the following two functions.
Thread 0: cache_free_buffers
Thread1: __file_flush_done

When the thread1 execuctes __file_flush_done,
it calls the call back: __sem_post defined in
following statement in spdk_file_sync

_file_sync(file, channel, __sem_post, &channel->sem);

Thus Thread 0 will execute next function
cache_buffers, and it frees the buffer.

Then Thread 1 continues executing the remaining statements
in __file_flush_done with the assert function, and touches
the space already freed.

So it will be safe to move ahead the next buffer check.

Change-Id: Ic007b3481f4e3a17d47eeca5c9c802001949a5ab
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-05-16 10:51:26 +08:00
..
blobfs_internal.h blobfs: separate cache tree related definitions into tree.h 2017-05-04 09:11:28 -07:00
blobfs.c blobfs: move the location of next buffer check. 2017-05-16 10:51:26 +08:00
Makefile blobfs: Add a lightweight filesystem built on the blobstore 2017-03-24 14:15:45 -07:00
tree.c include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
tree.h blobfs: separate cache tree related definitions into tree.h 2017-05-04 09:11:28 -07:00