-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fast Dedup: dnode: allow storage class to be overridden by object type #15894
base: master
Are you sure you want to change the base?
Fast Dedup: dnode: allow storage class to be overridden by object type #15894
Conversation
c4ae15b
to
9bccf29
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.
Looks fine to me. But I am thinking if storage specification could possibly be done at some different layer. We could specify, for example, that within ZAP the first block and hash blocks are more important than others.
9bccf29
to
bf56931
Compare
[Fast dedup stack rebased to master 3c941d1] |
Yeah, there's a lot I would like to do like that. In my head it's a kind of "reimagine At least with this, there's no on-disk format change, so we can punt the actual design work down the road a bit. |
Rather than picking out specific values out of the properties, just pass the entire zio in, to make it easier in the future to use more of that info to decide on the storage class. I would have rathered just pass io_prop in, but having spa.h include zio.h gets a bit tricky. Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Sponsored-by: Klara, Inc. Sponsored-by: iXsystems, Inc.
spa_preferred_class() selects a storage class based on (among other things) the DMU object type. This only works for old-style object types that match only one specific kind of thing. For DMU_OTN_ types we need another way to signal the storage class. This commit allows the object type to be overridden in the IO policy for the purposes of choosing a storage class. It then adds the ability to set the storage type on a dnode hold, such that all writes generated under that hold will get it. This method has two shortcomings: - it would be better if we could "name" a set of storage class preferences rather than it being implied by the object type. - it would be better if this info were stored in the dnode on disk. In the absence of those things, this seems like the smallest possible change. Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Sponsored-by: Klara, Inc. Sponsored-by: iXsystems, Inc.
bf56931
to
02b4741
Compare
@behlendorf rebased to sit alone on top of master. If the tests pass, this should be safe to merge. |
Motivation and Context
The upcoming “dedup log” feature requires a new type of object to store the log. We will want to use the dedup storage class, however as a new object type (“OTN”) it has no distinguishing features, so we can’t set the storage class for it.
Description
This allows a caller to set an alternate object type on a dnode hold to use when computing the storage class. Writes generated under that hold will be written with the storage class for the overridden type.
(It would be far better if this was stored with the dnode somewhere, but that would be a serious on-disk format change and is a massive undertaking in its own right).
How Has This Been Tested?
TBD.
Types of changes
Checklist:
Signed-off-by
.