-
Notifications
You must be signed in to change notification settings - Fork 55
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
Modifications to integrity metadata reservation #3716
Modifications to integrity metadata reservation #3716
Conversation
59f77ae
to
ce3edf3
Compare
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
ce3edf3
to
fffbbfd
Compare
I'm going to add a few tests here for the parameters, but after that, this should be ready. |
src/bin/utils/cmds.rs
Outdated
Arg::new("integrity_journal_size") | ||
.long("integrity-journal-size") | ||
.num_args(1) | ||
.help("Size of the integrity journal. Default is 128 MiB. Units are 4KiB blocks.") |
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.
Better just keep everything as bytes. I told Vojtech we would just do that, so we might as well stick with it.
None => None, | ||
}; | ||
|
||
let journal_size = |
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.
Better just to make units of journal size bytes everywhere.
503aa58
to
56efb3a
Compare
@jbaublitz Please rebase when you get the chance. |
56efb3a
to
a1238e0
Compare
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.
One request so far...
) -> StratisResult<CreateAction<PoolUuid>> { | ||
validate_name(name)?; | ||
let name = Name::new(name.to_owned()); | ||
let rounded_journal_size = match journal_size { |
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.
I think we will have to validate the tag size as well, matching our expectations to the dm-integrity expectations. I don't think there is any thing but trouble at this time that could result from allowing odd-valued tag sizes.
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.
I don't think this is as simple as checking for odd numbers. I'm not opposed to doing some validating, but just checking odd numbers feels incomplete. All of the values I've seen for tag size are powers of two. I think the thing to remember with tag size, however, is that that is only used to calculate the tag area which will be rounded to 4k regardless of whether the number is odd or not so I think we should either leave it as is or only support valid values of tags that integrity supports.
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.
I think we should only support the values that dm-integrity itself supports. We can relax that restriction at some time later if there ever appears to be any value to doing so, which seems very unlikely. It is the case that our design is to do external metadata, so integrity support in stratisd will only use this value to calculate the size of the external metadata device. But, at some time, we hope that we will be able to support integrity on NPo2 devices. If there is code that is shared for the implementation of these, then tag sizes that integrity does not support will be more of a problem. My other concern is that, at present, the D-Bus spec restricts the tag size to a byte. That means max is 128. Is that enough, or should the size be doubled?
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 max is not 128 because as I understand it, it is unsigned. However the largest tag size I saw was 128 bytes anyway.
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.
What I meant is: if we combine the powers of 2 restriction and the 8 digits restriction, the max possible value is 128. I also have not seen a larger tag size than 128 bytes. Is that fact enough to go on?
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.
I think we'll have more information on that after I get a list of supported tag types.
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.
ok!
@jbaublitz Speaking of tag size and also journal size, it is possible to make both 0. This still leave the, relatively small, superblock pre-allocated. It will legitimate for a user to specify 0 for both if they are using NPo2 devices and want to turn on integrity later and it is legitimate now if they never want to turn on integrity at all. So I believe that it is entirely acceptable to allow zero for both. I'll just add some more about that in the stratis-cli docs, unless you disagree. |
Do you mean we should leave things the way they are? If you believe this is best in order to support other features like NPo2 devices, I'm willing to leave it as it's a relatively small overhead for the device. |
I think that we should continue to allow 0 for both values. |
a1238e0
to
f2112b3
Compare
@jbaublitz Please rebase when you get the chance. |
f2112b3
to
17f8bc3
Compare
Superceded by #3733 |
Related to #3274
Related to #3637