Changeset View
Changeset View
Standalone View
Standalone View
sys/contrib/openzfs/tests/zfs-tests/cmd/mmapwrite/mmapwrite.c
Show All 36 Lines | |||||
/* | /* | ||||
* -------------------------------------------------------------------- | * -------------------------------------------------------------------- | ||||
* Bug Issue Id: #7512 | * Bug Issue Id: #7512 | ||||
* The bug time sequence: | * The bug time sequence: | ||||
* 1. context #1, zfs_write assign a txg "n". | * 1. context #1, zfs_write assign a txg "n". | ||||
* 2. In the same process, context #2, mmap page fault (which means the mm_sem | * 2. In the same process, context #2, mmap page fault (which means the mm_sem | ||||
* is hold) occurred, zfs_dirty_inode open a txg failed, and wait previous | * is hold) occurred, zfs_dirty_inode open a txg failed, and wait previous | ||||
* txg "n" completed. | * txg "n" completed. | ||||
* 3. context #1 call uiomove to write, however page fault is occurred in | * 3. context #1 call zfs_uiomove to write, however page fault is occurred in | ||||
* uiomove, which means it needs mm_sem, but mm_sem is hold by | * zfs_uiomove, which means it needs mm_sem, but mm_sem is hold by | ||||
* context #2, so it stuck and can't complete, then txg "n" will not | * context #2, so it stuck and can't complete, then txg "n" will not | ||||
* complete. | * complete. | ||||
* | * | ||||
* So context #1 and context #2 trap into the "dead lock". | * So context #1 and context #2 trap into the "dead lock". | ||||
* -------------------------------------------------------------------- | * -------------------------------------------------------------------- | ||||
*/ | */ | ||||
#define NORMAL_WRITE_TH_NUM 2 | #define NORMAL_WRITE_TH_NUM 2 | ||||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |