-
Notifications
You must be signed in to change notification settings - Fork 806
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
Decouple disk from stripe #11737
base: master
Are you sure you want to change the base?
Decouple disk from stripe #11737
Conversation
b76be6e
to
f6b029d
Compare
A tricky idea is adding a pointer to the |
@@ -65,6 +65,8 @@ class StripeSM : public Continuation, public Stripe | |||
{ | |||
public: | |||
CryptoHash hash_id; | |||
char *path = nullptr; | |||
int fd{-1}; |
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.
CacheDisk
has path
and fd
. I start wondering we should just refer them instead of copy it because StripeSM
has CacheDisk *
.
int fd = -1; |
trafficserver/src/iocore/cache/Cache.cc
Line 291 in d0b6a4b
cp->stripes[vol_no]->fd = d->fd; |
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.
Sure enough. We should definitely deduplicate that! Good find.
This pull request has been automatically marked as stale because it has not had recent activity. Marking it stale to flag it for further consideration by the community. |
This moves the following variables out of
Stripe
:fd
path
disk
hash_text