Awesome Open Source
Awesome Open Source

WinSpd ยท Windows Storage Proxy Driver

Download




WinSpd enables the creation of storage units ("SCSI disks") in user mode (i.e. without writing any kernel mode code). Such storage units are created and served by user mode storage devices (i.e. user mode processes) and are added to the Windows OS storage stack. They appear to Windows as real disks that can be formatted and accessed via a file system such as NTFS.

User Mode Storage Devices

A user mode storage device is a user mode process that can create and serve storage units. As storage unit is a SCSI "direct-access block device" (as per the definition in the SCSI SBC standard) or more commonly referred to as a "SCSI disk". It is used to store data in logical blocks; each block contains the same amount of data (the Block Length) and has a Logical Block Address (LBA), which is a 64-bit number in a single contiguous address space. In particular WinSpd (and the SCSI standard) do not assume the traditional geometry of cylinder-head-sector (CHS) for how blocks are laid out.

Storage units support two primary operations: read and write, and two secondary operations: flush and unmap:

  • Read: read blocks at the specified LBA.
  • Write: write blocks at the specified LBA.
  • Flush: flush any cached block data at the specified LBA.
  • Unmap: unmap (deallocate) blocks at the specified LBA. This is like the well known TRIM command.

For a full tutorial on creating a user mode storage device see the Tutorial.

Design

WinSpd consists of a number of software components with different responsibilities:

  • The core components are a kernel driver (implemented as a StorPort virtual miniport) and a user mode DLL. User mode storage devices use the DLL to communicate with the driver via special IOCTL's.
  • A launcher service that is used to launch and control user mode storage devices.
  • A shell extension that is used to implement the "mount" and "eject" functionalities available via the Windows Explorer and Shell.

Archictecture diagram

The WinSpd virtual miniport implements the following SCSI commands:

  • REPORT LUNS
  • TEST UNIT READY
  • INQUIRY: Standard, Supported Pages VPD, Serial Number VPD, Device Identifiers VPD, Block Limits VPD, Logical Block Provisioning VPD
  • MODE SENSE(6), MODE SENSE(10): All Pages, Mode Caching Page
  • READ CAPACITY(10), READ CAPACITY(16)
  • READ(6), READ(10), READ(12), READ(16)
  • WRITE(6), WRITE(10), WRITE(12), WRITE(16)
  • SYNCHRONIZE CACHE(10), SYNCHRONIZE CACHE(16)
  • UNMAP

Project Organization

The project source code is organized as follows:

  • ๐Ÿ“ build/VStudio: WinSpd solution and project files.
  • ๐Ÿ“ ext: External dependencies.
    • ๐Ÿ“ ext/tlib: A small test library originally from the secfs (Secure Cloud File System) project.
  • ๐Ÿ“ inc: Public headers.
    • ๐Ÿ“ inc/winspd: Public headers for the WinSpd API.
  • ๐Ÿ“ src: WinSpd source code.
    • ๐Ÿ“ src/devsetup: Source code to the devsetup utility. It is used to add or remove the WinSpd device driver from the system.
    • ๐Ÿ“ src/dll: Source code to the WinSpd DLL. It is used by user mode storage devices to communicate with the WinSpd device driver.
    • ๐Ÿ“ src/dotnet: Source code to the .NET layer.
    • ๐Ÿ“ src/launcher: Source code to the launcher service and the launchctl utility. The launcher service is used to launch and control user mode storage devices.
    • ๐Ÿ“ src/scsitool: Source code to the scsitool command line utility.
    • ๐Ÿ“ src/shellex: Source code to the WinSpd shell extension. It is used to implement the "mount" and "eject" functionalities available via the Windows Explorer and the Shell.
    • ๐Ÿ“ src/stgtest: Source code to the stgtest storage testing tool.
    • ๐Ÿ“ src/sys: Source code to the WinSpd kernel driver.
  • ๐Ÿ“ tst: Source code to example user mode storage devices and test tools.
  • ๐Ÿ“ tools: Various tools for building and testing WinSpd.

License

WinSpd is available under the GPLv3 license with a special exception for Free/Libre and Open Source Software. A commercial license is also available. Please contact Bill Zissimopoulos <billziss at navimatics.com> for more details.


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
c (14,542)ย 
windows (1,376)ย 
storage (248)ย 
kernel (233)ย 
driver (188)ย 
disk (55)ย 
gplv3 (44)ย 

Find Open Source By Browsing 7,000 Topics Across 59 Categories

Advertising ๐Ÿ“ฆย 10
All Projects
Application Programming Interfaces ๐Ÿ“ฆย 124
Applications ๐Ÿ“ฆย 192
Artificial Intelligence ๐Ÿ“ฆย 78
Blockchain ๐Ÿ“ฆย 73
Build Tools ๐Ÿ“ฆย 113
Cloud Computing ๐Ÿ“ฆย 80
Code Quality ๐Ÿ“ฆย 28
Collaboration ๐Ÿ“ฆย 32
Command Line Interface ๐Ÿ“ฆย 49
Community ๐Ÿ“ฆย 83
Companies ๐Ÿ“ฆย 60
Compilers ๐Ÿ“ฆย 63
Computer Science ๐Ÿ“ฆย 80
Configuration Management ๐Ÿ“ฆย 42
Content Management ๐Ÿ“ฆย 175
Control Flow ๐Ÿ“ฆย 213
Data Formats ๐Ÿ“ฆย 78
Data Processing ๐Ÿ“ฆย 276
Data Storage ๐Ÿ“ฆย 135
Economics ๐Ÿ“ฆย 64
Frameworks ๐Ÿ“ฆย 215
Games ๐Ÿ“ฆย 129
Graphics ๐Ÿ“ฆย 110
Hardware ๐Ÿ“ฆย 152
Integrated Development Environments ๐Ÿ“ฆย 49
Learning Resources ๐Ÿ“ฆย 166
Legal ๐Ÿ“ฆย 29
Libraries ๐Ÿ“ฆย 129
Lists Of Projects ๐Ÿ“ฆย 22
Machine Learning ๐Ÿ“ฆย 347
Mapping ๐Ÿ“ฆย 64
Marketing ๐Ÿ“ฆย 15
Mathematics ๐Ÿ“ฆย 55
Media ๐Ÿ“ฆย 239
Messaging ๐Ÿ“ฆย 98
Networking ๐Ÿ“ฆย 315
Operating Systems ๐Ÿ“ฆย 89
Operations ๐Ÿ“ฆย 121
Package Managers ๐Ÿ“ฆย 55
Programming Languages ๐Ÿ“ฆย 245
Runtime Environments ๐Ÿ“ฆย 100
Science ๐Ÿ“ฆย 42
Security ๐Ÿ“ฆย 396
Social Media ๐Ÿ“ฆย 27
Software Architecture ๐Ÿ“ฆย 72
Software Development ๐Ÿ“ฆย 72
Software Performance ๐Ÿ“ฆย 58
Software Quality ๐Ÿ“ฆย 133
Text Editors ๐Ÿ“ฆย 49
Text Processing ๐Ÿ“ฆย 136
User Interface ๐Ÿ“ฆย 330
User Interface Components ๐Ÿ“ฆย 514
Version Control ๐Ÿ“ฆย 30
Virtualization ๐Ÿ“ฆย 71
Web Browsers ๐Ÿ“ฆย 42
Web Servers ๐Ÿ“ฆย 26
Web User Interface ๐Ÿ“ฆย 210