[3/3] btrfs: tree-log: use symbolic name for first replay stage
diff mbox series

Message ID 5e7f207680bb5e16c0ef4f8499b060bff308a8f5.1564663765.git.dsterba@suse.com
State New
Headers show
Series
  • Define/enum conversions
Related show

Commit Message

David Sterba Aug. 1, 2019, 12:50 p.m. UTC
Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/tree-log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Anand Jain Aug. 2, 2019, 3:50 a.m. UTC | #1
For whole series.

Reviewed-by: Anand Jain <anand.jain@oracle.com>

One nit below.

On 8/1/19 8:50 PM, David Sterba wrote:
> Signed-off-by: David Sterba <dsterba@suse.com>
> ---
>   fs/btrfs/tree-log.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
> index 5513e76cc336..f48c8b9b513b 100644
> --- a/fs/btrfs/tree-log.c
> +++ b/fs/btrfs/tree-log.c
> @@ -6237,7 +6237,7 @@ int btrfs_recover_log_trees(struct btrfs_root *log_root_tree)
>   	struct btrfs_fs_info *fs_info = log_root_tree->fs_info;
>   	struct walk_control wc = {
>   		.process_func = process_one_buffer,
> -		.stage = 0,
> +		.stage = LOG_WALK_PIN_ONLY,

  Why this isn't enum?


>   	};
>   
>   	path = btrfs_alloc_path();
>
David Sterba Aug. 2, 2019, 1:59 p.m. UTC | #2
On Fri, Aug 02, 2019 at 11:50:26AM +0800, Anand Jain wrote:
> 
> For whole series.
> 
> Reviewed-by: Anand Jain <anand.jain@oracle.com>
> 
> One nit below.
> 
> On 8/1/19 8:50 PM, David Sterba wrote:
> > Signed-off-by: David Sterba <dsterba@suse.com>
> > ---
> >   fs/btrfs/tree-log.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
> > index 5513e76cc336..f48c8b9b513b 100644
> > --- a/fs/btrfs/tree-log.c
> > +++ b/fs/btrfs/tree-log.c
> > @@ -6237,7 +6237,7 @@ int btrfs_recover_log_trees(struct btrfs_root *log_root_tree)
> >   	struct btrfs_fs_info *fs_info = log_root_tree->fs_info;
> >   	struct walk_control wc = {
> >   		.process_func = process_one_buffer,
> > -		.stage = 0,
> > +		.stage = LOG_WALK_PIN_ONLY,
> 
>   Why this isn't enum?

It could be, though the values of stage are used as raw int comparing it
to some value (eg. replay_one_buffer and LOG_WALK_REPLAY_ALL), so that's
beyond the scope of the simple conversion.

Patch
diff mbox series

diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 5513e76cc336..f48c8b9b513b 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -6237,7 +6237,7 @@  int btrfs_recover_log_trees(struct btrfs_root *log_root_tree)
 	struct btrfs_fs_info *fs_info = log_root_tree->fs_info;
 	struct walk_control wc = {
 		.process_func = process_one_buffer,
-		.stage = 0,
+		.stage = LOG_WALK_PIN_ONLY,
 	};
 
 	path = btrfs_alloc_path();