#
5d361b60 |
| 26-Sep-2024 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[FREELDR] fs.c: Fix handling of file handles, (de)referencing, and direct-device access (#7414)
- The original code was just incrementing the reference counts (RefCounts) of the device objects or
[FREELDR] fs.c: Fix handling of file handles, (de)referencing, and direct-device access (#7414)
- The original code was just incrementing the reference counts (RefCounts) of the device objects or the device/file handles, without decrementing them when closing the handles. This is now fixed.
Notice the following:
* When opening a file on a device (disk), the device's (and its handle's) RefCount is incremented, and the file handle's RefCount is incremented as well.
* When closing a file, the file handle's RefCount is decremented (and the file closed if the RefCount reaches zero), and the file's parent device handle is also closed, recursively. This has the effect of decrementing the parent device handle's RefCount, and the device's own RefCount is decremented as well.
IMPORTANT NOTE: The usefulness of handle-level RefCount is still under question, and might be (consistently) removed in the future.
- Fix opening a device (disk) in direct access, when this device is already opened. Indeed, we previously allowed direct access only if the device was opened as such for the very first time (its RefCount = 0 originally); no filesystem mounting was attempted as well. Then for any later open-operations on this device (while keeping an already-opened handle to it), filesystem access was assumed.
Thus, this problem would show up in two ways:
* Either the device is first opened for direct access, this succeeded and no filesystem was mounted. Then, for any other open-operations, the filesystem was NOT mounted, and opening files on it would fail. Direct accesses would succeed but would create an unnecessary second file handle.
* Or, the device is first opened for file-access: a filesystem was mounted and file opening would succeed. Any other file opening operation would succeed as well (if the file exists). But, a direct access open-operation would fail, because now any open-operations on the device would be assumed to be a file opening.
This is now correctly fixed. If direct-open is requested, just do it. If this is a file opening, we open the device, then try to mount a filesystem on it (if not already done), then we try to open the file.
If file opening fails, derereference the device.
- Pass the file path to the filesystem-specific Open() functions without truncating the leading path separator, if any. This has to be handled by the filesystem routines themselves.
show more ...
|
#
3b928898 |
| 02-Oct-2024 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[FREELDR] Simplify some control branches in loops (#7417)
Collapse some tests; remove redundant `continue;`
Pointed out by Serge Gautherie.
|
Revision tags: 0.4.16-dev, 0.4.15 |
|
#
e2fc578f |
| 30-Sep-2023 |
Laura Konopinska <alula@tuta.io> |
[FREELDR] Support drives with 4k sector size PR was reviewed at pull/5784
|
#
ab3bd829 |
| 17-Aug-2023 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[FREELDR] Convert source files to UTF-8 without BOM
|
#
328cc411 |
| 24-Sep-2022 |
Stanislav Motylkov <x86corez@gmail.com> |
[FREELDR] Allow to boot from FATX volume using vfatfs driver
Also copy vfatfs.sys to disk in 1st stage setup. CORE-16216 CORE-16329 CORE-16373
|
Revision tags: 0.4.14-release |
|
#
9393fc32 |
| 13-Sep-2021 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[FORMATTING] Remove trailing whitespace. Addendum to 34593d93.
Excluded: 3rd-party code (incl. wine) and most of the win32ss.
|
#
25e1235f |
| 09-Mar-2021 |
Serge Gautherie <32623169+SergeGautherie@users.noreply.github.com> |
[FREELDR] Remove a few useless code lines (#3503)
CORE-14516
|
Revision tags: 0.4.15-dev, 0.4.14-RC, 0.4.13-release |
|
#
f4fdc957 |
| 26-Jan-2020 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[FREELDR] Use RTL copy/zero-memory helper functions.
|
#
79092842 |
| 09-Oct-2019 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[FREELDR] Advance the file pointers every time a read operation is performed, in accordance with the ARC specification.
|
Revision tags: 0.4.14-dev, 0.4.13-RC, 0.4.12-release |
|
#
220bc820 |
| 18-Jul-2019 |
Victor Perevertkin <victor@perevertkin.ru> |
[FREELDR] Optimize and refactor the FAT driver. Do not read the whole cluster chain for file on opening. This removes restriction for opening files which span within a large amount of clusters (>65k)
[FREELDR] Optimize and refactor the FAT driver. Do not read the whole cluster chain for file on opening. This removes restriction for opening files which span within a large amount of clusters (>65k). That happened because FrLdrTempAlloc cannot allocate more than about 256 KiB of memory.
Adjacent clusters for file are now read using one disk driver call.
show more ...
|
#
195dc304 |
| 09-Jul-2019 |
Victor Perevertkin <victor@perevertkin.ru> |
[FREELDR] Add FAT caching to FAT filesystem driver. This significantly increases the reading speed
|
#
e18e7b10 |
| 18-Sep-2019 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[FREELDR] Implement 'SeekRelative' mode for the *Seek() methods for disks & filesystems.
|
#
dd46d40f |
| 17-Sep-2019 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[FREELDR] Addendum / actual fix for ef76709b
According to the Advanced RISC Computing Specification v1.2, for partitions, StartingAddress and EndingAddress are the start and end positions of the par
[FREELDR] Addendum / actual fix for ef76709b
According to the Advanced RISC Computing Specification v1.2, for partitions, StartingAddress and EndingAddress are the start and end positions of the partition in terms of byte offsets from the start of the disk. CurrentAddress is the current offset into (i.e. relative to) the partition.
Fix also the FAT filesystem in accordance.
- FIXME fix: Retrieve the size of the disk in number of sectors in DiskOpen(). - Add extra validity checks in the DiskSeek() functions. - Explicitly call PcDisk* functions in machpc.c and pcdisk.c, and XboxDisk* functions in machxbox.c (the code in these files is not called cross-platform).
CORE-16216 CORE-16248
show more ...
|
#
602fc29a |
| 30-Aug-2019 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[FREELDR] Formatting only.
|
#
8d94b2a6 |
| 10-Aug-2019 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[FREELDR] Diverse enhancements.
- Get rid of the FsCloseFile(), FsReadFile(), FsGetFileInformation(), FsGetFileSize() and FsSetFilePointer() wrappers and use the ARC functions directly instead.
[FREELDR] Diverse enhancements.
- Get rid of the FsCloseFile(), FsReadFile(), FsGetFileInformation(), FsGetFileSize() and FsSetFilePointer() wrappers and use the ARC functions directly instead. Make FsOpenFile() return an ARC file descriptor ID of the correct type. Get rid of unused FS_* defines.
- Use TRACEs in the ***Mount() filesystem functions for diagnostics purposes.
- Remove a leak in FatGetFatEntry(). Assign stuff via QuadPart where possible in FatMount(). Remove an unused member in FAT_FILE_INFO.
- Reduce code indentation in BtrFsMount() and remove a leak there.
- Disable reading the "BootPath" parameter in the linux loader since we don't use this parameter (yet??)
show more ...
|
#
b3821455 |
| 29-Jul-2019 |
Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
[FREELDR] Improve some *GetFileInformation() traces.
|
#
ef76709b |
| 29-Jul-2019 |
Stanislav Motylkov <x86corez@gmail.com> |
[FREELDR] Fix remaining hwdisk and FATX bugs (#1766)
- DiskGetFileInformation() should return relative addresses -- relative to the beginning of the "device" (partition, or disk) in question.
- Fat
[FREELDR] Fix remaining hwdisk and FATX bugs (#1766)
- DiskGetFileInformation() should return relative addresses -- relative to the beginning of the "device" (partition, or disk) in question.
- FatXSearchDirectoryBufferForFile() should assign file attributes.
- Minor code style improvements in FatOpenVolume().
CORE-16216 CORE-16248
Co-authored-by: Victor Perevertkin <victor@perevertkin.ru>
show more ...
|
Revision tags: 0.4.12-RC, 0.4.13-dev, 0.4.11-release, 0.4.11-RC, 0.4.12-dev, 0.4.10-release, 0.4.11-dev, 0.4.10-RC, 0.4.9-release, 0.4.10-dev, 0.4.9-RC, 0.4.8-release, 0.4.8-RC, 0.4.9-dev |
|
#
50afbd48 |
| 26-Jan-2018 |
Serge Gautherie <32623169+SergeGautherie@users.noreply.github.com> |
[FREELDR] FreeLdr debug.h does not care about NDEBUG. (#201)
- Remove all "#define NDEBUG".
|
Revision tags: 0.4.7-release, v0.4.7, 0.4.8-dev, 0.4.7-rc1 |
|
#
c2c66aff |
| 03-Oct-2017 |
Colin Finck <colin@reactos.org> |
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
|
Revision tags: backups/GSoC_2017/rapps@75905, ReactOS-0.4.6, backups/ros-branch-0_4_6@75728, 0.4.7-dev, ReactOS-0.4.5, backups/ros-branch-0_4_5@74569, ReactOS-0.4.4-CLT2017, backups/ReactOS-0.4.4-CLT2017@74182, ReactOS-0.4.4, backups/ros-branch-0_4_4@74002, ReactOS-0.4.4-FOSDEM2017, backups/ReactOS-0.4.4-FOSDEM2017@73667, ReactOS-0.4.3, backups/ros-branch-0_4_3@73437, backups/sndblst@72664, ReactOS-0.4.2, backups/ros-branch-0_4_2@73087, ReactOS-0.4.1, backups/ros-branch-0_4_1@71718 |
|
#
321bcc05 |
| 24-Apr-2016 |
Pierre Schweitzer <pierre@reactos.org> |
Create the AHCI branch for Aman's work
svn path=/branches/GSoC_2016/AHCI/; revision=71203
|