Skip to content

fix(raid): correct stripSizeKb for raid concat#247

Closed
davidcheng0922 wants to merge 1 commit into
longhorn:mainfrom
davidcheng0922:issue-10260-lvs-across-disk
Closed

fix(raid): correct stripSizeKb for raid concat#247
davidcheng0922 wants to merge 1 commit into
longhorn:mainfrom
davidcheng0922:issue-10260-lvs-across-disk

Conversation

@davidcheng0922
Copy link
Copy Markdown
Contributor

Which issue(s) this PR fixes:

longhorn/longhorn#10260

What this PR does / why we need it:

Fix bug for let raid concat works

Special notes for your reviewer:

Additional documentation or context

@davidcheng0922 davidcheng0922 requested a review from a team December 12, 2025 11:54
@davidcheng0922 davidcheng0922 self-assigned this Dec 12, 2025
Signed-off-by: David Cheng <davidcheng0922@gmail.com>
Comment thread pkg/spdk/client/basic.go
Comment on lines +781 to +794
switch raidLevel {
case spdktypes.BdevRaidLevel0, spdktypes.BdevRaidLevelRaid0,
spdktypes.BdevRaidLevel5f, spdktypes.BdevRaidLevelRaid5f:
// RAID0 / RAID5f keep user-given strip size (non-zero requirement stays external)
// do nothing
case spdktypes.BdevRaidLevelConcat:
// For RAID CONCAT (Concatenation), the strip size is logically useless for its primary function,
// but it is technically required for initialization and framework compliance.
//
// it cannot be 0, will return error
stripSizeKb = 4

default:
// All other RAID levels do not use strip size → forced to 0
Copy link
Copy Markdown
Member

@derekbit derekbit Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious why we don't use 512 bytes or other size?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If my understanding correct, the raid strip size unit is KiB

The strip size not affect the IO mapping. RAID concat IO in sequential without striping. Strip size only for initialize the bdev raid.

I think it doesn't matter what strip size is, since RAID concat does not use strip size for mapping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants