Kernel: Rename FileBackedFS => FileBackedFileSystem

This commit is contained in:
Andreas Kling 2021-07-11 00:33:27 +02:00
parent 07c4c89297
commit 502bbacea0
Notes: sideshowbarker 2024-07-18 09:22:10 +09:00
8 changed files with 15 additions and 15 deletions

View File

@ -64,8 +64,8 @@ public:
if (m_clean_list.is_empty()) { if (m_clean_list.is_empty()) {
// Not a single clean entry! Flush writes and try again. // Not a single clean entry! Flush writes and try again.
// NOTE: We want to make sure we only call FileBackedFS flush here, // NOTE: We want to make sure we only call FileBackedFileSystem flush here,
// not some FileBackedFS subclass flush! // not some FileBackedFileSystem subclass flush!
m_fs.flush_writes_impl(); m_fs.flush_writes_impl();
return get(block_index); return get(block_index);
} }
@ -105,7 +105,7 @@ private:
}; };
BlockBasedFS::BlockBasedFS(FileDescription& file_description) BlockBasedFS::BlockBasedFS(FileDescription& file_description)
: FileBackedFS(file_description) : FileBackedFileSystem(file_description)
{ {
VERIFY(file_description.file().is_seekable()); VERIFY(file_description.file().is_seekable());
} }

View File

@ -10,7 +10,7 @@
namespace Kernel { namespace Kernel {
class BlockBasedFS : public FileBackedFS { class BlockBasedFS : public FileBackedFileSystem {
public: public:
TYPEDEF_DISTINCT_ORDERED_ID(u64, BlockIndex); TYPEDEF_DISTINCT_ORDERED_ID(u64, BlockIndex);

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -8,12 +8,12 @@
namespace Kernel { namespace Kernel {
FileBackedFS::FileBackedFS(FileDescription& file_description) FileBackedFileSystem::FileBackedFileSystem(FileDescription& file_description)
: m_file_description(file_description) : m_file_description(file_description)
{ {
} }
FileBackedFS::~FileBackedFS() FileBackedFileSystem::~FileBackedFileSystem()
{ {
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -11,9 +11,9 @@
namespace Kernel { namespace Kernel {
class FileBackedFS : public FileSystem { class FileBackedFileSystem : public FileSystem {
public: public:
virtual ~FileBackedFS() override; virtual ~FileBackedFileSystem() override;
File& file() { return m_file_description->file(); } File& file() { return m_file_description->file(); }
FileDescription& file_description() { return *m_file_description; } FileDescription& file_description() { return *m_file_description; }
@ -21,7 +21,7 @@ public:
FileDescription& file_description() const { return *m_file_description; } FileDescription& file_description() const { return *m_file_description; }
protected: protected:
explicit FileBackedFS(FileDescription&); explicit FileBackedFileSystem(FileDescription&);
private: private:
virtual bool is_file_backed() const override { return true; } virtual bool is_file_backed() const override { return true; }

View File

@ -15,7 +15,7 @@ NonnullRefPtr<Plan9FS> Plan9FS::create(FileDescription& file_description)
} }
Plan9FS::Plan9FS(FileDescription& file_description) Plan9FS::Plan9FS(FileDescription& file_description)
: FileBackedFS(file_description) : FileBackedFileSystem(file_description)
, m_completion_blocker(*this) , m_completion_blocker(*this)
{ {
} }

View File

@ -15,7 +15,7 @@ namespace Kernel {
class Plan9FSInode; class Plan9FSInode;
class Plan9FS final : public FileBackedFS { class Plan9FS final : public FileBackedFileSystem {
friend class Plan9FSInode; friend class Plan9FSInode;
public: public:

View File

@ -128,7 +128,7 @@ bool VirtualFileSystem::mount_root(FileSystem& fs)
} }
m_root_inode = move(root_inode); m_root_inode = move(root_inode);
dmesgln("VirtualFileSystem: mounted root from {} ({})", fs.class_name(), static_cast<FileBackedFS&>(fs).file_description().absolute_path()); dmesgln("VirtualFileSystem: mounted root from {} ({})", fs.class_name(), static_cast<FileBackedFileSystem&>(fs).file_description().absolute_path());
m_mounts.append(move(mount)); m_mounts.append(move(mount));

View File

@ -353,7 +353,7 @@ private:
fs_object.add("mount_flags", mount.flags()); fs_object.add("mount_flags", mount.flags());
if (fs.is_file_backed()) if (fs.is_file_backed())
fs_object.add("source", static_cast<const FileBackedFS&>(fs).file_description().absolute_path()); fs_object.add("source", static_cast<const FileBackedFileSystem&>(fs).file_description().absolute_path());
else else
fs_object.add("source", "none"); fs_object.add("source", "none");
}); });