ladybird/Kernel
Liav A fea3cb5ff9 Kernel/FileSystem: Discard safely filesystems when unmounted last time
This commit reached that goal of "safely discarding" a filesystem by
doing the following:
1. Stop using the s_file_system_map HashMap as it was an unsafe measure
to access pointers of FileSystems. Instead, make sure to register all
FileSystems at the VFS layer, with an IntrusiveList, to avoid problems
related to OOM conditions.
2. Make sure to cleanly remove the DiskCache object from a BlockBased
filesystem, so the destructor of such object will not need to do that in
the destruction point.
3. For ext2 filesystems, don't cache the root inode at m_inode_cache
HashMap. The reason for this is that when unmounting an ext2 filesystem,
we lookup at the cache to see if there's a reference to a cached inode
and if that's the case, we fail with EBUSY. If we keep the m_root_inode
also being referenced at the m_inode_cache map, we have 2 references to
that object, which will lead to fail with EBUSY. Also, it's much simpler
to always ask for a root inode and get it immediately from m_root_inode,
instead of looking up the cache for that inode.
2022-10-22 16:57:52 -04:00
..
API Kernel+Base: Introduce MS_NOREGULAR mount flag 2022-10-22 19:18:15 +02:00
Arch Kernel/aarch64: Stub enough functions to build Random.cpp 2022-10-20 23:26:32 +02:00
Bus Kernel+USB: Move descriptor bookkeeping into seperate structure(s) 2022-10-22 15:54:55 -04:00
Devices Kernel: Introduce the IOWindow class 2022-09-23 17:22:15 +01:00
FileSystem Kernel/FileSystem: Discard safely filesystems when unmounted last time 2022-10-22 16:57:52 -04:00
Firmware Kernel: Move InterruptDisabler out of Arch directory 2022-10-17 20:11:31 +02:00
Graphics Kernel/aarch64: Get framebuffer data from BootFramebufferConsole 2022-10-01 14:09:01 +02:00
Heap Kernel/aarch64: Force kmalloc to return 16 byte aligned pointers 2022-10-20 23:26:32 +02:00
Interrupts Kernel: Move InterruptDisabler out of Arch directory 2022-10-17 20:11:31 +02:00
Library Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00
Locking Kernel: Move Spinlock functions back to arch independent Locking folder 2022-08-26 12:51:57 +02:00
Memory Kernel: Reintroduce ScopedAddressSpaceSwitcher to aarch64 build 2022-10-18 13:08:25 +02:00
Net Kernel: Move InterruptDisabler out of Arch directory 2022-10-17 20:11:31 +02:00
Prekernel Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Storage Kernel/FileSystem: Add a few missing includes 2022-10-22 16:57:52 -04:00
Syscalls Kernel: Introduce support for using FileSystem object in multiple mounts 2022-10-22 16:57:52 -04:00
Tasks Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00
Time Kernel: Implement TimeManagement for aarch64 2022-10-17 20:11:31 +02:00
TTY Kernel: Move InterruptDisabler out of Arch directory 2022-10-17 20:11:31 +02:00
AddressSanitizer.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
AddressSanitizer.h Everywhere: Use bgianf@serenityos.org for my copyright attribution 2021-04-22 21:15:54 +02:00
Assertions.h Kernel: Replace VERIFY_NOT_REACHED with TODO_AARCH64 2022-10-16 17:35:37 +02:00
AtomicEdgeAction.h Kernel: Add per platform Processor.h headers 2021-10-14 01:23:08 +01:00
BootInfo.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
CMakeLists.txt Kernel: Remove the DevTmpFS class 2022-10-22 19:18:15 +02:00
CommandLine.cpp Kernel/PCI: Don't use x86 initialization methods in non-x86 builds 2022-09-20 18:43:05 +01:00
CommandLine.h Kernel/PCI: Don't use x86 initialization methods in non-x86 builds 2022-09-20 18:43:05 +01:00
Coredump.cpp Kernel/x86: Move RTC and CMOS code to x86 arch-specific subdirectory 2022-09-20 18:43:05 +01:00
Coredump.h Kernel: Work using copies of specific region data during a coredump 2022-08-31 16:28:47 +02:00
Credentials.cpp Kernel: Make VirtualFileSystem functions take credentials as input 2022-08-21 16:02:24 +02:00
Credentials.h Kernel: Make VirtualFileSystem functions take credentials as input 2022-08-21 16:02:24 +02:00
Debug.h.in Kernel: Add support for the FAT32 filesystem 2022-10-14 18:36:40 -06:00
DoubleBuffer.cpp Kernel: Move InterruptDisabler out of Arch directory 2022-10-17 20:11:31 +02:00
DoubleBuffer.h Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
embedmap.sh Kernel: Make new kernel build process work on macOS 2021-07-15 11:04:30 +02:00
Forward.h Kernel: Remove the DevTmpFS class 2022-10-22 19:18:15 +02:00
FutexQueue.cpp Kernel: Propagate OOM conditions out of sys$futex 2022-07-21 16:39:22 +02:00
FutexQueue.h AK+Kernel: Add AK::AtomicRefCounted and use everywhere in the kernel 2022-08-20 17:15:52 +02:00
generate-version-file.sh Kernel: Bake version information into the Kernel 2022-10-14 13:45:33 +02:00
GlobalProcessExposed.cpp Kernel/FileSystem: Add a few missing includes 2022-10-22 16:57:52 -04:00
InterruptDisabler.h Kernel: Move InterruptDisabler out of Arch directory 2022-10-17 20:11:31 +02:00
IOWindow.cpp Kernel: Introduce the IOWindow class 2022-09-23 17:22:15 +01:00
IOWindow.h Kernel: Introduce the IOWindow class 2022-09-23 17:22:15 +01:00
KBuffer.h Kernel: Annotate all KBuffer and DoubleBuffer with a custom name 2022-07-12 00:55:31 +01:00
KBufferBuilder.cpp Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
KBufferBuilder.h Kernel: Expose .length() of KBufferBuilder 2022-05-06 02:12:51 +04:30
KLexicalPath.cpp Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
KLexicalPath.h Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
kprintf.cpp Kernel: Don't blindly compile Bochs debug output code in ConsoleDevice 2022-09-20 18:43:05 +01:00
kstdio.h Kernel: Don't blindly compile Bochs debug output code in ConsoleDevice 2022-09-20 18:43:05 +01:00
KString.cpp Kernel: Add an error propagating KString::format(..) API :^) 2021-11-30 11:16:35 +01:00
KString.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
KSyms.cpp Kernel: Add ability to dump backtrace from provided frame pointer 2022-10-01 14:09:01 +02:00
KSyms.h Kernel: Add ability to dump backtrace from provided frame pointer 2022-10-01 14:09:01 +02:00
MiniStdLib.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
mkmap.sh Kernel: Use the toolchain's nm in mkmap.sh 2021-12-30 18:10:51 +01:00
Multiboot.h Kernel: Add basic aarch64 support to MemoryManager 2022-09-12 00:56:44 +01:00
Panic.cpp Kernel: Abstracts x86 reboot and shutdown specific methods 2022-09-20 18:43:05 +01:00
Panic.h Kernel: Implement __panic() for the aarch64 Kernel 2022-05-03 21:53:36 +02:00
PerformanceEventBuffer.cpp Kernel: Don't wrap AddressSpace's RegionTree in SpinlockProtected 2022-08-24 14:57:51 +02:00
PerformanceEventBuffer.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
PerformanceManager.h Everywhere: Fix a variety of typos 2022-09-14 04:46:49 +00:00
PhysicalAddress.h Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
Process.cpp Kernel: Add more AARCH64 stubs 2022-10-18 13:08:25 +02:00
Process.h Kernel: Stop verifying interrupts are disabled in Process::for_each 2022-08-27 21:54:13 +03:00
ProcessExposed.cpp Kernel: Update atime/ctime/mtime timestamps atomically 2022-08-22 17:56:03 +02:00
ProcessExposed.h Kernel: Update atime/ctime/mtime timestamps atomically 2022-08-22 17:56:03 +02:00
ProcessGroup.cpp Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00
ProcessGroup.h Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00
ProcessProcFSTraits.cpp Kernel: Use Process::credentials() and remove user ID/group ID helpers 2022-08-22 12:46:32 +02:00
ProcessSpecificExposed.cpp Kernel: Don't assume paths to children PID directories in ProcFS code 2022-10-19 16:44:16 -04:00
Random.cpp Kernel/aarch64: Stub enough functions to build Random.cpp 2022-10-20 23:26:32 +02:00
Random.h Kernel: Require lock rank for Spinlock construction 2022-08-19 20:26:47 -07:00
SanCov.cpp Kernel: Add some implied auto qualifiers 2021-12-30 14:32:17 +01:00
Scheduler.cpp Kernel: Call Processor::are_interrupts_enabled in Scheduler::idle_loop 2022-10-18 13:08:25 +02:00
Scheduler.h Kernel: Move Scheduler current time method to the TimeManagement code 2022-10-14 14:13:51 +02:00
Sections.h Kernel: Make the page table quickmaps per-CPU 2022-08-22 17:56:03 +02:00
StdLib.cpp AK+Everywhere: Add AK_COMPILER_{GCC,CLANG} and use them most places 2022-10-04 23:35:07 +01:00
StdLib.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Syscall.cpp Kernel: Don't directly include <Kernel/Arch/x86/TrapFrame.h> 2022-10-16 17:35:37 +02:00
Thread.cpp Kernel: Move InterruptDisabler out of Arch directory 2022-10-17 20:11:31 +02:00
Thread.h Kernel: Show more (b)locking info when dumping the process list 2022-08-26 13:07:07 +02:00
ThreadBlockers.cpp Kernel: Use InterruptsState in Spinlock code 2022-08-26 12:51:57 +02:00
ThreadTracer.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ThreadTracer.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
TimerQueue.cpp Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00
TimerQueue.h Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00
UBSanitizer.cpp Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
UnixTypes.h Kernel: Add support for SA_SIGINFO 2022-03-04 20:07:05 +01:00
UserOrKernelBuffer.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
UserOrKernelBuffer.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
VirtualAddress.h Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
WaitQueue.cpp Kernel: Don't register thread as custom data for WaitQueueBlocker 2021-08-24 01:57:11 +02:00
WaitQueue.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
WorkQueue.cpp Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00
WorkQueue.h Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00