Re: [PATCH] xfs_repair: be more helpful if rtdev is not specified for rt subvol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 30, 2020 at 10:54:42AM -0500, Eric Sandeen wrote:
> Today, if one tries to repair a filesystem with a realtime subvol but
> forgets to specify the rtdev on the command line, the result sounds dire:
> 
> Phase 1 - find and verify superblock...
> xfs_repair: filesystem has a realtime subvolume
> xfs_repair: realtime device init failed
> xfs_repair: cannot repair this filesystem.  Sorry.
> 
> We can be a bit more helpful, following the log device example:
> 
> Phase 1 - find and verify superblock...
> This filesystem has a realtime subvolume.  Specify rt device with the -r option.
> 
> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
> ---
> 
> diff --git a/libxfs/init.c b/libxfs/init.c
> index cb8967bc..65cc3d4c 100644
> --- a/libxfs/init.c
> +++ b/libxfs/init.c
> @@ -429,9 +429,9 @@ rtmount_init(
>  	if (sbp->sb_rblocks == 0)
>  		return 0;
>  	if (mp->m_rtdev_targp->dev == 0 && !(flags & LIBXFS_MOUNT_DEBUGGER)) {
> -		fprintf(stderr, _("%s: filesystem has a realtime subvolume\n"),
> -			progname);
> -		return -1;
> +		fprintf(stderr, _("This filesystem has a realtime subvolume.  "
> +			   "Specify rt device with the -r option.\n"));

_("%s: realtime subvolume must be specified.\n")?

--D

> +		exit(1);
>  	}
>  	mp->m_rsumlevels = sbp->sb_rextslog + 1;
>  	mp->m_rsumsize =
> 



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux