[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [win-pv-devel] Next signed release - support for readonly disks?



I just got around to testing the patches that Owen sent to the mailing
list on October 18th. They were a group of 5 and were all acked by
Paul except for 5/5.

[PATCH 4/5] Rationalize SCSIOP_* handlers
in particular is what implements the readonly fixes in the SCSI system.

I built the xenvbd driver with these 5 patches on top of master and
tested with Windows Server 2012. It had the desired effect of showing
a readonly disk as such in the Disk Management panel, and also when
trying to copy files into the drive it shows an error dialog with "The
disk is write-protected".

Can these patches be pushed to the git remote?

Regards,
Chris McClymont


On Wed, Oct 18, 2017 at 8:38 PM, Paul Durrant <Paul.Durrant@xxxxxxxxxx> wrote:
>> -----Original Message-----
>> From: win-pv-devel [mailto:win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On
>> Behalf Of Chris McClymont
>> Sent: 18 October 2017 00:40
>> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
>> Subject: Re: [win-pv-devel] Next signed release - support for readonly disks?
>>
>> > In my experience an NTFS filesystem requires a disk to be read/write
>> otherwise it will not function... certainly this is true of a system disk. 
>> Are you
>> using a different filesystem? TBH I think it's quite reasonable for Windows 
>> to
>> assume that a non-removable medium calling itself is a disk is read/write.
>>
>> Readonly disks appear to behave as expected for me using Windows
>> Server 2012 with the GPLPV drivers signed by EJB Digital, tested using
>> both VFAT and NTFS. In the Disk Management UI, the disk appears as
>> Read Only where it normally says Online. For some reason, the option
>> to add a drive letter is not there, but I can mount them using
>> diskpart. Files can be read but trying to paste a file into the
>> mounted readonly disk results in an error dialog:
>> "The disk is write-protected. ... Remove the write-protection or use
>> another disk."  Try Again / Skip / Cancel
>>
>> I believe this is achieved by setting the Write Protected flag in the
>> SCSI parameters in response to the Sense command.
>> It looks like it is set here in the GPLPV code:
>> http://xenbits.xensource.com/ext/win-
>> pvdrivers/file/2d392ecdd366/xenvbd_common/common_miniport.h#l497
>
> Interesting, thanks for the detail.
>
>>
>> These disks have "EJECTSUPPORTED" and also "SURPRISEREMOVALOK" as
>> capabilities (In both GPLPV and this project) so I think they are
>> classified as removable.
>>
>
> It's a bit of a strange distinction but I believe that's different from 
> removable media and I was wondering whether Windows will cope with 
> non-removable media being read-only. From what you say above though, it 
> appears it does.
>
>> > This fix was unintended - and it does seem possible to boot with read-only
>> non-boot disks attached. It's not a fully tested setup, and the frontend 
>> offers
>> no protection against writes to read only disks, so the results are undefined
>> Yeah, my testing shows that writes appear to work, but after
>> refreshing the disk or folder the written files disappear.
>>
>> Thanks Paul and Owen, I will either keep using the GPLPV drivers or
>> look into feasibility of patching in the SCSI level write protection.
>>
>
> I'm sure one of us can look at patching xenvbd accordingly but, as I said, it 
> may be a little while before we do a signed release of the 9.0 drivers.
>
> Cheers,
>
>   Paul
>
>> Regards,
>> Chris McClymont
>>
>>
>> On Tue, Oct 17, 2017 at 1:46 AM, Paul Durrant <Paul.Durrant@xxxxxxxxxx>
>> wrote:
>> >> -----Original Message-----
>> >> From: win-pv-devel [mailto:win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx]
>> On
>> >> Behalf Of Chris McClymont
>> >> Sent: 14 October 2017 02:19
>> >> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
>> >> Subject: [win-pv-devel] Next signed release - support for readonly disks?
>> >>
>> >> Hi everyone,
>> >>
>> >> Support for readonly disks was fixed in xenvbd commit
>> >> 3bb41b49ff66433ab5ebb5d36d24946f40390d7c. When is this likely to make
>> >> it into a signed release?
>> >>
>> >>
>> >> I'm working on Windows templates for Xen and would love to use the
>> >> newer Xen Project drivers signed by the Linux Foundation, rather than
>> >> the EJB Digital or others floating around. But I have a requirement to
>> >> support readonly disks, which don't work in the 8.2.0 release.
>> >> Readonly disks appear in device manage only when emulated, and
>> >> disappear (even with Show Hidden Devices) after the PV drivers are
>> >> installed.
>> >>
>> >> The commit I mentioned is somewhere between 8.2.0 and master.
>> >> Previously, pdo.c would set ScsiStatus to SCSI_ABORT if
>> >> (DiskInfo->DiskInfo & VDISK_READONLY). Now, pdo.c is called target.c
>> >> and the commit removes the readonly limitation.
>> >>
>> >
>> > Hi Chris,
>> >
>> > Owen may have more to say, but I assume this was an unintended
>> consequence of the patch.
>> >
>> > In my experience an NTFS filesystem requires a disk to be read/write
>> otherwise it will not function... certainly this is true of a system disk. 
>> Are you
>> using a different filesystem? TBH I think it's quite reasonable for Windows 
>> to
>> assume that a non-removable medium calling itself is a disk is read/write.
>> >
>> >> I'm wondering a few things:
>> >>   1) When is this commit likely to make it into a signed release
>> >
>> > It's not currently a back-port candidate and there is no firm timeline for
>> releasing 9.0 drivers.
>> >
>> >>   2) Is there a roadmap? I.e. How is it decided when to make releases
>> >> and which features/fixes to include
>> >
>> > Because the Xen Project does not have dedicated infrastructure for testing
>> the PV drivers, we generally rely on the testing done by Citrix XenServer and
>> therefore releases tend to be aligned with updates made to the Citrix
>> branded variant of the drivers.
>> >
>> >>   3) How can I search this mailing list? It doesn't seem to be
>> >> included on http://xen.markmail.org/search/
>> >>
>> >
>> > You can see the mailing list archives at
>> https://lists.xenproject.org/archives/html/win-pv-devel. As for searching via
>> markmail... I have requested that the list be added in the past, but I'll 
>> have
>> another go.
>> >
>> > Cheers,
>> >
>> >   Paul
>> >
>> >> Thanks,
>> >> Chris McClymont
>> >>
>> >> _______________________________________________
>> >> win-pv-devel mailing list
>> >> win-pv-devel@xxxxxxxxxxxxxxxxxxxx
>> >> https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
>>
>> _______________________________________________
>> win-pv-devel mailing list
>> win-pv-devel@xxxxxxxxxxxxxxxxxxxx
>> https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel

_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/win-pv-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.