xfs
[Top] [All Lists]

Re: ***** SUSPECTED SPAM ***** [PATCH 42/50] xfs: Validate log space at

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: ***** SUSPECTED SPAM ***** [PATCH 42/50] xfs: Validate log space at mount time
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Mon, 12 Aug 2013 13:46:17 -0500
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1376304611-22994-43-git-send-email-david@xxxxxxxxxxxxx>
References: <1376304611-22994-1-git-send-email-david@xxxxxxxxxxxxx> <1376304611-22994-43-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0
On 08/12/13 05:50, Dave Chinner wrote:
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.

[ dchinner: For CRC enable filesystems, abort the mounting of the
filesystem as mkfs should never make a log too small for the given
filesystem configuration. ]

[ dchinner: make a note of the fact that the log size limits in
block counts are in units of filesystem blocks, not basic blocks. ]

Signed-off-by: Jie Liu<jeff.liu@xxxxxxxxxx>
Signed-off-by: Dave Chinner<dchinner@xxxxxxxxxx>
---
  fs/xfs/xfs_fs.h  |  4 +++-
  fs/xfs/xfs_log.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
  2 files changed, 49 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_fs.h b/fs/xfs/xfs_fs.h
index 74b24b2..53e33c2 100644
--- a/fs/xfs/xfs_fs.h
+++ b/fs/xfs/xfs_fs.h
@@ -240,7 +240,9 @@ typedef struct xfs_fsop_resblks {


  /*
- * Minimum and maximum sizes need for growth checks
+ * Minimum and maximum sizes need for growth checks.
+ *
+ * Block counts are in units of filesystem blocks, not basic blocks.
   */
  #define XFS_MIN_AG_BLOCKS     64
  #define XFS_MIN_LOG_BLOCKS    512ULL
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 704f095..b5703cc 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c

@@ -631,6 +632,50 @@ xfs_log_mount(

...

+       } else if (mp->m_sb.sb_logblocks>  XFS_MAX_LOG_BLOCKS) {

oops - missed that.

+               xfs_warn(mp,
+               "Log size %d blocks too large, maximum size is %lld blocks",
+                        mp->m_sb.sb_logblocks, XFS_MAX_LOG_BLOCKS);
+               error = EINVAL;

Also, the code to this point in the series has been compared (patches and individual files). The items that I mentioned in the previous review have been dealt this.

Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>

<Prev in Thread] Current Thread [Next in Thread>