Re: [PATCH 4/7] devmapper: wait for udev in dm_simplecmd_noflush()

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

 



On Mon, May 09, 2016 at 12:53:02PM +0200, Hannes Reinecke wrote:
> When calling dm_simplecmd_noflush() with udev_flags set we
> need to set the 'need_sync' flag otherwise the udev flags
> will never be set.

The other possibility here would be to temporarily disable udev sync
support, and then restore it afterwards. That way we could still pass
the flags, but we wouldn't need to wait on these table reloads.  Either
that or to get libdevmapper to give us a cookie flag that says, "while,
I do have sync support enabled, for this one command, I'd like to skip
it".  But neither of those options has any significant benefit over this
solution.

ACK.

-Ben

> 
> Signed-off-by: Hannes Reinecke <hare@xxxxxxxx>
> ---
>  libmultipath/configure.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/libmultipath/configure.c b/libmultipath/configure.c
> index b976da7..9c6904a 100644
> --- a/libmultipath/configure.c
> +++ b/libmultipath/configure.c
> @@ -628,7 +628,7 @@ domap (struct multipath * mpp, char * params)
>  		r = dm_addmap_reload(mpp, params);
>  		if (r)
>  			r = dm_simplecmd_noflush(DM_DEVICE_RESUME, mpp->alias,
> -						 0, MPATH_UDEV_RELOAD_FLAG);
> +						 1, MPATH_UDEV_RELOAD_FLAG);
>  		break;
>  
>  	case ACT_RESIZE:
> @@ -646,7 +646,9 @@ domap (struct multipath * mpp, char * params)
>  		if (r) {
>  			r = dm_addmap_reload(mpp, params);
>  			if (r)
> -				r = dm_simplecmd_noflush(DM_DEVICE_RESUME, mpp->alias, 0, MPATH_UDEV_RELOAD_FLAG);
> +				r = dm_simplecmd_noflush(DM_DEVICE_RESUME,
> +							 mpp->alias, 1,
> +							 MPATH_UDEV_RELOAD_FLAG);
>  		}
>  		break;
>  
> -- 
> 2.6.6

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux