Re: [PATCH 12/13] autofs-5.1.4 - make umount_ent() recognise forced umount

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

 



Another nit

On Tue, Jun 19, 2018 at 11:18:55AM +0800, Ian Kent wrote:
> When doing a forced shutdown umount_ent() tries a normal expire
> first resulting in a fair amount of unnecessary log noise.
> 
> Change umount_ent() to do a forced expire when a forced shutdown
> has been requested to avoid the log noise.
> 
> Signed-off-by: Ian Kent <raven@xxxxxxxxxx>
> ---
>  lib/mounts.c |   16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/mounts.c b/lib/mounts.c
> index a35503bf..a8b068a5 100644
> --- a/lib/mounts.c
> +++ b/lib/mounts.c
> @@ -2029,14 +2029,16 @@ int umount_ent(struct autofs_point *ap, const char *path)
>  {
>  	int rv;
>  
> -	rv = spawn_umount(ap->logopt, path, NULL);
> -	/* We are doing a forced shutcwdown down so unlink busy mounts */
> -	if (rv && (ap->state == ST_SHUTDOWN_FORCE || ap->state == ST_SHUTDOWN)) {
> -		if (ap->state == ST_SHUTDOWN_FORCE) {
> -			info(ap->logopt, "forcing umount of %s", path);
> -			rv = spawn_umount(ap->logopt, "-l", path, NULL);
> -		}
> +	if (ap->state != ST_SHUTDOWN_FORCE)
> +		rv = spawn_umount(ap->logopt, path, NULL);
> +	else {
> +		/* We are doing a forced shutcwdown down so unlink busy

  +		/* We are doing a forced shutdown down so unlink busy

might as well fix the speling WWAH

Regards
Vince

> +		 * mounts */
> +		info(ap->logopt, "forcing umount of %s", path);
> +		rv = spawn_umount(ap->logopt, "-l", path, NULL);
> +	}
>  
> +	if (rv && (ap->state == ST_SHUTDOWN_FORCE || ap->state == ST_SHUTDOWN)) {
>  		/*
>  		 * Verify that we actually unmounted the thing.  This is a
>  		 * belt and suspenders approach to not eating user data.
> 
> --
> To unsubscribe from this list: send the line "unsubscribe autofs" in
> 

-- 
--
To unsubscribe from this list: send the line "unsubscribe autofs" in



[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux