virSCSIDeviceGetName;
virSCSIDeviceGetReadonly;
virSCSIDeviceGetSgName;
+virSCSIDeviceGetShareable;
virSCSIDeviceGetTarget;
virSCSIDeviceGetUnit;
virSCSIDeviceGetUsedBy;
dev->source.subsys.u.scsi.bus,
dev->source.subsys.u.scsi.target,
dev->source.subsys.u.scsi.unit,
- dev->readonly)) == NULL)
+ dev->readonly,
+ dev->shareable)) == NULL)
goto cleanup;
if (virSCSIDeviceFileIterate(scsi,
hostdev->source.subsys.u.scsi.bus,
hostdev->source.subsys.u.scsi.target,
hostdev->source.subsys.u.scsi.unit,
- hostdev->readonly)))
+ hostdev->readonly,
+ hostdev->shareable)))
goto cleanup;
virSCSIDeviceSetUsedBy(scsi, def->name);
hostdev->source.subsys.u.scsi.bus,
hostdev->source.subsys.u.scsi.target,
hostdev->source.subsys.u.scsi.unit,
- hostdev->readonly)))
+ hostdev->readonly,
+ hostdev->shareable)))
goto cleanup;
if (scsi && virSCSIDeviceListAdd(list, scsi) < 0) {
hostdev->source.subsys.u.scsi.bus,
hostdev->source.subsys.u.scsi.target,
hostdev->source.subsys.u.scsi.unit,
- hostdev->readonly))) {
+ hostdev->readonly,
+ hostdev->shareable))) {
VIR_WARN("Unable to reattach SCSI device %s:%d:%d:%d on domain %s",
hostdev->source.subsys.u.scsi.adapter,
hostdev->source.subsys.u.scsi.bus,
dev->source.subsys.u.scsi.bus,
dev->source.subsys.u.scsi.target,
dev->source.subsys.u.scsi.unit,
- dev->readonly);
+ dev->readonly,
+ dev->shareable);
if (!scsi)
goto done;
dev->source.subsys.u.scsi.bus,
dev->source.subsys.u.scsi.target,
dev->source.subsys.u.scsi.unit,
- dev->readonly);
+ dev->readonly,
+ dev->shareable);
if (!scsi)
goto done;
dev->source.subsys.u.scsi.bus,
dev->source.subsys.u.scsi.target,
dev->source.subsys.u.scsi.unit,
- dev->readonly);
+ dev->readonly,
+ dev->shareable);
if (!scsi)
goto done;
dev->source.subsys.u.scsi.bus,
dev->source.subsys.u.scsi.target,
dev->source.subsys.u.scsi.unit,
- dev->readonly);
+ dev->readonly,
+ dev->shareable);
if (!scsi)
goto done;
dev->source.subsys.u.scsi.bus,
dev->source.subsys.u.scsi.target,
dev->source.subsys.u.scsi.unit,
- dev->readonly);
+ dev->readonly,
+ dev->shareable);
if (!scsi)
goto done;
const char *used_by; /* name of the domain using this dev */
bool readonly;
+ bool shareable;
};
struct _virSCSIDeviceList {
unsigned int bus,
unsigned int target,
unsigned int unit,
- bool readonly)
+ bool readonly,
+ bool shareable)
{
virSCSIDevicePtr dev, ret = NULL;
char *sg = NULL;
dev->target = target;
dev->unit = unit;
dev->readonly = readonly;
+ dev->shareable= shareable;
if (!(sg = virSCSIDeviceGetSgName(adapter, bus, target, unit)))
goto cleanup;
return dev->readonly;
}
+bool
+virSCSIDeviceGetShareable(virSCSIDevicePtr dev)
+{
+ return dev->shareable;
+}
+
int
virSCSIDeviceFileIterate(virSCSIDevicePtr dev,
virSCSIDeviceFileActor actor,
unsigned int bus,
unsigned int target,
unsigned int unit,
- bool readonly);
+ bool readonly,
+ bool shareable);
void virSCSIDeviceFree(virSCSIDevicePtr dev);
void virSCSIDeviceSetUsedBy(virSCSIDevicePtr dev, const char *name);
unsigned int virSCSIDeviceGetTarget(virSCSIDevicePtr dev);
unsigned int virSCSIDeviceGetUnit(virSCSIDevicePtr dev);
bool virSCSIDeviceGetReadonly(virSCSIDevicePtr dev);
+bool virSCSIDeviceGetShareable(virSCSIDevicePtr dev);
/*
* Callback that will be invoked once for each file