[Top] [All Lists]

Re: [PATCH] xfs: move the comment on log device near the right log dev c

To: Wang Sheng-Hui <shhuiw@xxxxxxxxxxx>
Subject: Re: [PATCH] xfs: move the comment on log device near the right log dev check in xfs_mount_validate_sb
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 9 Feb 2015 08:20:51 +1100
Cc: xfs@xxxxxxxxxxx, sandeen@xxxxxxxxxxx, hch@xxxxxx, bfoster@xxxxxxxxxx, tinguely@xxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1423370704-3464-1-git-send-email-shhuiw@xxxxxxxxxxx>
References: <1423370704-3464-1-git-send-email-shhuiw@xxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Sun, Feb 08, 2015 at 12:45:04PM +0800, Wang Sheng-Hui wrote:
> The beginning is about magic and version number check.
> Move the comment on log device near the log dev check logic.
> Signed-off-by: Wang Sheng-Hui <shhuiw@xxxxxxxxxxx>

The comment is old and redundant. The error messages document the
reason for the checks better than the comment and the comments about
volume mounts date back to Irix and so aren't relevant any more. So
just remove the comment.

> ---
>  fs/xfs/libxfs/xfs_sb.c | 17 +++++++++--------
>  1 file changed, 9 insertions(+), 8 deletions(-)
> diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c
> index 752915f..b4bb852 100644
> --- a/fs/xfs/libxfs/xfs_sb.c
> +++ b/fs/xfs/libxfs/xfs_sb.c
> @@ -174,20 +174,13 @@ xfs_mount_validate_sb(
>       bool            check_inprogress,
>       bool            check_version)
>  {
> +     /* check magic number and version number */

No need to add a redundant comment - it is obvious what the code it
refers to is checking.


Dave Chinner

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