From: Jie Liu <jeff.liu@xxxxxxxxxx>
Validate log space during log mount stage, the underlying function will
drop a warning message via syslog in critical level if the log space is
too small or too large.
Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
fs/xfs/xfs_log.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 304b3d0..2a631d9 100644
@@ -30,6 +30,7 @@
@@ -631,6 +632,17 @@ xfs_log_mount(
+ * Validate the given log space and drop a critical message via syslog
+ * if the log size is too small that would lead to some unexpected
+ * situations in transaction log space reservation stage.
+ * Note: we can't just reject the mount if the validation fails. This
+ * would mean that people would have to downgrade their kernel just to
+ * remedy the situation as there is no way to grow the log (short of
+ * black magic surgery with xfs_db).
* Initialize the AIL now we have a log.
error = xfs_trans_ail_init(mp);