[LU-11735] o2iblnd - bad check for fmr Created: 05/Dec/18 Updated: 24/Sep/20 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.12.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Amir Shehata (Inactive) | Assignee: | Amir Shehata (Inactive) |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Severity: | 3 | ||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||
| Description |
9b790ba0f5606c0a91563828fa43f5e4ae210425 LU-11152 lnd: test fpo_fmr_poool pointer instead of special bool Introduced an issue. You can't perform the following check:
if (!IS_ERR_OR_NULL(fpo->fmr.fpo_fmr_pool))
because
340 »·······union {
341 »·······»·······struct {
342 »·······»·······»·······struct ib_fmr_pool *fpo_fmr_pool; /* IB FMR pool */
343 »·······»·······} fmr;
344 »·······»·······struct { /* For fast registration */
345 »·······»·······»·······struct list_head fpo_pool_list;
346 »·······»·······»·······int»····»······· fpo_pool_size;
347 »·······»·······} fast_reg;
348 »·······};
It's part of a union so if we have fast reg enabled, then it's possible that the check is successful even though we don't have fmr enabled. |
| Comments |
| Comment by James A Simmons [ 05/Dec/18 ] |
|
lets make it an enum and clean up the code. I also dislike the union. The union assumes you can only have IB hardware that does either FMR or FastReg on a node. With multi-rail it is very possible to have IB hardware card using FMR and another using FastReg. |
| Comment by Andreas Dilger [ 06/Dec/18 ] |
|
James, we need to either fix this or revert the original |
| Comment by James A Simmons [ 06/Dec/18 ] |
|
Sure. The truth is that the o2iblnd pool handling is a piece of garbage and should be replaced with ib_mr_pool_*() functions that handle this much more gracefully. |
| Comment by Andreas Dilger [ 06/Dec/18 ] |
|
Amir Shehata (ashehata@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33802 |
| Comment by Peter Jones [ 09/Dec/18 ] |
|
Revert of |
| Comment by Gerrit Updater [ 20/Dec/18 ] |
|
Amir Shehata (ashehata@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33901 |
| Comment by Amir Shehata (Inactive) [ 20/Dec/18 ] |
|
I've tried to describe this area of the code here: |
| Comment by Cory Spitz [ 18/Dec/19 ] |
|
FYI: |