Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defines needed for btree-test #111

Draft
wants to merge 232 commits into
base: windows
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
232 commits
Select commit Hold shift + click to select a range
a270861
Windows: bring in SPL sourcefiles
lundman Jul 31, 2020
40074ca
Windows: ZFS source file place holders
lundman Jul 31, 2020
445a55b
Windows: Add source files and CMake
lundman Oct 30, 2020
edfe7e5
Windows: Compile kernel driver, and load
lundman Nov 22, 2020
dab0f6c
Windows: bring in userland
lundman Nov 24, 2020
68c2a6c
Windows: port userland, and cmd/zpool
lundman Dec 15, 2020
7fb88f3
Upstream: add termios.h
lundman Dec 15, 2020
d39b845
Upstream: highbits64 already defined.
lundman Dec 15, 2020
94a94b1
Upstream: this probably isn't the header for NORETURN
lundman Dec 15, 2020
05e92b7
Upstream: Add MSVC to comiler directives
lundman Dec 15, 2020
7898dc7
Upstream: No OS xdr header
lundman Dec 15, 2020
9c0565f
Upstream: dance around constructor
lundman Dec 15, 2020
2297e82
Upstream: Additional header
lundman Dec 15, 2020
92c6f2f
Upstream: Add Windows VENDOR
lundman Dec 15, 2020
a4dcc29
Upstrema: Add Windows mount options
lundman Dec 15, 2020
55fe09e
Upstream: Windows will do own run_process
lundman Dec 15, 2020
8b12fe2
Upstream: Use usleep
lundman Dec 15, 2020
656684e
Upstream: Remove dlopen and global var for now
lundman Dec 15, 2020
cd16fe3
Windows: squash
lundman Dec 15, 2020
0229061
Upstream: Add Windows properties
lundman Dec 15, 2020
3e6d4aa
Upstream: No OS libgen.h
lundman Dec 15, 2020
ca06a77
Upstream: No OS uio.h
lundman Dec 15, 2020
4bb1c51
Windows: port cmd/zfs
lundman Dec 17, 2020
6d1726f
Upstream: OS defines highbit64
lundman Dec 17, 2020
cd18125
Windows: bring in cmd/zdb cmd/zstream cmd/kstat
lundman Dec 17, 2020
733a45e
Windows: cmake files
lundman Dec 17, 2020
97a77b6
Windows: source files are not optional
lundman Dec 17, 2020
6adcd52
Windows: Include all sources files
lundman Dec 20, 2020
b76fbc5
Windows: get closer to ioctls working from userland
lundman Dec 21, 2020
bbb36be
Windows: Fix ioctl from userland, basic port works
lundman Dec 22, 2020
dcd42b0
Upstream: Add zfs_resolve_shortname_os()
lundman Dec 23, 2020
38202de
Windows: Add import scan code
lundman Dec 23, 2020
2dcb071
Upstream: Different random on Windows
lundman Dec 23, 2020
8bca4ab
Upstream: Add slash to DEV path to avoid backslashes
lundman Dec 23, 2020
391ebd7
Windows: Porting work
lundman Dec 23, 2020
e5b6177
Upstream: Use of posix_memalign need special free
lundman Dec 28, 2020
ee72612
Windows: Allow all policy calls
lundman Dec 28, 2020
a7b39e6
Windows: Attempt to handle vdev_path and vdev_physpath
lundman Dec 28, 2020
a5426c5
Windows: expand paths to #size#offset#/path
lundman Dec 28, 2020
85a9945
Windows: milestone, create pool
lundman Jan 4, 2021
b7243ca
Upstream: Add mimic property
lundman Jan 4, 2021
6bd51af
Upstream: remove assert
lundman Jan 5, 2021
7e2e04e
Windows: additional work
lundman Jan 5, 2021
218896c
Windows: work on unmount/export
lundman Jan 6, 2021
53dfb8c
Windows: Fix zfs_save_arguments/basename for zpool/zfs
lundman Jan 22, 2021
19f46af
Windows: Fix import scan and vdev_file reading
lundman Jan 25, 2021
b549e16
Windows: Lets not delete pool files and Write shouldnt call read.
lundman Jan 25, 2021
0833266
Windows: Latest import code.
lundman Jan 25, 2021
d665ea0
Windows: change to use cert sha1 and temporarily include gitrev
lundman Jan 26, 2021
ce5cb51
Windows: Add devstudio individual components list
lundman Jan 26, 2021
2733543
Windows: Warnings - low hanging fruit
lundman Jan 26, 2021
73e70e6
Windows: further warnings reduction
lundman Jan 26, 2021
389f44b
Windows: Auto generate zfs_gitrev.h
lundman Jan 27, 2021
94d9b95
Windows: minor header fix
lundman Jan 28, 2021
5e2405a
Windows: Attempt to implement taskq_dispatch_delay()
lundman Jan 28, 2021
6af7a3d
Windows: taskq must clear delay
lundman Jan 29, 2021
a68232c
Windows: Bring in zfsinstaller.exe
lundman Jan 29, 2021
6d7a540
Windows: Redo vdev_disk.c IO to avoid allocations
lundman Jan 30, 2021
e67ecb0
Windows: zfsinstaller used old ZFSin names
lundman Feb 3, 2021
d05e786
Windows: Cleanup CMake work, to build sys
lundman Feb 5, 2021
fa3d7f9
Windows: uninstall was sending wrong ioctl
lundman Feb 8, 2021
8581a55
Windows: zvol_fini uses system_taskq, fix unload order
lundman Feb 9, 2021
69cf1a8
Windows: Add Inno Setup (debug)
lundman Feb 9, 2021
68a394f
Windows: can we keep offset+length separate?
lundman Feb 12, 2021
9541fe2
Revert "Windows: can we keep offset+length separate?"
lundman Feb 12, 2021
6e65d63
Windows: Correct zpool import for disks
lundman Feb 12, 2021
34d1eba
Windows: hack in export\umount
lundman Feb 12, 2021
a6aba26
Windows: vcruntime.dll dependency removal
lundman Feb 12, 2021
559e136
Windows: zpool create fixes
lundman Feb 15, 2021
0931d2b
Upstream: Add partition after zpool_label_disk
lundman Feb 15, 2021
0997ffe
Windows: Can not rely on Windows stat.h
lundman Feb 15, 2021
9a43bc0
Upstream: shorthand path never calls stat()
lundman Feb 15, 2021
4428768
Windows: Allow harddiskXPartitionY shortname
lundman Feb 15, 2021
d93d2d6
Windows: Handle partitions only Offline wholedisk
lundman Feb 16, 2021
b40d577
Upstream: update_vdev_config_dev_strs() can change path
lundman Feb 16, 2021
2e2b1bc
Windows: Handle partition zpool import
lundman Feb 16, 2021
c16aa95
Windows: Fight CMake and OpenSSL
lundman Feb 17, 2021
f2c64a7
Windows: Check for error code when calling zfs_dirlook()
lundman Feb 18, 2021
b252373
Windows: re-arrange the release of stream dvp
lundman Feb 22, 2021
c95db87
Upstream: allow Windows zvols to have 1 longhold
lundman Mar 4, 2021
978daf7
Windows: fix zvol export/destroy
lundman Mar 4, 2021
5981fe1
Upstream: strftime differences cause abort()
lundman Mar 15, 2021
939e008
fix for cstyle. (#13)
lundman Apr 6, 2021
4a1972f
vnode_put(NULL) and missing mutex
lundman Apr 6, 2021
f907736
Upstream: Avoid ASSERTs in zdb
lundman Apr 6, 2021
8b81069
Upstream: ddi_stroul would not return end ptr
lundman Apr 6, 2021
2ea2002
Windows: userland vdev_file needs to handle partition hack
lundman Apr 6, 2021
64071fb
Upstream: aligned_malloc must call aligned_free
lundman Apr 6, 2021
0bb132d
Upstream: Alloc zdb_cd_t, too large for stack
lundman Apr 21, 2021
026b3f4
macOS: make zdb run
lundman Apr 21, 2021
0ae5965
Upstream: userland needs to free aligned
lundman Apr 21, 2021
791f43f
macOS: use the correct memory allocator
lundman Apr 22, 2021
18addf4
Windows: zdb corrections, posix bug fixes
lundman Apr 22, 2021
5bbdf84
share flag fixed for CreateFile (#19)
datacore-skumar Apr 28, 2021
4ec7e1e
dont sign until we get a cert
lundman Jun 29, 2021
dc90cbb
Upstream: work around different API for sbuf_finish()
lundman Feb 24, 2021
040a7bc
Upstream: dmu_redact.c does not call bqueue_destroy
lundman Feb 26, 2021
35d5873
Upstream: Add Windows to abd.h
lundman Jun 30, 2021
d9dbcc3
Large sweeping compile fixes
lundman Jun 30, 2021
5b88909
Windows: compile fixes after rebase
lundman Jul 1, 2021
192830d
Upstream: changes after rebase
lundman Jul 1, 2021
da53a76
Windows: add new files
lundman Jul 1, 2021
d0526e2
Upstream: Add Windows support to OpenZFS
lundman Oct 30, 2020
ebda417
rebase misses.
lundman Jul 2, 2021
76fa595
WIP: Handle scsi unmap/discard requests to zvol_unmap
lundman Apr 14, 2021
ba11666
more compile fixes, loads.
lundman Jul 2, 2021
367ab38
Upstream: Move check_file to os/ section
lundman Apr 4, 2021
c909b6a
Upstream: more memaligned free fixes
lundman Jul 2, 2021
054e49d
More windows fixes, vdev_disk/file table - aoi ignore
lundman Jul 2, 2021
782f6c0
Remove DbgBreakPoint from zvol unmap
lundman Jul 2, 2021
9f0fd28
CPU Hog Fix
datacore-rm Jul 1, 2021
d6fcf9c
ZFS_ENTER has changed
lundman Jul 3, 2021
e1b389d
Fix vp->zp in fs_read/write, and asserts
lundman Jul 3, 2021
8f09d7d
zfs-596:Zpool import not working
datacore-rm Jul 3, 2021
b9c317e
Update kstat and handle invalid fopen modes
lundman Jul 4, 2021
d381610
Update spl-taskq for better taskq_cancel_id
lundman Jul 4, 2021
1215825
Clean up minor things in new taskq and kstat
lundman Jul 4, 2021
e95186a
Windows: spl-kstat is initialized twice
lundman Jul 5, 2021
3c63655
kstat uses separate ioctls and kstat_t must match
lundman Jul 5, 2021
6eaddf8
create vmem buckets with PAGESIZE quantum
lundman Jul 5, 2021
528c837
Windows: implement mmap() wrapper
lundman Jul 5, 2021
ebc75ad
Windows: implement openat() fix struct stat
lundman Jul 6, 2021
7ef1fa2
Upstream: Make compat conf reading handle cr/lf
lundman Jul 6, 2021
9ec1782
Windows: update zvol_os.c to latest
lundman Jul 6, 2021
1ac314f
Windows: add zvol attach and detach
lundman Jul 7, 2021
0e2df1e
Zpool destroy is crashing
datacore-rm Jul 6, 2021
0fd6f12
Revert "Upstream: allow Windows zvols to have 1 longhold"
lundman Jul 7, 2021
0ae9a48
Upstream: attach and detach zvols
lundman Jul 7, 2021
eae73fe
Windows: kstat initial buffer not large enough to hold kmem
lundman Jul 7, 2021
cfdafcc
Windows: DEBUG build default to dprintf messages
lundman Jul 7, 2021
3ab4238
Windows: do not static pthread.h variables
lundman Jul 7, 2021
f9ae463
Upstream: let cache file to be 0-len
lundman Jul 7, 2021
1f4f9cc
miscompare-fix, assign offset to uio
datacore-rm Jul 16, 2021
275204f
SSY DI integration changes
datacore-rm Jul 20, 2021
2713c9a
zvol Direct read/write interface
datacore-rm Jul 22, 2021
1675438
Enable WPP tracing for module/os/windows folder
Aug 10, 2021
97e0d35
Windows: move variable defines to .c file
lundman Aug 14, 2021
258c584
Windows: vcxproj include update to find zfsdi.h
lundman Aug 14, 2021
d923f6e
Windows: struct kstat between userland and kernel must match
lundman Aug 14, 2021
7f4a3e2
Changes for building Release binaries
Aug 16, 2021
f8451ad
Windows: Add SET_ERROR macro
lundman Aug 14, 2021
d1b3fe5
ssv-20352 Handled WMI method GetDiscoveredPortAttributes
datacore-rm Aug 23, 2021
00563a1
assign targetId and lun after zvol is open
datacore-rm Aug 31, 2021
07b5bd1
Enable WPP for module/zfs folder
Aug 31, 2021
21af137
Perfmon counters added
datacore-skumar Sep 6, 2021
84d0bf6
Calling 'arc_kstat_update_windows' for validation and added new tunab…
Sep 9, 2021
de5e875
Setting 'NumberOfPhysicalBreaks=0x21', this will make sure the max IO…
datacore-rm Sep 15, 2021
1abac6a
update driver version in inf during build to support upgrade
datacore-rm Sep 20, 2021
9814d2f
Windows: STOR unload uses dprintf
lundman Sep 29, 2021
6bebd4e
Windows: port of bsdtimeout can not handle NULL
lundman Sep 29, 2021
948cc7a
Windows: set reparse point can panic
lundman Sep 30, 2021
32e2137
Windows: zvol_os_detach() can be called twice
lundman Sep 30, 2021
7d43566
Windows: change wmsum to be a struct
lundman Sep 30, 2021
94291f2
Add OpenZFS.man to the Installer
lundman Sep 30, 2021
23cbc01
File version added
datacore-skumar Sep 24, 2021
16f342a
Windows: handle delete reparse point for unmount
lundman Oct 11, 2021
1ac36d5
Windows: avoiding the zfs_remove_driveletter
lundman Oct 12, 2021
dbbd1d9
Windows: fix panic in procfs_list_destroy()
lundman Oct 12, 2021
3dcbb62
Windows: spl-proclist can not use submodule
lundman Oct 12, 2021
158b594
Windows: Enable ASM in cmake, use setjmp
lundman Oct 13, 2021
05ad53d
Windows: add setjmp implementation
lundman Oct 14, 2021
7718cd4
Windows: fix salt generation
lundman Oct 14, 2021
bba4b0a
Upstream: Skip mkdir on mount
lundman Oct 14, 2021
2183189
Windows: fix bsd_untimeout
lundman Oct 19, 2021
042e8ce
Windows: attempt to release vnodes on unload
lundman Oct 20, 2021
6c1b7f6
Windows: zpool create check for dir not empty
lundman Oct 26, 2021
2f366f1
Upstream: Handle slashes better for Windows
lundman Oct 28, 2021
b750143
Windows: unique_id math off in the exact case.
lundman Oct 28, 2021
b123cad
macOS: zvol_replay must call zil_open
lundman Jul 13, 2021
676387a
Windows: Make sure to allocate key space when key == 0
lundman Nov 12, 2021
6975ca9
Inf2Cat.exe sometimes throws error during build
datacore-rm Nov 12, 2021
e514d29
case insensitive path compare for windows zpool devices
datacore-rm Nov 17, 2021
0416e7a
Windows: avoid UseAfterFree with delayed taskq
lundman Nov 17, 2021
d910cc4
Setting the FILE_OBJECT minor value in the zfs device object state
datacore-rm Dec 7, 2021
57f1f69
fixed FILE_OBJECT corruption issue
datacore-rm Dec 8, 2021
ed9ff87
changing the datatype of zfs_arc_meta_limit to uint64_t
datacore-rm Dec 10, 2021
fa1621f
Set value of zfs-dirty-data-max parameter to 4GB
datacore-rm Feb 2, 2022
6b6d9ad
Windows: compile fixes after rebase.
lundman Feb 21, 2022
5d13638
Upstream: dsl pool.h
lundman Feb 21, 2022
796ce83
Windows: fix prop until squash
lundman Feb 21, 2022
4149d75
Upstream: 64bit arc tunables
lundman Feb 21, 2022
b8c0b73
Upstream: use ATTR not AT
lundman Feb 21, 2022
32152cd
Upstream: Expose zvol state list
lundman Feb 21, 2022
b919e8c
Fix import path work for foreign pools
lundman Mar 10, 2022
0598839
changed zfs_wrlog_data_max parameter to uint64_t
datacore-rm Mar 10, 2022
c93310a
Windows: Add stack remaining kstat
lundman Mar 11, 2022
7850610
using lookasidelist for abd_chunk_cache
datacore-rm Mar 18, 2022
c954525
added kstat for lookasidelist
datacore-rm Mar 25, 2022
9ebc4b9
Merge branch 'windows' of github.com:openzfsonwindows/openzfs into wi…
lundman Apr 5, 2022
1a7041d
Windows: make a linker_set.h header file
lundman Mar 17, 2022
e75b66c
Windows: Update mod_os.h to use linker_set.h
lundman Mar 18, 2022
a5755f3
Windows: Process tunables linker-set "zt"
lundman Mar 18, 2022
2b2c789
Revert "changed zfs_wrlog_data_max parameter to uint64_t"
lundman Apr 5, 2022
4736204
Upstream: Replace ZFS_MODULE_PARAM 'long' usage
lundman Mar 25, 2022
eac2b97
Windows: debugging around CcInit
lundman Apr 5, 2022
ba75bdc
Windows: Update build, for codesign etc
lundman Apr 5, 2022
b446ef2
Windows: Add additional dirlist types
lundman Apr 7, 2022
2e725e0
Windows: Avoid NULL dvp access
lundman Apr 7, 2022
b95b51b
Windows: Also skip writes CcFlushCache
lundman Apr 7, 2022
fbbfb52
Refresh ASSERT*, Update vnode pager setsize
lundman Apr 15, 2022
3b89512
Fix REPARSE, vnode pager setsize, enable lazy write
lundman Apr 15, 2022
940f0a7
Catch IRQL changes sooner
lundman Apr 15, 2022
03d09b0
Upstream: Implement zfs_xattr_owner_unlinked
lundman Apr 15, 2022
82e5468
Windows: zfslookup modfies buffer, needs to use copy
lundman Apr 15, 2022
a9747f4
unlock the io buffer in the MDL before freeing it (#87)
datacore-rm Apr 19, 2022
a23e0e9
IoStatus from IRP to be used to set zio->io_error (#89)
datacore-ramya Apr 21, 2022
20876b3
Windows: getf assigned wrong member, breaking zfs send/recv
lundman Apr 21, 2022
5057d96
Fix namebuffer overrun, and allow creation of Streams
lundman Apr 21, 2022
85bdb9e
Windows: incorrect use of zfs_obtain_xattr()
lundman Apr 27, 2022
8bab236
Free the lookasidelist_cache and its kstat member pointer in correct …
datacore-rm May 2, 2022
4b9c29f
Cancel the bsd-timers before driver unload (#93)
datacore-rm May 2, 2022
f899f5b
Issue : After zpool export , zvols still appear in the disk managemen…
datacore-senthil May 5, 2022
ceb6d3c
Windows: handle unlinked drain wrt to security
lundman May 25, 2022
64dbc18
Windows: partition disks win way and dont zero label after
lundman May 25, 2022
6c3ad46
Revert "Windows: partition disks win way and dont zero label after"
lundman May 25, 2022
99850fd
Windows: do not zerolabel
lundman May 25, 2022
5a644e6
Windows: RelatedObject would leave finalname unset
lundman May 26, 2022
8fd5a79
Windows: Add oplock logic
lundman Jun 9, 2022
22a18c6
Windows: Add additional file information query types
lundman Jun 15, 2022
5d39a0e
Windows: silence tunable debug stats
lundman Jun 16, 2022
a74333c
zdb dump block: Debug assert fail for isprint() when char value > 127…
datacore-rm Jun 28, 2022
f66b080
Skip __zfs_dbgmsg in a DPC (#104)
andrewc12 Jul 8, 2022
9ce0b2f
Default test sign certificates (#105)
andrewc12 Jul 20, 2022
b246ff6
Add large warning header to README.md (#106)
senbrow Jul 20, 2022
3a71b25
Ignore Visual Studio files (#109)
andrewc12 Jul 20, 2022
7fe600b
ioctldeviceobject cleanup moved to IRP_MJ_CLOSE, TO avoid DV violatio…
datacore-skumar Aug 3, 2022
2f653a1
Workflow for windows builds w/ output (#115)
andrewc12 Aug 3, 2022
53bab67
ignore autogenerated files (#112)
andrewc12 Aug 8, 2022
fa44265
Make Inno setup installer in workflow (#118)
andrewc12 Aug 8, 2022
f21d5c0
Update tunables to handle string
lundman Aug 11, 2022
fe81535
Clean up source to get Linux builds working (#119)
andrewc12 Aug 17, 2022
7bf3dc4
Defines needed for btree-test
andrewc12 Jul 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
58 changes: 58 additions & 0 deletions .github/workflows/build_for_wsl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: build_for_wsl

on:
push:
pull_request:
workflow_dispatch:

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Reclaim disk space
run: |
${{ github.workspace }}/.github/workflows/scripts/reclaim_disk_space.sh
- name: Install dependencies
run: |
sudo apt-get update
xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt sudo apt-get install -qq
sudo apt-get clean
- name: Autogen.sh
run: |
./autogen.sh
- name: Configure
run: |
./configure --enable-debug --enable-debuginfo --enable-asan --enable-ubsan
- name: Make
run: |
make -j16 --no-print-directory --silent pkg-utils pkg-kmod
#make -j$(nproc) --no-print-directory --silent pkg-utils pkg-kmod
- name: get files
run: ls -Rla
- name: Prepare artifacts
if: failure()
run: |
RESULTS_PATH=$(readlink -f /var/tmp/test_results/current)
sudo dmesg > $RESULTS_PATH/dmesg
sudo cp /var/log/syslog /var/tmp/dmesg-prerun $RESULTS_PATH/
sudo chmod +r $RESULTS_PATH/*
# Replace ':' in dir names, actions/upload-artifact doesn't support it
for f in $(find /var/tmp/test_results -name '*:*'); do mv "$f" "${f//:/__}"; done
- uses: actions/upload-artifact@v2
if: failure()
with:
name: Test logs Ubuntu-${{ matrix.os }}
path: |
/var/tmp/test_results/*
!/var/tmp/test_results/current
if-no-files-found: ignore

- uses: actions/upload-artifact@v2
with:
name: build result
path: |
*.deb
*.rpm
142 changes: 142 additions & 0 deletions .github/workflows/windows-build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: windows-build-test

on:
push:
pull_request:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: windows-latest

steps:
- uses: ilammy/msvc-dev-cmd@v1

- uses: actions/checkout@v3
with:
#repository: openzfsonwindows/openzfs
fetch-depth: 0

- name: debug - git status
run: git status

#https://stackoverflow.com/a/60883893
# "C:\Program Files\Git\bin\git.exe" -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +90acd8f20e6d0c14b83241cc7dcd17df27d5a95b:refs/remotes/origin/andrew_workflows-7
#- name: checkout again
# run: git fetch --prune --unshallow


- name: Import signing certificate
run: |
$plaintextpwd = 'password1234'
$pwd = ConvertTo-SecureString -String $plaintextpwd -Force -AsPlainText
Import-PfxCertificate -FilePath ${{github.workspace}}/contrib/windows/TestCert/test_sign_cert_pass.pfx -CertStoreLocation Cert:\CurrentUser\My -Password $pwd -Exportable

#- name: Remove provided ssl
# run: Remove-Item -Path "C:\Strawberry\" -Recurse -Force

#- name: Install openssl
# run: git clone https://github.com/andrewc12/openssl.git

- name: Checkout openssl
uses: actions/checkout@v3
with:
repository: andrewc12/openssl # optional, default is ${{ github.repository }}
path: openssl # optional

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -G "Ninja" -B ${{github.workspace}}/out/build/x64-Debug ${{github.workspace}} -DOPENSSL_ROOT_DIR=${{github.workspace}}/openssl/ -DCRYPTO_STATIC_TEST=${{github.workspace}}/openssl/lib/VC/static/libcrypto64MTd.lib -DLIB_EAY_DEBUG=${{github.workspace}}/openssl/lib/VC/static/libcrypto64MTd.lib -DLIB_EAY_RELEASE=${{github.workspace}}/openssl/lib/VC/static/libcrypto64MT.lib -DOPENSSL_INCLUDE_DIR=${{github.workspace}}/openssl/include -DSSL_EAY_DEBUG=${{github.workspace}}/openssl/lib/VC/static/libssl64MTd.lib -DSSL_EAY_RELEASE=${{github.workspace}}/openssl/lib/VC/static/libssl64MT.lib

- name: Build
working-directory: ${{github.workspace}}/out/build/x64-Debug
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/out/build/x64-Debug

- name: debug - get git rev
run: git describe --always --long --dirty

- name: Download Inno Setup istaller
uses: suisei-cn/[email protected]
id: innoinstaller
with:
url: 'https://jrsoftware.org/download.php/is.exe'
target: ${{github.workspace}}/

- name: debug - echo filename
run: echo ${{ steps.innoinstaller.outputs.filename }}

- name: debug - list
run: ls ${{github.workspace}}\

- name: debug - list
run: ls ${{github.workspace}}\${{ steps.innoinstaller.outputs.filename }}

- name: install inno
run: 'Start-Process -FilePath "${{github.workspace}}\${{ steps.innoinstaller.outputs.filename }}" -Wait -ArgumentList "/NORESTART /ALLUSERS /VERYSILENT /LOG=`"${{github.workspace}}\InnoSetup-Install.log`""'

#- name: Wait for install to finish
# run: Start-Sleep -Seconds 30
# uses: iFaxity/wait-on-action@v1
# with:
# resource: 'C:\Program Files\OpenZFS On Windows\zpool.exe'

- name: debug - print log
run: cat "${{github.workspace}}\InnoSetup-Install.log"

- name: run ISCC.exe to construct OpenZFS installer
run: '&"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" .\ZFSInstall-debug.iss | Tee-Object -FilePath "${{github.workspace}}\iscc.log"'
working-directory: ${{github.workspace}}\contrib\windows\Inno.Setup

#- name: debug - get exe name
# https://stackoverflow.com/questions/4426442/unix-tail-equivalent-command-in-windows-powershell
# run: Get-Content "${{github.workspace}}\iscc.log" -Tail 1

- name: get installer exe name
id: innoout
# https://stackoverflow.com/questions/4426442/unix-tail-equivalent-command-in-windows-powershell
run: |
$p = Get-Content "${{github.workspace}}\iscc.log" -Tail 1
echo $p
$f = (Get-Item $p ).Name
echo $f
echo "::set-output name=name::$($f)"

- name: debug - echo
run: echo ${{ steps.innoout.outputs.name }}

- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: build_output
path: ${{github.workspace}}/out

- name: Collect dev build
run: |
mkdir ${{github.workspace}}/zfs_collect
copy ${{github.workspace}}/out/build/x64-Debug/module/os/windows/driver/* ${{github.workspace}}/zfs_collect
copy ${{github.workspace}}/out/build/x64-Debug/cmd/os/windows/kstat/kstat.exe ${{github.workspace}}/zfs_collect/kstat.exe
copy ${{github.workspace}}/out/build/x64-Debug/cmd/os/windows/zfsinstaller/zfsinstaller.exe ${{github.workspace}}/zfs_collect/zfsinstaller.exe
copy ${{github.workspace}}/out/build/x64-Debug/cmd/zdb/zdb.exe ${{github.workspace}}/zfs_collect/zdb.exe
copy ${{github.workspace}}/out/build/x64-Debug/cmd/zfs/zfs.exe ${{github.workspace}}/zfs_collect/zfs.exe
copy ${{github.workspace}}/out/build/x64-Debug/cmd/zpool/zpool.exe ${{github.workspace}}/zfs_collect/zpool.exe
copy ${{github.workspace}}/out/build/x64-Debug/cmd/zstream/zstreamdump.exe ${{github.workspace}}/zfs_collect/zstreamdump.exe

- name: Upload dev build
uses: actions/[email protected]
with:
name: dev_build
path: ${{github.workspace}}/zfs_collect/*

- name: Upload dev build with Inno Setup
uses: actions/[email protected]
with:
name: dev_build_inno
path: ${{github.workspace}}\contrib\windows\${{ steps.innoout.outputs.name }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ Makefile.in
/aclocal.m4
/autom4te.cache

#
# OpenZFSonWindows MS Visual Studio top level generated files specific to this top level dir
#
/.vs
/out

#
# Top level generic files
#
Expand Down
93 changes: 93 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
cmake_minimum_required(VERSION 3.13)
project(OpenZFS LANGUAGES C CXX ASM)
SET (CMAKE_ASM_COMPILER_ID Clang)
SET (CMAKE_ASM_COMPILER clang-cl.exe)

include(GNUInstallDirs)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/contrib/windows/cmake")
find_package(WDK REQUIRED)

option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF)

set(OPENSSL_USE_STATIC_LIBS TRUE)
set(OPENSSL_MSVC_STATIC_RT TRUE)
find_package(OpenSSL REQUIRED)
# message(STATUS "OpenSSL libs: " ${OPENSSL_LIBRARIES})
# Seriously, why does it pick MD versions and not MT like requested?
# string(REGEX REPLACE "64MD" "64MT" INTERNAL_OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES})
#message(STATUS "OpenSSL libs: " ${OPENSSL_CRYPTO_LIBRARY})
#cmake_path(GET ${OPENSSL_LIBRARIES} ROOT_PATH rootPath)
#get_filename_component(rootPath "${OPENSSL_CRYPTO_LIBRARY}" DIRECTORY)
#message(STATUS "OpenSSL root: " ${rootPath})


# Attempt to simulate scripts/make-gitrev.h and zfs_gitrev.h
include(GetGitRevisionDescription)
git_describe_working_tree(GIT_GITREV)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/include/zfs_gitrev.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/include/zfs_gitrev.h" @ONLY)
#

function(use_clang)
# It seems "-include file" is "/FI file" on Windows
add_compile_options(/FI ${CMAKE_SOURCE_DIR}/include/os/windows/zfs/zfs_config.h)
set(CMAKE_C_COMPILER clang-cl.exe PARENT_SCOPE)
set(CMAKE_CXX_COMPILER clang-cl.exe PARENT_SCOPE)
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
add_compile_options(-m32)
else()
add_compile_options(-m64)
endif()

add_compile_options(
# These are all MS headers
-Wno-nonportable-include-path
-Wno-unknown-pragmas
-Wno-ignored-pragma-intrinsic
-Wno-pragma-pack
-Wno-microsoft-enum-forward-reference
-Wno-visibility
-Wno-microsoft-anon-tag
-Wno-ignored-attributes
-Wno-unused-command-line-argument
-Wno-unused-local-typedef
-Wno-int-to-void-pointer-cast
# ZFS related
-Wno-misleading-indentation
-Wno-dangling-else
-Wno-missing-field-initializers
#-fms-extensions
-Wno-unused-function
)
endfunction()

if(CMAKE_SIZEOF_VOID_P EQUAL 4)
add_definitions(-D__x86_32__ -D__i386 -D__i386__ -D_LP32 -DWIN32)
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
add_definitions(-D__x86_64__ -D_LP64 -D__LP64__ -D__x86_64 -D_AMD64_ -D_WIN64 -DAMD64 -DWIN64)
else()
message(FATAL_ERROR "Unsupported architecture")
endif()

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DDBG -DZFS_DEBUG)
endif()

# Avoid dependency add_compile_definitions vcruntime140.dll
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")

# Let's try to emulate gitrev
#find_path(BASH_DIR NAMES bash.exe git-bash.exe PATHS "/c/Program Files (x86)/Git/")
#execute_process(COMMAND $BASH_DIR -c "scripts/make_gitrev.h include/zfs_gitrev.h" )


add_subdirectory(module)
#add_subdirectory(module/zfs)
#add_subdirectory(zfsinstaller)

add_subdirectory(lib)
add_subdirectory(cmd)

28 changes: 28 additions & 0 deletions CMakeSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"variables": []
},
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": []
}
]
}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# ⚠️WARNING: OpenZFS for Windows is in a pre-release state.⚠️
## ⛔ Do *not* use it for writing *or* reading critical data! ⛔
## ⛔ Doing so may corrupt your zpool and cause permanent data loss! ⛔

![img](https://openzfs.github.io/openzfs-docs/_static/img/logo/480px-Open-ZFS-Secondary-Logo-Colour-halfsize.png)

OpenZFS is an advanced file system and volume manager which was originally
Expand Down
12 changes: 12 additions & 0 deletions cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

include_directories(PRIVATE "${CMAKE_SOURCE_DIR}/lib/libspl/include/os/windows/" "${CMAKE_SOURCE_DIR}/lib/libspl/include" "${CMAKE_SOURCE_DIR}/include"
"${CMAKE_SOURCE_DIR}/lib/os/windows/libpthread" "${OPENSSL_INCLUDE_DIR}")

add_definitions(-D_CRT_SECURE_NO_WARNINGS)

add_subdirectory(zpool)
add_subdirectory(zfs)
add_subdirectory(zdb)
add_subdirectory(zstream)
add_subdirectory(os/windows/kstat)
add_subdirectory(os/windows/zfsinstaller)
13 changes: 13 additions & 0 deletions cmd/os/windows/kstat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

use_clang()

um_add_executable(kstat kstat.c resource.rc)

include_directories(PRIVATE "${CMAKE_SOURCE_DIR}/lib/os/windows")

target_link_libraries(kstat PRIVATE libkstat)
install(TARGETS kstat RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
install(FILES $<TARGET_PDB_FILE:kstat>
DESTINATION "${CMAKE_INSTALL_BINDIR}"
OPTIONAL
)
Loading