All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org, Lukas Czerner <lczerner@redhat.com>
Subject: Re: [PATCH 5/5] ext4: Improve scalability of ext4 orphan file handling
Date: Thu, 12 Aug 2021 12:48:01 -0400	[thread overview]
Message-ID: <YRVQwWt4m9UGHCHp@mit.edu> (raw)
In-Reply-To: <20210811101925.6973-5-jack@suse.cz>

On Wed, Aug 11, 2021 at 12:19:15PM +0200, Jan Kara wrote:
> diff --git a/fs/ext4/orphan.c b/fs/ext4/orphan.c
> index 019719c0ac12..18622ddeb41b 100644
> --- a/fs/ext4/orphan.c
> +++ b/fs/ext4/orphan.c
> @@ -28,28 +43,40 @@ static int ext4_orphan_file_add(handle_t *handle, struct inode *inode)
>  		 */
>  		return -ENOSPC;
>  	}
> -	oi->of_binfo[i].ob_free_entries--;
> -	spin_unlock(&oi->of_lock);
>  
> -	/*
> -	 * Get access to orphan block. We have dropped of_lock but since we
> -	 * have decremented number of free entries we are guaranteed free entry
> -	 * in our block.
> -	 */
>  	ret = ext4_journal_get_write_access(handle, inode->i_sb,
>  				oi->of_binfo[i].ob_bh, EXT4_JTR_ORPHAN_FILE);
>  	if (ret)
>  		return ret;

Shouldn't there be a call to:

		atomic_inc(&oi->of_binfo[i].ob_free_entries);

before we return, so the free_entry count stays consistent?

Otherwise, with the test-bot comments also addressed, you can add:

Reviewed-by: Theodore Ts'o <tytso@mit.edu>

Thanks,


       	  	     	 	    	  - Ted

  parent reply	other threads:[~2021-08-12 16:48 UTC|newest]

Thread overview: 19+ 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
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-11 18:19     ` kernel test robot
2021-08-12 12:59     ` Jan Kara
2021-08-12 12:59       ` Jan Kara
2021-08-12 16:48   ` Theodore Ts'o [this message]
  -- 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 5/5] ext4: Improve scalability of ext4 " Jan Kara
2021-08-16  9:22 [PATCH 0/5 v6] ext4: Speedup " Jan Kara
2021-08-16  9:23 ` [PATCH 5/5] ext4: Improve scalability of ext4 " Jan Kara
2021-07-12 15:40 [PATCH 0/5 v4] ext4: Speedup " Jan Kara
2021-07-12 15:40 ` [PATCH 5/5] ext4: Improve scalability of ext4 " 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=YRVQwWt4m9UGHCHp@mit.edu \
    --to=tytso@mit.edu \
    --cc=jack@suse.cz \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.