From: Amir Goldstein <amir73il@gmail.com>
To: Masanari Iida <standby24x7@gmail.com>
Cc: Ext4 <linux-ext4@vger.kernel.org>
Subject: Fwd: Question about ext4 journal
Date: Fri, 23 Oct 2015 09:22:21 +0300 [thread overview]
Message-ID: <CAOQ4uxh79509HYo=4N27FamLanh0sV9PqeQWWTk3HK526iTdHA@mail.gmail.com> (raw)
In-Reply-To: <CAOQ4uxhFw5HCyVuYsKROKvMHJWBCEqZfBM8gtcV1bPQGFXT-hQ@mail.gmail.com>
On Fri, Oct 23, 2015 at 7:04 AM, Masanari Iida <standby24x7@gmail.com> wrote:
>
> Hello Developer,
Hi Masanari,
>
> I have a question about ext4's internal.
>
> OS: RHEL6.2
> Filesystem EXT4
> mount option = ordered
>
> My understanding on ext4 with ordered mode,
> When a file is created, data is written to FS block,
> At the same time, metadata is stored into journal,
> and then meta data on journal is written to the inode block.
> What is the next?
there is also the metadata of the directory entry created for the new file
that gets journaled as well
>
>
> My question is
> Does the kernel remove the meta data on journal after each successful
> transaction?
no. journal only logs transactions
>
>
> As I see the contents of journal entries in EXT4 using debugfs(8),
> the journal entries are growing when creating or deleting the files.
> I am curious to know what make the system to remove journal entries
> while mounted the fs.
it's called the orphan inode list.
every deleted inode gets inserted into the list, then deleted, then
removed from orphan inodes list.
on mount, fs starts by "playing" the journal, then clearing the orphan
inodes list
>
> Background of the question.
> I have encountered a case that when I delete and create some files,
> journal entry for deleting the file exist
> But journal entry for creating the file was not exist.
> FYI, the file itself exist when I see it by using debugfs.
>
> I created snapshot of the filesystem and run fsck on copy image.
> Then the file was _removed_ by fsck operation.
fsck starts by "playing" the journal. then I think it will ask about
clearing the orphan inode list. can't remember.
>
> This is why I want to know how journal on EXT4 were controlled.
>
> Thanks
> Masanari
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-10-23 6:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-23 4:04 Question about ext4 journal Masanari Iida
[not found] ` <CAOQ4uxhFw5HCyVuYsKROKvMHJWBCEqZfBM8gtcV1bPQGFXT-hQ@mail.gmail.com>
2015-10-23 6:22 ` Amir Goldstein [this message]
2015-10-24 3:10 ` Masanari Iida
2015-10-24 11:23 ` Theodore Ts'o
2015-10-23 12:50 ` Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOQ4uxh79509HYo=4N27FamLanh0sV9PqeQWWTk3HK526iTdHA@mail.gmail.com' \
--to=amir73il@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=standby24x7@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).