mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-05 16:14:38 +00:00
Kernel: Change Ext2FS to be backed by a file instead of a block device
In contrast to the previous patchset that was reverted, this time we use a "special" method to access a file with block size of 512 bytes (like a harddrive essentially).
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
|
||||
#include <AK/Bitmap.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <Kernel/FileSystem/DiskBackedFileSystem.h>
|
||||
#include <Kernel/FileSystem/FileBackedFileSystem.h>
|
||||
#include <Kernel/FileSystem/Inode.h>
|
||||
#include <Kernel/FileSystem/ext2_fs.h>
|
||||
#include <Kernel/KBuffer.h>
|
||||
@@ -88,11 +88,12 @@ private:
|
||||
ext2_inode m_raw_inode;
|
||||
};
|
||||
|
||||
class Ext2FS final : public DiskBackedFS {
|
||||
class Ext2FS final : public FileBackedFS {
|
||||
friend class Ext2FSInode;
|
||||
|
||||
public:
|
||||
static NonnullRefPtr<Ext2FS> create(BlockDevice&);
|
||||
static NonnullRefPtr<Ext2FS> create(FileDescription&);
|
||||
|
||||
virtual ~Ext2FS() override;
|
||||
virtual bool initialize() override;
|
||||
|
||||
@@ -109,7 +110,7 @@ private:
|
||||
typedef unsigned BlockIndex;
|
||||
typedef unsigned GroupIndex;
|
||||
typedef unsigned InodeIndex;
|
||||
explicit Ext2FS(BlockDevice&);
|
||||
explicit Ext2FS(FileDescription&);
|
||||
|
||||
const ext2_super_block& super_block() const { return m_super_block; }
|
||||
const ext2_group_desc& group_descriptor(GroupIndex) const;
|
||||
|
||||
Reference in New Issue
Block a user