All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] btrfs: remove save_error_info()
@ 2016-03-17  2:38 Anand Jain
  2016-03-17 10:48 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Anand Jain @ 2016-03-17  2:38 UTC (permalink / raw)
  To: linux-btrfs; +Cc: dsterba

Actually save_error_info() sets the FS state to error
and nothing else. Further the word save doesn't induce
caffeine when compared to the word set in what actually
it does.

So to make it better understandable move save_error_info()
code to its only consumer itself.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
v2: Title changed
       old: btrfs: rename save_error_info to set_fs_error
    Instead of rename to set_fs_error(), move the code to
     its parent.

 fs/btrfs/super.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 63a74303da9e..302f744b4d54 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -97,15 +97,6 @@ const char *btrfs_decode_error(int errno)
 	return errstr;
 }
 
-static void save_error_info(struct btrfs_fs_info *fs_info)
-{
-	/*
-	 * today we only save the error info into ram.  Long term we'll
-	 * also send it down to the disk
-	 */
-	set_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state);
-}
-
 /* btrfs handle error by forcing the filesystem readonly */
 static void btrfs_handle_error(struct btrfs_fs_info *fs_info)
 {
@@ -170,8 +161,13 @@ void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function,
 	}
 #endif
 
+	/*
+	 * today we only save the error info into ram.  Long term we'll
+	 * also send it down to the disk
+	 */
+	set_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state);
+
 	/* Don't go through full error handling during mount */
-	save_error_info(fs_info);
 	if (sb->s_flags & MS_BORN)
 		btrfs_handle_error(fs_info);
 }
-- 
2.7.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] btrfs: remove save_error_info()
  2016-03-17  2:38 [PATCH v2] btrfs: remove save_error_info() Anand Jain
@ 2016-03-17 10:48 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2016-03-17 10:48 UTC (permalink / raw)
  To: Anand Jain; +Cc: linux-btrfs, dsterba

On Thu, Mar 17, 2016 at 10:38:57AM +0800, Anand Jain wrote:
> Actually save_error_info() sets the FS state to error
> and nothing else. Further the word save doesn't induce
> caffeine when compared to the word set in what actually
> it does.
> 
> So to make it better understandable move save_error_info()
> code to its only consumer itself.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>

Reviewed-by: David Sterba <dsterba@suse.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-17 10:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-17  2:38 [PATCH v2] btrfs: remove save_error_info() Anand Jain
2016-03-17 10:48 ` David Sterba

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.