A free Windows-compatible Operating System - mirrored from GitHub
Go to file
George Bișoc cc63d8f4a2
[SDK][CMLIB] Implement log transaction writes & Resuscitation
=== DOCUMENTATION REMARKS ===

This implements (also enables some parts of code been decayed for years) the transacted writing of the registry. Transacted writing (or writing into registry in a transactional way) is an operation that ensures the successfulness can be achieved by monitoring two main points.
In CMLIB, such points are what we internally call them the primary and secondary sequences. A sequence is a numeric field that is incremented each time a writing operation (namely done with the FileWrite function and such) has successfully completed.

The primary sequence is incremented to suggest that the initial work of syncing the registry is in progress. During this phase, the base block header is written into the primary hive file and registry data is being written to said file in form of blocks. Afterwards the seconady sequence
is increment to report completion of the transactional writing of the registry. This operation occurs in HvpWriteHive function (invoked by HvSyncHive for syncing). If the transactional writing fails or if the lazy flushing of the registry fails, LOG files come into play.

Like HvpWriteHive, LOGs are updated by the HvpWriteLog which writes dirty data (base block header included) to the LOG themselves. These files serve for recovery and emergency purposes in case the primary machine hive has been damaged due to previous forced interruption of writing stuff into
the registry hive. With specific recovery algorithms, the data that's been gathered from a LOG will be applied to the primary hive, salvaging it. But if a LOG file is corrupt as well, then the system will perform resuscitation techniques by reconstructing the base block header to reasonable values,
reset the registry signature and whatnot.

This work is an inspiration from PR #3932 by mrmks04 (aka Max Korostil). I have continued his work by doing some more tweaks and whatnot. In addition to that, the whole transaction writing code is documented.

=== IMPORTANT NOTES ===

HvpWriteLog -- Currently this function lacks the ability to grow the log file size since we pretty much lack the necessary code that deals with hive shrinking and log shrinking/growing as well. This part is not super critical for us so this shall be left as a TODO for future.

HvLoadHive -- Currently there's a hack that prevents us from refactoring this function in a proper way. That is, we should not be reading the whole and prepare the hive storage using HvpInitializeMemoryHive which is strictly used for HINIT_MEMORY but rather we must read the hive file block by block
and deconstruct the read buffer from the file so that we can get the bins that we read from the file. With the hive bins we got the hive storage will be prepared based on such bins. If one of the bins is corrupt, self healing is applied in such scenario.

For this matter, if in any case the hive we'll be reading is corrupt we could potentially read corrupt data and lead the system into failure. So we have to perform header and data recovery as well before reading the whole hive.
2023-11-19 20:44:27 +01:00
.github [GITHUB] Update workflow actions to V3 to fix potential problems (#5569) 2023-08-14 13:30:30 +03:00
.theia
base [USETUP] Don't error out in case one tries to "delete" empty partition space. 2023-11-19 16:44:34 +01:00
boot [BOOTDATA] LiveCD: Enable Toggle key (Alt+Shift etc.) (#5985) 2023-11-16 22:23:11 +00:00
dll [PSDK][SHELLBTRFS] Get rid of FILE_INFO_BY_HANDLE_CLASS.MaximumFileInfoByHandlesClass (#6003) 2023-11-19 19:42:18 +01:00
drivers [PORTCLS] Remove meaningless YDEBUG (#5858) 2023-11-02 13:14:12 +01:00
hal [HALX86] Add missing \n to DPRINT() calls (#5993) 2023-11-19 19:44:46 +01:00
media [DOC] Update Romanian translation notes (#5908) 2023-11-19 16:40:18 +01:00
modules [VGAFONTEDIT] Update Romanian (ro-RO) translation (#5991) 2023-11-18 22:40:18 +01:00
ntoskrnl [NTOS:CM] Use the appropriate flags on functions that will call CmCheckRegistry & add missing CmCheckRegistry calls 2023-11-19 20:44:27 +01:00
sdk [SDK][CMLIB] Implement log transaction writes & Resuscitation 2023-11-19 20:44:27 +01:00
subsystems [NTOS:EX][CSRSRV][WIN32K] Make a few #define more explicit/strict (#5907) 2023-11-13 20:55:48 +01:00
win32ss [NTDDRAW][NTGDI][VGADDI] Add missing \n to DPRINT() calls (#5952) 2023-11-15 21:07:27 +01:00
.clang-format
.editorconfig Remove the 'end_of_line' value. Addendum to 32db19f6 - PR #2528 2020-04-11 17:56:23 +02:00
.gitattributes
.gitignore [GIT] Add .DS_Store files to .gitignore (#4762) 2022-10-08 13:18:18 +02:00
.gitmessage [FORMATTING] Remove trailing whitespace. Addendum to 34593d93. 2021-09-13 03:52:22 +02:00
.gitpod.Dockerfile [GITPOD] change extract directory to automatically extract to RosBE, and set tar to verbose mode 2021-12-28 02:14:47 +03:00
.gitpod.yml
apistatus.lst
CMakeLists.txt [CMAKE] Use baseaddress64.cmake for all 64 bit builds 2023-11-10 19:20:24 +02:00
CODE_OF_CONDUCT.md
CODEOWNERS [CODEOWNERS] Add Giannis and myself as reviewer for shell related stuff 2023-04-13 19:09:55 +02:00
configure.cmd [CMAKE] Improve configure script to work with newer CMake versions (#5742) 2023-10-17 13:17:35 +03:00
configure.sh [CONFIGURE] Make configure.sh print out an error when CMake fails 2021-08-02 01:40:43 +03:00
CONTRIBUTING.md [DOCS] Update contributing rules and PR management (#4881) 2023-07-24 00:58:56 +03:00
COPYING
COPYING.ARM [FORMATTING] Remove trailing whitespace. Addendum to 34593d93. 2021-09-13 03:52:22 +02:00
COPYING.LIB
COPYING3
COPYING3.LIB
CREDITS [CREDITS] Add myself to the credits document (#2747) 2020-05-07 12:39:44 +02:00
Doxyfile
INSTALL [REACTOS] Remove some ending spaces 2020-04-24 02:32:05 +03:00
overrides-gcc.cmake
overrides-msvc.cmake
PreLoad.cmake
PULL_REQUEST_MANAGEMENT.md [DOCS] Update contributing rules and PR management (#4881) 2023-07-24 00:58:56 +03:00
README.md [README] Add Discord server join link (#4352) 2022-02-16 19:04:44 +03:00
toolchain-clang.cmake [CMAKE] toolchain-clang.cmake: Use overrides-gcc.cmake 2021-12-28 01:56:33 +03:00
toolchain-gcc.cmake [CMAKE] Search the PATH for the compilers and cache the results 2022-05-25 16:34:16 +03:00
toolchain-msvc.cmake [CMAKE] Fixes for clang-cl build 2021-09-14 17:58:23 +03:00

ReactOS


ReactOS 0.4.14 Release Download ReactOS SourceForge Download License Donate Follow on Twitter

WebsiteOfficial chatWikiForumCommunity DiscordJIRA Bug TrackerReactOS Git mirrorTestman

What is ReactOS?

ReactOS™ is an Open Source effort to develop a quality operating system that is compatible with applications and drivers written for the Microsoft® Windows™ NT family of operating systems (NT4, 2000, XP, 2003, Vista, 7).

The ReactOS project, although currently focused on Windows Server 2003 compatibility, is always keeping an eye toward compatibility with Windows Vista and future Windows NT releases.

The code of ReactOS is licensed under GNU GPL 2.0.

Product quality warning

ReactOS is currently an Alpha quality operating system. This means that ReactOS is under heavy development and you have to be ready to encounter some problems. Different things may not work well and it can corrupt the data present on your hard disk. It is HIGHLY recommended to test ReactOS on a virtual machine or on a computer with no sensitive or critical data!

Building

Build rosbewin.badge rosbeunix.badge coverity.badge

To build the system it is strongly advised to use the ReactOS Build Environment (RosBE). Up-to-date versions for Windows and for Unix/GNU-Linux are available from our download page at: "Build Environment".

Alternatively one can use Microsoft Visual C++ (MSVC) version 2015+. Building with MSVC is covered here: "Visual Studio or Microsoft Visual C++".

See "Building ReactOS" article for more details.

Binaries

To build ReactOS you must run the configure script in the directory you want to have your build files. Choose configure.cmd or configure.sh depending on your system. Then run ninja <modulename> to build a module you want or just ninja to build all modules.

Bootable images

To build a bootable CD image run ninja bootcd from the build directory. This will create a CD image with a filename bootcd.iso.

You can always download fresh binary builds of bootable images from the "Daily builds" page.

Installing

By default, ReactOS currently can only be installed on a machine that has a FAT16 or FAT32 partition as the active (bootable) partition. The partition on which ReactOS is to be installed (which may or may not be the bootable partition) must also be formatted as FAT16 or FAT32. ReactOS Setup can format the partitions if needed.

Starting with 0.4.10, ReactOS can be installed using the BtrFS file system. But consider this as an experimental feature and thus regressions not triggered on FAT setup may be observed.

To install ReactOS from the bootable CD distribution, extract the archive contents. Then burn the CD image, boot from it, and follow the instructions.

See "Installing ReactOS" Wiki page or INSTALL for more details.

Testing

If you discover a bug in ReactOS search on JIRA first - it might be reported already. If not report the bug providing logs and as much information as possible.

See "File Bugs" for a guide.

NOTE: The bug tracker is not for discussions. Please use our official chat or our forum.

Contributing prwelcome.badge

We are always looking for developers! Check how to contribute if you are willing to participate.

Legal notice: If you have seen proprietary Microsoft Windows source code (including but not limited to the leaked Windows NT 3.5, NT 4, 2000 source code and the Windows Research Kernel), your contribution won't be accepted because of potential copyright violation.

Try out cloud-based ReactOS development using Gitpod and Docker:

Open in Gitpod

You can also support ReactOS by donating! We rely on our backers to maintain our servers and accelerate development by hiring full-time devs.

More information

ReactOS is a Free and Open Source operating system based on the Windows architecture, providing support for existing applications and drivers, and an alternative to the current dominant consumer operating system.

It is not another wrapper built on Linux, like WINE. It does not attempt or plan to compete with WINE; in fact, the user-mode part of ReactOS is almost entirely WINE-based and our two teams have cooperated closely in the past.

ReactOS is also not "yet another OS". It does not attempt to be a third player like any other alternative OS out there. People are not meant to uninstall Linux and use ReactOS instead; ReactOS is a replacement for Windows users who want a Windows replacement that behaves just like Windows.

More information is available at: reactos.org.

Also see the media/doc subdirectory for some sparse notes.

Who is responsible

Active devs are listed as members of GitHub organization. See also the CREDITS file for others.

Code mirrors

The main development is done on GitHub. We have an alternative mirror in case GitHub is down.

There is also an obsolete SVN archive repository that is kept for historical purposes.