mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-20 20:21:30 +00:00
Patch from Krzysztof Blaszkowski:
i noticed this issue running simple iscsi connection test to a few targets. without included patch the active_pages_total counter wraps around 0 thus it breaks logic for releasing memory on "hi watermark" just like it is depicted in: Inactive/active pages 18/-25 Hi/lo watermarks [pages] 119808/0 Hi watermark releases/failures 4/0 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@676 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -895,8 +895,8 @@ struct scatterlist *scst_alloc(int size, gfp_t gfp_mask, int *count)
|
||||
|
||||
atomic_inc(&sgv_pools_mgr.sgv_other_total_alloc);
|
||||
|
||||
if (unlikely(!no_fail)) {
|
||||
if (unlikely(sgv_pool_hiwmk_check(pages) != 0)) {
|
||||
if (unlikely(sgv_pool_hiwmk_check(pages) != 0)) {
|
||||
if (!no_fail) {
|
||||
res = NULL;
|
||||
goto out;
|
||||
}
|
||||
@@ -922,7 +922,7 @@ struct scatterlist *scst_alloc(int size, gfp_t gfp_mask, int *count)
|
||||
goto out_free;
|
||||
|
||||
out:
|
||||
TRACE_MEM("Alloced sg %p (count %d)", res, *count);
|
||||
TRACE_MEM("Alloced sg %p (count %d) \"no fail\" %d", res, *count, no_fail);
|
||||
|
||||
TRACE_EXIT_HRES(res);
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user