diff mbox

btrfs: rename save_error_info to set_fs_error

Message ID 1458117788-840-1-git-send-email-anand.jain@oracle.com (mailing list archive)
State Superseded
Headers show

Commit Message

Anand Jain March 16, 2016, 8:43 a.m. UTC
Actually save_error_info() is setting the FS state to error.
So rename is more appropriate.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 fs/btrfs/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

David Sterba March 16, 2016, 10:05 a.m. UTC | #1
On Wed, Mar 16, 2016 at 04:43:05PM +0800, Anand Jain wrote:
> @@ -171,7 +171,7 @@ void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function,
>  #endif
>  
>  	/* Don't go through full error handling during mount */
> -	save_error_info(fs_info);
> +	set_fs_error(fs_info);

The helper is too trivial, can you please drop it and replace by the
it's code here?

>  	if (sb->s_flags & MS_BORN)
>  		btrfs_handle_error(fs_info);
>  }
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Anand Jain March 16, 2016, 1:42 p.m. UTC | #2
On 03/16/2016 06:05 PM, David Sterba wrote:
> On Wed, Mar 16, 2016 at 04:43:05PM +0800, Anand Jain wrote:
>> @@ -171,7 +171,7 @@ void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function,
>>   #endif
>>
>>   	/* Don't go through full error handling during mount */
>> -	save_error_info(fs_info);
>> +	set_fs_error(fs_info);
>
> The helper is too trivial, can you please drop it and replace by the
> it's code here

Dave,

In fact I was thinking that too, but comments below stop me doing that,
potentially this function might provision persistent FS state.

----
         /*
          * today we only save the error info into ram.  Long term we'll
          * also send it down to the disk
          */
-----

Thanks, Anand

>
>>   	if (sb->s_flags & MS_BORN)
>>   		btrfs_handle_error(fs_info);
>>   }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Sterba March 16, 2016, 3:49 p.m. UTC | #3
On Wed, Mar 16, 2016 at 09:42:11PM +0800, Anand Jain wrote:
> On 03/16/2016 06:05 PM, David Sterba wrote:
> > On Wed, Mar 16, 2016 at 04:43:05PM +0800, Anand Jain wrote:
> >> @@ -171,7 +171,7 @@ void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function,
> >>   #endif
> >>
> >>   	/* Don't go through full error handling during mount */
> >> -	save_error_info(fs_info);
> >> +	set_fs_error(fs_info);
> >
> > The helper is too trivial, can you please drop it and replace by the
> > it's code here
> In fact I was thinking that too, but comments below stop me doing that,
> potentially this function might provision persistent FS state.

Yeah I saw it too of course, but the whole feature "save error state on
disk"  would need more work, the helper does not seem too useful. The
comment can be moved as well to keep it as a reminder.

> 
> ----
>          /*
>           * today we only save the error info into ram.  Long term we'll
>           * also send it down to the disk
>           */
> -----
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Anand Jain March 17, 2016, 2:30 a.m. UTC | #4
On 03/16/2016 11:49 PM, David Sterba wrote:
> On Wed, Mar 16, 2016 at 09:42:11PM +0800, Anand Jain wrote:
>> On 03/16/2016 06:05 PM, David Sterba wrote:
>>> On Wed, Mar 16, 2016 at 04:43:05PM +0800, Anand Jain wrote:
>>>> @@ -171,7 +171,7 @@ void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function,
>>>>    #endif
>>>>
>>>>    	/* Don't go through full error handling during mount */
>>>> -	save_error_info(fs_info);
>>>> +	set_fs_error(fs_info);
>>>
>>> The helper is too trivial, can you please drop it and replace by the
>>> it's code here
>> In fact I was thinking that too, but comments below stop me doing that,
>> potentially this function might provision persistent FS state.
>
> Yeah I saw it too of course, but the whole feature "save error state on
> disk"  would need more work, the helper does not seem too useful. The
> comment can be moved as well to keep it as a reminder.

  Great. Thanks for confirming. V2 is out.

- Anand

>>
>> ----
>>           /*
>>            * today we only save the error info into ram.  Long term we'll
>>            * also send it down to the disk
>>            */
>> -----
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 63a74303da9e..a11823b317ac 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -97,7 +97,7 @@  const char *btrfs_decode_error(int errno)
 	return errstr;
 }
 
-static void save_error_info(struct btrfs_fs_info *fs_info)
+static void set_fs_error(struct btrfs_fs_info *fs_info)
 {
 	/*
 	 * today we only save the error info into ram.  Long term we'll
@@ -171,7 +171,7 @@  void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function,
 #endif
 
 	/* Don't go through full error handling during mount */
-	save_error_info(fs_info);
+	set_fs_error(fs_info);
 	if (sb->s_flags & MS_BORN)
 		btrfs_handle_error(fs_info);
 }