mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Alexandru Moise <00moses.alexander00@gmail.com>
Cc: clm@fb.com, jbacik@fb.com, dsterba@suse.com,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] btrfs: cleanup btrfs_balance profile validity checks
Date: Tue, 22 Sep 2015 15:03:32 +0200	[thread overview]
Message-ID: <20150922130332.GA12815@twin.jikos.cz> (raw)
In-Reply-To: <20150830214549.GA1409@gmail.com>

On Sun, Aug 30, 2015 at 09:45:49PM +0000, Alexandru Moise wrote:
> Improve readability by generalizing the profile validity checks,
> I had to read through those if statements half a dozen times on my
> first try just to get an idea of what's happening there.
> 
> Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com>
> ---
>  fs/btrfs/volumes.c | 21 ++++++++++++---------
>  1 file changed, 12 insertions(+), 9 deletions(-)
> 
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index fbe7c10..d23bc26 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -3454,6 +3454,15 @@ static void __cancel_balance(struct btrfs_fs_info *fs_info)
>  	atomic_set(&fs_info->mutually_exclusive_operation_running, 0);
>  }
>  
> +/* Non-zero return value signifies invalidity */
> +static inline int balance_relocate_invalid(struct btrfs_balance_args *bctl_arg,

The function name is not very descriptive, I'd pick something like
validate_convert_profile, otherwise ok.

      reply	other threads:[~2015-09-22 13:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-30 21:45 Alexandru Moise
2015-09-22 13:03 ` David Sterba [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=20150922130332.GA12815@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=00moses.alexander00@gmail.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=jbacik@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®