osc_io_unplug_async() in osc_extent_release() may not unplug IO
queue due to a race in ptlrpc_queue_work(). As a fix, we should
unplug it when the page is being flushed or fsync calls.
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ied1d6ad12b79a28229cdae83a9db9ad9b3189462
Reviewed-on: http://review.whamcloud.com/4659
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
ext->oe_memalloc = 1;
ext->oe_urgent = 1;
ext->oe_memalloc = 1;
ext->oe_urgent = 1;
- if (ext->oe_state == OES_CACHE && cfs_list_empty(&ext->oe_link)) {
+ if (ext->oe_state == OES_CACHE) {
OSC_EXTENT_DUMP(D_CACHE, ext,
"flush page %p make it urgent.\n", oap);
OSC_EXTENT_DUMP(D_CACHE, ext,
"flush page %p make it urgent.\n", oap);
- cfs_list_add_tail(&ext->oe_link, &obj->oo_urgent_exts);
+ if (cfs_list_empty(&ext->oe_link))
+ cfs_list_add_tail(&ext->oe_link, &obj->oo_urgent_exts);
ext->oe_urgent = 1;
list = &obj->oo_urgent_exts;
}
ext->oe_urgent = 1;
list = &obj->oo_urgent_exts;
}
cfs_list_move_tail(&ext->oe_link, list);
cfs_list_move_tail(&ext->oe_link, list);
} else {
/* the only discarder is lock cancelling, so
* [start, end] must contain this extent */
} else {
/* the only discarder is lock cancelling, so
* [start, end] must contain this extent */