Commit graph

180 commits

Author SHA1 Message Date
Victor Perevertkin 34593d933b
[FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces 2021-06-11 15:33:08 +03:00
Timo Kreuzer dd08ae2c0f [NTOS:CC] Fix use of unintialized variable (caught by RTC1) 2021-05-24 22:00:11 +02:00
Jérôme Gardou 0187c1e113 [NTOS:MM] Fix PFN tracing 2021-03-30 16:26:43 +02:00
Jérôme Gardou 6e4f83da70 [NTOS:CC] Wake up lazy scan after inserting elements in the list. 2021-03-24 15:28:04 +01:00
Jérôme Gardou edd4a985d9 [NTOS:CC] Be verbose about why we defer writes 2021-03-24 15:27:36 +01:00
Jérôme Gardou 5c54fb9179 [NTOS:CC] Rewrite CcPostDeferredWrites
This allows to post small writes if there are any, and avoid holding the list lock for a long time.
2021-03-24 11:22:28 +01:00
Jérôme Gardou 2a962eaf8c [NTOS:CC] Keep a reference on the shared cache map of the file when we are in lazy write
This should fix "Leaking VACB" debug prints
2021-02-19 15:48:31 +01:00
Timo Kreuzer ca74467904
[NTOS:CC] Raise status, when CcMapData fails (#3348)
Also add a check in fastfat, that asserts, when CcMapData returns FALSE.
2021-02-09 09:29:48 +01:00
Jérôme Gardou cc9607e94e [NTOS:CC] Fix use of uninitialized variable 2021-02-03 13:35:17 +01:00
Jérôme Gardou b7eb0fddf3 Address PR review 2021-02-03 09:41:24 +01:00
Jérôme Gardou 2ba1926037 [NTOS:MM][NTOS:CC] Performance improvement again
Read files by 64kb chunks instead of page-sized chunks.
2021-02-03 09:41:23 +01:00
Jérôme Gardou 7fbf90d6fd [NTOS:CC] Fix a bug 2021-02-03 09:41:23 +01:00
Jérôme Gardou cc6bc02b91 [NTOS:CC] Make sure to purge the Mm side in CcPurgeCacheSection 2021-02-03 09:41:23 +01:00
Jérôme Gardou d0bf98663b [NTOS:CC] Be sure to flush the whole file in CcFlushCache 2021-02-03 09:41:23 +01:00
Jérôme Gardou 5949d5095d [NTOS:CC][NTOS:MM] Try respecting ValidDataLength 2021-02-03 09:41:23 +01:00
Jérôme Gardou bdb73edab7 [NTOS:CC] Flush the whole VACB
Let Mm know what it has to do.
2021-02-03 09:41:23 +01:00
Jérôme Gardou 804f5a41ed [NTOS:CC] Improve trace messages 2021-02-03 09:41:23 +01:00
Jérôme Gardou 20fe42c9e9 [NTOS:CC] Simplify CcFlushCache implementation 2021-02-03 09:41:23 +01:00
Jérôme Gardou 9b6240ee03 [NTOS:CC] Get rid of ROS_VACB:Valid 2021-02-03 09:41:23 +01:00
Jérôme Gardou 02167f2fb3 [NTOS:CC] Properly return the public BCBs 2021-02-03 09:41:23 +01:00
Jérôme Gardou 33cde28312 [NTOS:CC] Simplify CcRosDeleteFileCache 2021-02-03 09:41:23 +01:00
Jérôme Gardou a9193b5cc2 [NTOS:CC] Remove dead code 2021-02-03 09:41:23 +01:00
Jérôme Gardou 57ee31ee33 [NTOS:CC] Perform sanity checks before doing anything else 2021-02-03 09:41:23 +01:00
Jérôme Gardou 8287a098b9 [NTOS:CC] Fix potnetial use-after-free 2021-02-03 09:41:23 +01:00
Jérôme Gardou 358d06c47c [NTOS:CC] Always honor WriteThrough parameter in CcUnpinRepinnedBcb 2021-02-03 09:41:23 +01:00
Jérôme Gardou 1505abbc09 [NTOS:CC] Do not write behind concurrently the same file 2021-02-03 09:41:23 +01:00
Jérôme Gardou 347a4f146b [NTOS] Loop again and again until the whole cache is empty when sutting down 2021-02-03 09:41:23 +01:00
Jérôme Gardou 91f6fa0259 Disable CcScheduleReadAhead call 2021-02-03 09:41:22 +01:00
Jérôme Gardou 6d97d8d2e1 [NTOS:CC] Fix some tests, complain where the current implementation won't let us do the right thing 2021-02-03 09:41:22 +01:00
Jérôme Gardou 30f71c7fc0 [NTOS] Zero data unconditionally after segment end, unless section is created with SEC_RESERVE
Use a SEC_RESERVE section in Cc
2021-02-03 09:41:22 +01:00
Jérôme Gardou a52bc6d179 [NTOS:CC] Restore read-ahead behaviour in CcCopyRead 2021-02-03 09:41:22 +01:00
Jérôme Gardou 4441b1cd44 [NTOS:CC] Fix some tests for CcCopyRead and CcCopyWrite
Most importantly: raise the right status when provided an invalid buffer.
2021-02-03 09:41:22 +01:00
Jérôme Gardou cd23d6e19a [NTOS:CC] Honor FO_WRITE_THROUGH flag in CcCopyWrite and fix it in CcZeroData 2021-02-03 09:41:22 +01:00
Jérôme Gardou f8aa14ce4e [NTOS:CC] Acquire file for flush when flushing if necessary 2021-02-03 09:41:22 +01:00
Jérôme Gardou cbfc04157d [NTOS:CC] File size check fix 2021-02-03 09:41:22 +01:00
Jérôme Gardou 70c62aa2c9 [NTOS:CC] Fix Vacb size usage & check 2021-02-03 09:41:22 +01:00
Jérôme Gardou c74cbf0c0b [NTOS/CC] Be more precise when notifying Mm about dirty pages 2021-02-03 09:41:22 +01:00
Jérôme Gardou c295d6b229 [NTOS:CC] Fix releasing VACB when an exception is raised in CcZeroData & CcCopyWrite 2021-02-03 09:41:22 +01:00
Jérôme Gardou 7f47f03296 [NTOS:CC] Rewrite the non-cached path of CcZeroData 2021-02-03 09:41:22 +01:00
Jérôme Gardou 36e18aab35 [NTOS:CC] Remove unused functions 2021-02-03 09:41:22 +01:00
Jérôme Gardou d8cdb89fb0 [NTOSKRNL] Overhaul Cc and Mm relationship
Previously, when creating a file section, Mm requested Cc to cache the file, then Cc would request pages from Mm, then Mm would request them back to serve its file-mapping role
Now, Mm does it all by itself. If file cahcing is requested by the FS driver, then Cc creates a file mapping and uses that to serve its purpose.

This is a rewrite of Cc
2021-02-03 09:41:22 +01:00
Jérôme Gardou 8631e75837 [NTOS:CC] Acquire the master lock after freeing the VACB in CcRosFlushDirtyPages
Fixes a random ASSERT
2020-12-09 18:06:42 +01:00
Victor Perevertkin 5c7ce4475e
[REACTOS] Cleanup INIT and some PAGE section allocations
- Change INIT_FUNCTION and INIT_SECTION to CODE_SEG("INIT") and DATA_SEG("INIT") respectively
- Remove INIT_FUNCTION from function prototypes
- Remove alloc_text pragma calls as they are not needed anymore
2020-11-02 21:45:31 +03:00
Serge Gautherie 81be201d98
[NTOS:CC] CcMdl*Complete(): Return if FastIO succeeded (#3303)
CORE-17342
2020-10-31 15:18:02 +01:00
Jérôme Gardou 1c528cbf84 Revert "[NTOS/MM]
- Fix PFNs tracing
     - Add private pages to the process working set"

This reverts commit 4c5351bf55.
Not ready for prime time
2020-10-20 15:56:21 +02:00
Jérôme Gardou 4c5351bf55 [NTOS/MM]
- Fix PFNs tracing
 - Add private pages to the process working set
2020-10-20 15:20:59 +02:00
Serge Gautherie b20f815126
[NTOSKRNL] Place INIT_FUNCTION before the return type (#2823)
(but after 'static' or SAL 2 annotation.)
Follow-up to 71fefa32, which mentions that it's actually required by the compiler in some circumstances.
2020-05-23 15:56:10 +02:00
Serge Gautherie a0d2170729 [NTOS:CC] CcWriteVirtualAddress(): Do not round 'Size'
Revert 'Properly align VACB writes' part of 2a80ae2bb6.

CORE-15384 CORE-16018
2019-07-01 21:30:25 +02:00
Pierre Schweitzer 77b6899d89
[NTOSKRNL] Don't set VACB dirty on release if already dirty
CORE-15954
2019-04-20 11:23:35 +02:00
Pierre Schweitzer bd75947372
[NTOSKRNL] Drop the no longer needed Dirty field
CORE-15954
2019-04-18 08:14:41 +02:00