-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double calling of app_ch_dec_thread #18
Comments
Dear Chen, Thank you for opening the issue. I have analyzed it this is what I found: We have 2 arrays:
Note: 'dec_ch' was defined because we need the pointer to the channels to be decreased at line 233. Suggestion: We may change the function to increase only provisioned channels. The increase function replaces the 'dec_ch' array at the line: ox-ctrl/ftl/ox-app/block/oxb-gl-prov.c Line 195 in 1fd9aea
Any comments? |
Hi Ivan, To summarize the analysis, the non-provisioned channels can be decremented twice, one after provisioning and one after writing is completed. To address this problem, after we decrement the non-provisioned channels, shouldn't we unset the corresponding channel from prov_ppa->ch to NULL? |
In the latest v2.6 version, I saw the channel counter is decremented twice in gl-prov. The first call is at [1] when gl-prov allocates the provision list. The second call is at [2] when the provision list is freed (after writes have been executed). This is clearly a bug and the channel counter should only be decremented once.
The question is when should the counter be decremented? Perhaps it should be decremented at [2] after writes have been executed.
[1]
ox-ctrl/ftl/ox-app/block/oxb-gl-prov.c
Line 233 in 1fd9aea
[2]
ox-ctrl/ftl/ox-app/block/oxb-gl-prov.c
Line 271 in 1fd9aea
The text was updated successfully, but these errors were encountered: