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

2015-06-30 Thread John Ferlan


On 06/16/2015 03:51 PM, 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.
 
 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.
 
 
 John Ferlan (7):
   qemu: Introduce qemuIsSharedHostdev
   qemu: Introduce qemuGetHostdevPath
   qemu: Refactor qemuCheckSharedDisk to create virCheckUnprivSGIO
   qemu: Refactor qemuAddSharedHostdev and qemuRemoveSharedHostdev
   qemu: Extract qemuGetHostdevPath from qemuGetSharedHostdevKey
   qemu: Add ability to set sgio values for hostdev
   qemu: Add check for unpriv sgio for SCSI generic host device
 
  src/qemu/qemu_conf.c | 205 
 ++-
  1 file changed, 138 insertions(+), 67 deletions(-)
 

ping... Any thoughts/comments on patches 0.5, 1-5 being OK for this
upstream release - including squashing part of patch 6 into 1 (thus
making patches 6  7 downstream only)

Tks,

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


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

2015-06-24 Thread Ján Tomko
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

 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.
 


signature.asc
Description: Digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

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

2015-06-24 Thread John Ferlan


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.


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


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

2015-06-16 Thread John Ferlan
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.

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.


John Ferlan (7):
  qemu: Introduce qemuIsSharedHostdev
  qemu: Introduce qemuGetHostdevPath
  qemu: Refactor qemuCheckSharedDisk to create virCheckUnprivSGIO
  qemu: Refactor qemuAddSharedHostdev and qemuRemoveSharedHostdev
  qemu: Extract qemuGetHostdevPath from qemuGetSharedHostdevKey
  qemu: Add ability to set sgio values for hostdev
  qemu: Add check for unpriv sgio for SCSI generic host device

 src/qemu/qemu_conf.c | 205 ++-
 1 file changed, 138 insertions(+), 67 deletions(-)

-- 
2.1.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list