-
Notifications
You must be signed in to change notification settings - Fork 136
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
feat: return faulty sectors #134
Conversation
If Window PoSt fails, return the faulty sectors. They are part of the error response. The `faulty_sectors_len` is the number of faulty sectors (0 if there aren't any faulty sectors) and `faulty_sectors_ptr` points to an array of unsigned 64-bit integers, representing the sector IDs.
65dcdfd
to
6419af8
Compare
This should NOT be merged until the corresponding Go changes (which should be pretty minimal) are in. |
Cap int | ||
} | ||
|
||
(*sliceHeader)(unsafe.Pointer(&ptr)).Len = int(l) // don't worry about it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? Isn't just the fact that we are inerating up to l
below enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generated cgo code doesn't set it, so we panic on out-of-bounds
If Window PoSt fails, return the faulty sectors. They are part of the
error response. The
faulty_sectors_len
is the number of faulty sectors(0 if there aren't any faulty sectors) and
faulty_sectors_ptr
pointsto an array of unsigned 64-bit integers, representing the sector IDs.