mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
FS: Don't default to having a full InodeMetadata in every Inode.
This allows Ext2FS to keep its own ext2_inode around instead.
This commit is contained in:
parent
0cb074dc73
commit
d07b08a287
Notes:
sideshowbarker
2024-07-19 16:06:16 +09:00
Author: https://github.com/awesomekling
Commit: d07b08a287
8 changed files with 93 additions and 80 deletions
|
@ -111,56 +111,29 @@ void Inode::will_be_destroyed()
|
|||
flush_metadata();
|
||||
}
|
||||
|
||||
int Inode::set_atime(Unix::time_t ts)
|
||||
int Inode::set_atime(Unix::time_t)
|
||||
{
|
||||
if (fs().is_readonly())
|
||||
return -EROFS;
|
||||
if (m_metadata.atime == ts)
|
||||
return 0;
|
||||
m_metadata.atime = ts;
|
||||
m_metadata_dirty = true;
|
||||
return 0;
|
||||
return -ENOTIMPL;
|
||||
}
|
||||
|
||||
int Inode::set_ctime(Unix::time_t ts)
|
||||
int Inode::set_ctime(Unix::time_t)
|
||||
{
|
||||
if (fs().is_readonly())
|
||||
return -EROFS;
|
||||
if (m_metadata.ctime == ts)
|
||||
return 0;
|
||||
m_metadata.ctime = ts;
|
||||
m_metadata_dirty = true;
|
||||
return 0;
|
||||
return -ENOTIMPL;
|
||||
}
|
||||
|
||||
int Inode::set_mtime(Unix::time_t ts)
|
||||
int Inode::set_mtime(Unix::time_t)
|
||||
{
|
||||
if (fs().is_readonly())
|
||||
return -EROFS;
|
||||
if (m_metadata.mtime == ts)
|
||||
return 0;
|
||||
m_metadata.mtime = ts;
|
||||
m_metadata_dirty = true;
|
||||
return 0;
|
||||
return -ENOTIMPL;
|
||||
}
|
||||
|
||||
int Inode::increment_link_count()
|
||||
{
|
||||
if (fs().is_readonly())
|
||||
return -EROFS;
|
||||
++m_metadata.linkCount;
|
||||
m_metadata_dirty = true;
|
||||
return 0;
|
||||
return -ENOTIMPL;
|
||||
}
|
||||
|
||||
int Inode::decrement_link_count()
|
||||
{
|
||||
if (fs().is_readonly())
|
||||
return -EROFS;
|
||||
ASSERT(m_metadata.linkCount);
|
||||
--m_metadata.linkCount;
|
||||
m_metadata_dirty = true;
|
||||
return 0;
|
||||
return -ENOTIMPL;
|
||||
}
|
||||
|
||||
void FS::sync()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue