[PATCH 1/2] driver-core: allow asynchronous device shutdown

Greg KH gregkh at linuxfoundation.org
Thu May 8 12:03:07 PDT 2014


On Thu, May 08, 2014 at 12:07:33PM -0600, Keith Busch wrote:
> A patch to allow .shutdown to execute asynchronously. Some devices may
> take a long time to complete a shutdown, so this patch lets a driver
> safely shutdown multiple devices asynchronously.
> 
> This uses an exclusive asynchronous domain so other unrelated async
> tasks can't cause shutdown to hold up indefinitely.
> 
> Signed-off-by: Keith Busch <keith.busch at intel.com>
> ---
>  drivers/base/core.c    |    4 ++++
>  include/linux/device.h |    1 +
>  2 files changed, 5 insertions(+)
> 
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 20da3ad..71b83bb 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -10,6 +10,7 @@
>   *
>   */
>  
> +#include <linux/async.h>
>  #include <linux/device.h>
>  #include <linux/err.h>
>  #include <linux/init.h>
> @@ -1926,6 +1927,8 @@ out:
>  }
>  EXPORT_SYMBOL_GPL(device_move);
>  
> +ASYNC_DOMAIN_EXCLUSIVE(shutdown_domain);
> +EXPORT_SYMBOL(shutdown_domain);

EXPORT_SYMBOL_GPL() please, for driver core functions.

thanks,

greg k-h



More information about the Linux-nvme mailing list