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

Clean up source to get Linux builds working #119

Merged
merged 15 commits into from
Aug 17, 2022

Conversation

andrewc12
Copy link

Motivation and Context

In my quest to improve the testing situation for windows I accidently stumbled across the idea of cleaning up the source to be able to get both windows and linux builds working.
This should let us use both the automated linux builds to test for large breaking changes and serve as the groundwork for either using the linux tests under wsl or to port the tests to natively to windows.

Description

  • moving windows specific code into windows specific source files
  • enclosing windows specific code in conditionals
  • creating defines for new functions in other os source files
  • changing some types to macros that support multiple os

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@andrewc12
Copy link
Author

@datacore-rm you might want to give this a look to see if it causes problems with perfmon counters.

@datacore-rm
Copy link

Changes looks fine.Thanks.

@andrewc12
Copy link
Author

Added a workflow to actually build the code on linux

@@ -1740,6 +1740,9 @@ zvol_fini_impl(void)
}

/* ZFS ZVOLDI */
// HACK FIXME
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't these be in zvol_os.c ?

@@ -117,7 +117,7 @@ ZFS_MODULE_ULONG zfs_wrlog_data_max = 0;
* zfs_dirty_data_max), push out a txg. This should be less than
* zfs_vdev_async_write_active_min_dirty_percent.
*/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are removing static?

#else
/* Grabbed from https://github.com/openzfs/zfs/blob/1d3ba0bf01020f5459b1c28db3979129088924c0/include/sys/vdev_file.h#L36 */
typedef struct vdev_file {
zfs_file_t* vf_file;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "*vf_file;"

@@ -417,9 +417,3 @@ check_file(const char *file, boolean_t force, boolean_t isspare)
{
return (check_file_generic(file, force, isspare));
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there were two? hah neat

andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Aug 10, 2022
and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Aug 10, 2022
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Aug 12, 2022
and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Aug 12, 2022
@andrewc12 andrewc12 marked this pull request as draft August 13, 2022 07:37
@andrewc12 andrewc12 marked this pull request as ready for review August 13, 2022 08:12
@lundman lundman merged commit fe81535 into openzfsonwindows:windows Aug 17, 2022
@andrewc12 andrewc12 deleted the andrew_linux_build-7 branch August 17, 2022 05:34
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Aug 27, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Aug 27, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Aug 27, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Oct 2, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Oct 2, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Oct 2, 2022
Unortunately, Windows defines 'long' as 32-bit even on x64
compiles. We create two new macros ZFS_MODULE_LONG
and ZFS_MODULE_ULONG. These two will be 'long' on Unix, and
let the toolchain handle the size of it.

On Windows the two macros are defined as 'int64_t'/'uint64_t'.

Clean up source to get Linux builds working (openzfs#119)

* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c

Fix cstyle complaints (openzfs#125)

* clean cstyle

* squash

* squash

* Update zfs_vnops_windows.c

* Update zfs_windows_zvol_wmi.c

* squash

* Additional cstyle fixes

* Update sysctl_os.c

Upstream: Additional MODULE ULONG

Bring per_txg_dirty_frees_percent back to 30

The current value causes significant artificial slowdown during mass
parallel file removal, which can be observed both on FreeBSD and Linux
when running real workloads.

Sample results from Linux doing make -j 96 clean after an allyesconfig
modules build:

before: 4.14s user 6.79s system 48% cpu 22.631 total
after:	4.17s user 6.44s system 153% cpu 6.927 total

FreeBSD results in the ticket.

Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by:	Mateusz Guzik <[email protected]>
Closes openzfs#13932
Closes openzfs#13938

Co-Authored-By: Jorgen Lundman <[email protected]>
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Oct 6, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Oct 6, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Oct 6, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
andrewc12 added a commit to andrewc12/openzfs that referenced this pull request Oct 9, 2022
* Move perfmon functions to windows

from zfs_ioctl.h to zfs_ioctl_os.c

* remove static for zfs_dirty_data_sync_percent

* uint64_t to ZFS_MODULE_ULONG

* add ifdef _WIN32 to zvol.c

* define posix_memalign_free for other os

* add vdev_file_t for other os

* remove duplicate check_file

* Create build_for_wsl.yaml

* move functions to zvol_os.c

and add them to the header zvol_impl.h
in answer to this discussion
openzfsonwindows#119 (comment)

* Fix code formatting

in reference to openzfsonwindows#119 (comment)

* revert the removal of static in dsl_pool.c

* remove zfs_dirty_data_sync_percent in dsl_pool.h

* make zvol_find_by_name not static

* changed workflow name

* cstyle zpool_vdev_os.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants