linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Jan Kara <jack@suse.cz>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 3/5] ext4: Speedup ext4 orphan inode handling
Date: Mon, 16 Aug 2021 11:23:40 +0200	[thread overview]
Message-ID: <20210816092340.GA24793@quack2.suse.cz> (raw)
In-Reply-To: <YRaPNaukNFEObAvJ@mit.edu>

On Fri 13-08-21 11:26:45, Theodore Ts'o wrote:
> On Fri, Aug 13, 2021 at 02:34:34PM +0200, Jan Kara wrote:
> > Actually, in the orphan list code, we leave the inode in the on-disk list
> > but remove it from the in-memory list - see how
> > list_del_init(&ei->i_orphan) is called very early in ext4_orphan_del(). The
> > reason for this unconditional deletion is that if we do not remove the
> > inode from the in-memory orphan list, the filesystem will complain and
> > corrupt memory on unmount.
> > 
> > Also note that leaving inode in the on-disk orphan list actually does no
> > serious harm. Because the orphan cleanup code just checks i_nlink and
> > i_disksize and truncates inode down to current i_disksize and removes inode
> > completely if i_nlink is 0. So even if an inode on the orphan list gets
> > reused, orphan cleanup will just do nothing for it. So the worst problem
> > that will likely happen is that on-disk orphan linked list becomes
> > corrupted but there's no data loss AFAICT.
> > 
> > Is it clearer now or am I missing something?
> 
> Yes, you're right, I misread the code.  Thanks for clarifying.
> 
> Can you send the final spin of this patch set?  I think we're all set
> for this patch series.
> 
> Reviewed-by: Theodore Ts'o <tytso@mit.edu>

Thanks. I've posted v6 with all the updates.

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2021-08-16  9:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 10:19 [PATCH 0/5 v5] ext4: Speedup orphan file handling Jan Kara
2021-08-11 10:19 ` [PATCH 1/5] ext4: Support for checksumming from journal triggers Jan Kara
2021-08-11 10:19 ` [PATCH 2/5] ext4: Move orphan inode handling into a separate file Jan Kara
2021-08-11 10:19 ` [PATCH 3/5] ext4: Speedup ext4 orphan inode handling Jan Kara
2021-08-12 15:01   ` Theodore Ts'o
2021-08-13 12:34     ` Jan Kara
2021-08-13 15:26       ` Theodore Ts'o
2021-08-16  9:23         ` Jan Kara [this message]
2021-08-11 10:19 ` [PATCH 4/5] ext4: Orphan file documentation Jan Kara
2021-08-12 15:02   ` Theodore Ts'o
2021-08-11 10:19 ` [PATCH 5/5] ext4: Improve scalability of ext4 orphan file handling Jan Kara
2021-08-11 18:19   ` kernel test robot
2021-08-12 12:59     ` Jan Kara
2021-08-12 16:48   ` Theodore Ts'o
  -- strict thread matches above, loose matches on Subject: below --
2021-08-16  9:57 [PATCH 0/5 v7] ext4: Speedup " Jan Kara
2021-08-16  9:57 ` [PATCH 3/5] ext4: Speedup ext4 orphan inode handling Jan Kara
2021-08-16  9:22 [PATCH 0/5 v6] ext4: Speedup orphan file handling Jan Kara
2021-08-16  9:23 ` [PATCH 3/5] ext4: Speedup ext4 orphan inode handling Jan Kara
2021-07-12 15:40 [PATCH 0/5 v4] ext4: Speedup orphan file handling Jan Kara
2021-07-12 15:40 ` [PATCH 3/5] ext4: Speedup ext4 orphan inode handling Jan Kara

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=20210816092340.GA24793@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).