linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Artem Blagodarenko <artem.blagodarenko@gmail.com>
Cc: linux-ext4@vger.kernel.org, adilger.kernel@dilger.ca,
	alexey.lyashkov@gmail.com
Subject: Re: [PATCH] ext4: check if group has free space
Date: Fri, 15 Mar 2019 00:31:20 -0400	[thread overview]
Message-ID: <20190315043120.GI11334@mit.edu> (raw)
In-Reply-To: <20190307114914.86453-1-c17828@cray.com>

On Thu, Mar 07, 2019 at 02:49:14PM +0300, Artem Blagodarenko wrote:
> Regular allocator make four groups processing loops to
> find good group to allocate blocks. On 4th loop it accept any
> group, even if there is no free space at all.
> 
> This patch adds group free space check to skip full groups.
> 
> Sigend-off-by: Artem Blagodarenko <c17828@cray.com>

This patch doesn't change anything.  Note the check that we have at
the very beginning of ext4_mb_good_group():

	free = grp->bb_free;
	if (free == 0)
		return 0;

This is before we even go into the case statement, so your change:

>  	case 3:
> -		return 1;
> +		/* Skip group without any free space */
> +		return free ? 1 : 0;

is a no-op; we will always be returning 1, since if free == 0, we would
have bailed out at the top of the function.

Cheers,

					- Ted

      reply	other threads:[~2019-03-15  4:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07 11:49 [PATCH] ext4: check if group has free space Artem Blagodarenko
2019-03-15  4:31 ` Theodore Ts'o [this message]

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=20190315043120.GI11334@mit.edu \
    --to=tytso@mit.edu \
    --cc=adilger.kernel@dilger.ca \
    --cc=alexey.lyashkov@gmail.com \
    --cc=artem.blagodarenko@gmail.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 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).