* [PATCH v2] btrfs: log message when rw remount is attempted with unclean tree-log
@ 2020-02-07 15:19 David Sterba
2020-02-07 16:02 ` Anand Jain
2020-02-10 10:00 ` Johannes Thumshirn
0 siblings, 2 replies; 3+ messages in thread
From: David Sterba @ 2020-02-07 15:19 UTC (permalink / raw)
To: linux-btrfs; +Cc: David Sterba, anand.jain, stable
A remount to a read-write filesystem is not safe when there's tree-log
to be replayed. Files that could be opened until now might be affected
by the changes in the tree-log.
A regular mount is needed to replay the log so the filesystem presents
the consistent view with the pending changes included.
CC: stable@vger.kernel.org # 4.4+
Signed-off-by: David Sterba <dsterba@suse.com>
---
* fix typo in fs_info parameter
fs/btrfs/super.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 2bfccc40d0fb..5c16b4bcde9b 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1841,6 +1841,8 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data)
}
if (btrfs_super_log_root(fs_info->super_copy) != 0) {
+ btrfs_warn(fs_info,
+ "mount required to replay tree-log, cannot remount read-write");
ret = -EINVAL;
goto restore;
}
--
2.25.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] btrfs: log message when rw remount is attempted with unclean tree-log
2020-02-07 15:19 [PATCH v2] btrfs: log message when rw remount is attempted with unclean tree-log David Sterba
@ 2020-02-07 16:02 ` Anand Jain
2020-02-10 10:00 ` Johannes Thumshirn
1 sibling, 0 replies; 3+ messages in thread
From: Anand Jain @ 2020-02-07 16:02 UTC (permalink / raw)
To: David Sterba, linux-btrfs; +Cc: stable
Reviewed-by: Anand Jain <anand.jain@oracle.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] btrfs: log message when rw remount is attempted with unclean tree-log
2020-02-07 15:19 [PATCH v2] btrfs: log message when rw remount is attempted with unclean tree-log David Sterba
2020-02-07 16:02 ` Anand Jain
@ 2020-02-10 10:00 ` Johannes Thumshirn
1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2020-02-10 10:00 UTC (permalink / raw)
To: David Sterba, linux-btrfs; +Cc: anand.jain, stable
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-10 10:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-07 15:19 [PATCH v2] btrfs: log message when rw remount is attempted with unclean tree-log David Sterba
2020-02-07 16:02 ` Anand Jain
2020-02-10 10:00 ` Johannes Thumshirn
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.