Skip to content
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

Add media change support v2 #435

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

mikechristie
Copy link
Collaborator

Patches to add media change support based on @bgly's PR

#411

@bgly
Copy link
Contributor

bgly commented Aug 8, 2018

Any ETA on this @mikechristie

@mikechristie
Copy link
Collaborator Author

Ah sorry. I didn't see you update the targetcli patch. I will test it all again today.

@bgly
Copy link
Contributor

bgly commented Aug 9, 2018

sounds good, thanks mike!

@mikechristie
Copy link
Collaborator Author

Just a FYI, I am still working on this. It will get done this week.

@mikechristie
Copy link
Collaborator Author

Did you ever send the kernel patch to update the uio name when writing to the dev_control control file? If not, I attached a patch here:

tcmu-update-dev-cfg-via-control.txt

Mike Christie added 8 commits August 19, 2018 17:00
It doesn't look like the dbus handler registration is used
anymore. We are not using the check_config callout anymore
and the registration code did not seem to fully register a
handler for cmd processing, so drop it.

Signed-off-by: Mike Christie <[email protected]>
Make tcmu_set_control a macro so it can be reused in the next patch
for setting a string.

Signed-off-by: Mike Christie <[email protected]>
Move the UA code so it can be called from other files.

Signed-off-by: Mike Christie <[email protected]>
This will be used in the next patches so targetcli
can pass in the tcmu name to dbus commands.

Signed-off-by: Mike Christie <[email protected]>
This will be used in the next patch to set dev_config

Signed-off-by: Mike Christie <[email protected]>
This patch series will add media change that is
triggered via targetcli without involving the kernel

Based on patches my Bryant G. Ly.

Signed-off-by: Bryant G. Ly <[email protected]>
Signed-off-by: Mike Christie <[email protected]>
In debug mode log failed commands.

Signed-off-by: Mike Christie <[email protected]>
@mikechristie
Copy link
Collaborator Author

Repushed branch. It should work with the targecli patch attached to your PR and to the kernel patch above.

It is pretty much the same as before, but with the media -> medium rename, some error handler fixes so nicer strings are returned on failure, and I added a check so only handlers that report they support the op get called.

@bgly
Copy link
Contributor

bgly commented Aug 27, 2018

Looks good to me @mikechristie

reason = "Handler does not support medium changes.";
goto exit;
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Shoot. Giving myself a review comment.

We need to add lock or refcounting around parts of this to prevent the race where this is running along side a device removal.

@JuniorJPDJ
Copy link
Contributor

bump?

@lxbsz lxbsz changed the base branch from master to main August 10, 2022 00:24
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.

3 participants