[libvirt] [PATCH 0/7] Restore code to allow unpriv_sgio for hostdev SCSI generic

John Ferlan jferlan at redhat.com
Wed Jun 24 14:16:05 UTC 2015



On 06/24/2015 08:24 AM, Ján Tomko wrote:
> On Tue, Jun 16, 2015 at 03:51:23PM -0400, John Ferlan wrote:
>> https://bugzilla.redhat.com/show_bug.cgi?id=1072736
>>
>> This series of patches unreverts the functionality from commit id 'ce346623'
>> which reverted the original functionality.
>>
> 
> What is the motivation to revert the revert?
> 
> The commit message of that commit says:
> 
>     The kernel didn't support the unprivileged SGIO for SCSI generic
>     device finally, and since it's unknow whether the way to support
>     unprivileged SGIO for SCSI generic device will be similar as for
>     SCSI block device or not, even it's simliar (I.e. via sysfs, for
>     SCSI block device, it's /sys/dev/block/8\:0/queue/unpriv_sgio,
>     for example), the file name might be different, So it's better not
>     guess what it should be like currently.
> 
> But 'git grep unpriv_sgio' gives me no results on linux-next,
> I only see it in the source of the dowstream kernel of a certain
> enterprise distro.
> 
> If unpriv_sgio is RHEL-only, maybe we should revert it from upstream
> libvirt completely.
> 
> Jan
> 

I guess it wasn't perfectly clear from the original change that
unpriv_sgio was only for one downstream implementation and only for
shared hostdev (generic scsi), but now that I read the related cases
with this in mind, I see your point.

I suppose there could be reason to carry it only for that downstream
source pool, although I think the overhead of doing that could be made
easier by accepting these patches. At the very least a couple of the
patches are not necessarily sgio hostdev related. Perhaps only patch 6
would need to be reworked to remove the "hostdev_path" and patch 7 could
be removed.

It seems from my reading that sgio is OK for disk since that's not the
contention here, correct? Or does that need to be removed as well?

John

>> Since pure revert caused too many conflicts and because the code has
>> undergone a few changes since the prior reversion, I had to restore
>> the code by rote method.  The reversion includes some refactorings to
>> make the final check much easier to handle.  Of note patch 3 covers much
>> of what was adjusted in the reverted patch 'qemuCheckSharedDevice'.
>> Patch 4 expands the driver lock to cover the same space as the
>> similar disk code - I can take the other as well and shorten the
>> time the disk code has the lock. Keeping them similar is mostly a
>> sanity thing.
>>




More information about the libvir-list mailing list