linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Remove scsi_wait_scan module
@ 2012-05-27  9:13 James Bottomley
  2012-05-27 14:48 ` Jeff Mahoney
       [not found] ` <1338110026.2957.5.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
  0 siblings, 2 replies; 16+ messages in thread
From: James Bottomley @ 2012-05-27  9:13 UTC (permalink / raw)
  To: linux-scsi; +Cc: Dave Jones, Jeff Mahoney, Ben Hutchings

scsi_wait_scan was introduced with asynchronous host scanning as a hack
for distributions that weren't using proper udev based wait for root to
appear in their initramfs scripts.  In 2.6.30 Commit 

c751085943362143f84346d274e0011419c84202
Author: Rafael J. Wysocki <rjw@sisk.pl>
Date:   Sun Apr 12 20:06:56 2009 +0200

    PM/Hibernate: Wait for SCSI devices scan to complete during resume

Actually broke scsi_wait_scan because it renders
scsi_complete_async_scans() a nop for modular SCSI if you include
scsi_scans.h (which this module does).

The lack of bug reports is sufficient proof that this module is no
longer used.

James

---

diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index bea04e5..ac6ea28 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -263,23 +263,6 @@ config SCSI_SCAN_ASYNC
 	  You can override this choice by specifying "scsi_mod.scan=sync"
 	  or async on the kernel's command line.
 
-config SCSI_WAIT_SCAN
-	tristate  # No prompt here, this is an invisible symbol.
-	default m
-	depends on SCSI
-	depends on MODULES
-# scsi_wait_scan is a loadable module which waits until all the async scans are
-# complete.  The idea is to use it in initrd/ initramfs scripts.  You modprobe
-# it after all the modprobes of the root SCSI drivers and it will wait until
-# they have all finished scanning their buses before allowing the boot to
-# proceed.  (This method is not applicable if targets boot independently in
-# parallel with the initiator, or with transports with non-deterministic target
-# discovery schemes, or if a transport driver does not support scsi_wait_scan.)
-#
-# This symbol is not exposed as a prompt because little is to be gained by
-# disabling it, whereas people who accidentally switch it off may wonder why
-# their mkinitrd gets into trouble.
-
 menu "SCSI Transports"
 	depends on SCSI
 
diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile
index 8deedea..f188509 100644
--- a/drivers/scsi/Makefile
+++ b/drivers/scsi/Makefile
@@ -161,8 +161,6 @@ obj-$(CONFIG_SCSI_OSD_INITIATOR) += osd/
 # This goes last, so that "real" scsi devices probe earlier
 obj-$(CONFIG_SCSI_DEBUG)	+= scsi_debug.o
 
-obj-$(CONFIG_SCSI_WAIT_SCAN)	+= scsi_wait_scan.o
-
 scsi_mod-y			+= scsi.o hosts.o scsi_ioctl.o constants.o \
 				   scsicam.o scsi_error.o scsi_lib.o
 scsi_mod-$(CONFIG_SCSI_DMA)	+= scsi_lib_dma.o
diff --git a/drivers/scsi/scsi_wait_scan.c b/drivers/scsi/scsi_wait_scan.c
deleted file mode 100644
index 74708fc..0000000
--- a/drivers/scsi/scsi_wait_scan.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * scsi_wait_scan.c
- *
- * Copyright (C) 2006 James Bottomley <James.Bottomley@SteelEye.com>
- *
- * This is a simple module to wait until all the async scans are
- * complete.  The idea is to use it in initrd/initramfs scripts.  You
- * modprobe it after all the modprobes of the root SCSI drivers and it
- * will wait until they have all finished scanning their busses before
- * allowing the boot to proceed
- */
-
-#include <linux/module.h>
-#include <linux/device.h>
-#include <scsi/scsi_scan.h>
-
-static int __init wait_scan_init(void)
-{
-	/*
-	 * First we need to wait for device probing to finish;
-	 * the drivers we just loaded might just still be probing
-	 * and might not yet have reached the scsi async scanning
-	 */
-	wait_for_device_probe();
-	/*
-	 * and then we wait for the actual asynchronous scsi scan
-	 * to finish.
-	 */
-	scsi_complete_async_scans();
-	return 0;
-}
-
-static void __exit wait_scan_exit(void)
-{
-}
-
-MODULE_DESCRIPTION("SCSI wait for scans");
-MODULE_AUTHOR("James Bottomley");
-MODULE_LICENSE("GPL");
-
-late_initcall(wait_scan_init);
-module_exit(wait_scan_exit);



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: Remove scsi_wait_scan module
  2012-05-27  9:13 Remove scsi_wait_scan module James Bottomley
@ 2012-05-27 14:48 ` Jeff Mahoney
       [not found] ` <1338110026.2957.5.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
  1 sibling, 0 replies; 16+ messages in thread
From: Jeff Mahoney @ 2012-05-27 14:48 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi, Dave Jones, Ben Hutchings

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/27/2012 05:13 AM, James Bottomley wrote:
> scsi_wait_scan was introduced with asynchronous host scanning as a
> hack for distributions that weren't using proper udev based wait
> for root to appear in their initramfs scripts.  In 2.6.30 Commit

AFIACT we don't use it.

- -Jeff

> c751085943362143f84346d274e0011419c84202 Author: Rafael J. Wysocki
> <rjw@sisk.pl> Date:   Sun Apr 12 20:06:56 2009 +0200
> 
> PM/Hibernate: Wait for SCSI devices scan to complete during resume
> 
> Actually broke scsi_wait_scan because it renders 
> scsi_complete_async_scans() a nop for modular SCSI if you include 
> scsi_scans.h (which this module does).
> 
> The lack of bug reports is sufficient proof that this module is no 
> longer used.
> 
> James
> 
> ---
> 
> diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index
> bea04e5..ac6ea28 100644 --- a/drivers/scsi/Kconfig +++
> b/drivers/scsi/Kconfig @@ -263,23 +263,6 @@ config SCSI_SCAN_ASYNC 
> You can override this choice by specifying "scsi_mod.scan=sync" or
> async on the kernel's command line.
> 
> -config SCSI_WAIT_SCAN -	tristate  # No prompt here, this is an
> invisible symbol. -	default m -	depends on SCSI -	depends on
> MODULES -# scsi_wait_scan is a loadable module which waits until
> all the async scans are -# complete.  The idea is to use it in
> initrd/ initramfs scripts.  You modprobe -# it after all the
> modprobes of the root SCSI drivers and it will wait until -# they
> have all finished scanning their buses before allowing the boot to 
> -# proceed.  (This method is not applicable if targets boot
> independently in -# parallel with the initiator, or with transports
> with non-deterministic target -# discovery schemes, or if a
> transport driver does not support scsi_wait_scan.) -# -# This
> symbol is not exposed as a prompt because little is to be gained
> by -# disabling it, whereas people who accidentally switch it off
> may wonder why -# their mkinitrd gets into trouble. - menu "SCSI
> Transports" depends on SCSI
> 
> diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile index
> 8deedea..f188509 100644 --- a/drivers/scsi/Makefile +++
> b/drivers/scsi/Makefile @@ -161,8 +161,6 @@
> obj-$(CONFIG_SCSI_OSD_INITIATOR) += osd/ # This goes last, so that
> "real" scsi devices probe earlier obj-$(CONFIG_SCSI_DEBUG)	+=
> scsi_debug.o
> 
> -obj-$(CONFIG_SCSI_WAIT_SCAN)	+= scsi_wait_scan.o - scsi_mod-y			+=
> scsi.o hosts.o scsi_ioctl.o constants.o \ scsicam.o scsi_error.o
> scsi_lib.o scsi_mod-$(CONFIG_SCSI_DMA)	+= scsi_lib_dma.o diff --git
> a/drivers/scsi/scsi_wait_scan.c b/drivers/scsi/scsi_wait_scan.c 
> deleted file mode 100644 index 74708fc..0000000 ---
> a/drivers/scsi/scsi_wait_scan.c +++ /dev/null @@ -1,42 +0,0 @@ -/* 
> - * scsi_wait_scan.c - * - * Copyright (C) 2006 James Bottomley
> <James.Bottomley@SteelEye.com> - * - * This is a simple module to
> wait until all the async scans are - * complete.  The idea is to
> use it in initrd/initramfs scripts.  You - * modprobe it after all
> the modprobes of the root SCSI drivers and it - * will wait until
> they have all finished scanning their busses before - * allowing
> the boot to proceed - */ - -#include <linux/module.h> -#include
> <linux/device.h> -#include <scsi/scsi_scan.h> - -static int __init
> wait_scan_init(void) -{ -	/* -	 * First we need to wait for device
> probing to finish; -	 * the drivers we just loaded might just still
> be probing -	 * and might not yet have reached the scsi async
> scanning -	 */ -	wait_for_device_probe(); -	/* -	 * and then we
> wait for the actual asynchronous scsi scan -	 * to finish. -	 */ -
> scsi_complete_async_scans(); -	return 0; -} - -static void __exit
> wait_scan_exit(void) -{ -} - -MODULE_DESCRIPTION("SCSI wait for
> scans"); -MODULE_AUTHOR("James Bottomley"); 
> -MODULE_LICENSE("GPL"); - -late_initcall(wait_scan_init); 
> -module_exit(wait_scan_exit);
> 
> 


- -- 
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPwj6+AAoJEB57S2MheeWyueEP/RgGFBw4hOnW0gRt6360Ary3
qFIdtOzAwqhU01xGiSENAJuDpc75TpAfmzsR1gASQpel8iIFq8/GjHR+tnhZZfC8
D7B5mEKew3KFHBwssmUjdpkXHUJ8UjSdapSKADAp6isTzd8EzJ+U7UbRRhObgpis
wsu/IbYDS1zxTAoO9FnAqN7wkmWHIK0IzOBdu41SsV7OfFUx2DY1cpVC3XvkuYPq
5gP3Fd0Y53omGXVvB/9ZOTQP9D7fBu2vTxhC/eNhIEBW7Ce3eQXdCQeVOHoHAwGZ
ftvDqZYVLvENPjs6jVrG8Lp+2dx5kDoqjlE7vFmTBeu/LAvaLuOM53W3+Dq9AdJ0
jqF7Dmp7fj2Qh3OIs9ivU/Qdlif4SCYXjVSyYbfA0rMif1U1uh1DW8PQNXwSbysF
X+QXw/hgioQGHUBcN7qOw+Dfd2Xv0wK1clxxEYAkYkRHqazSIIbq0tbKcYYY+9Xh
aaMqaQJC5ZHwLJCD99mVo8I//KY0BaGC+v7LAcVqAFAUj5yp4sQ0DeAsyXoGa1Ac
GK9MCxevdqCO8d24tFeZYyL6bZTrblDJCvux/+xI06dBhA+EGibtg8CGyO9/ef7n
gVYugO1bhiitHozQeAlufdAcfpQ135iLM8wRl4i6JegNTqMr/cZuEhD6VEwFwDn/
J+wOc/yUuvd8j5070mWg
=vnGS
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Remove scsi_wait_scan module
       [not found] ` <1338110026.2957.5.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
@ 2012-05-28 10:00   ` maximilian attems
       [not found]     ` <20120528100015.GB10036-VJknIhvjf2Ov8OlOgJ4AIV6hYfS7NtTn@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: maximilian attems @ 2012-05-28 10:00 UTC (permalink / raw)
  To: James Bottomley
  Cc: linux-scsi, Dave Jones, Jeff Mahoney, Ben Hutchings,
	initramfs-u79uwXL29TY76Z2rM5mHXA

On Sun, May 27, 2012 at 10:13:46AM +0100, James Bottomley wrote:
> scsi_wait_scan was introduced with asynchronous host scanning as a hack
> for distributions that weren't using proper udev based wait for root to
> appear in their initramfs scripts.  In 2.6.30 Commit 
 
> c751085943362143f84346d274e0011419c84202
> Author: Rafael J. Wysocki <rjw-KKrjLPT3xs0@public.gmane.org>
> Date:   Sun Apr 12 20:06:56 2009 +0200
> 
>     PM/Hibernate: Wait for SCSI devices scan to complete during resume
> 
> Actually broke scsi_wait_scan because it renders
> scsi_complete_async_scans() a nop for modular SCSI if you include
> scsi_scans.h (which this module does).
> 
> The lack of bug reports is sufficient proof that this module is no
> longer used.

We do use it in initramfs-tools.

There is quite a number of bug reports moaning about having to boot with
`scsi_mod.scan=sync'. I didn't pass them on, because I didn't knew that
the module itself got broken, for example:
http://bugs.debian.org/616689

-- 
maks

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Remove scsi_wait_scan module
       [not found]     ` <20120528100015.GB10036-VJknIhvjf2Ov8OlOgJ4AIV6hYfS7NtTn@public.gmane.org>
@ 2012-05-28 12:07       ` James Bottomley
  2012-05-30 10:03         ` maximilian attems
  2012-05-30 18:26         ` Dan Williams
  0 siblings, 2 replies; 16+ messages in thread
From: James Bottomley @ 2012-05-28 12:07 UTC (permalink / raw)
  To: maximilian attems
  Cc: linux-scsi, Dave Jones, Jeff Mahoney, Ben Hutchings,
	initramfs-u79uwXL29TY76Z2rM5mHXA

On Mon, 2012-05-28 at 10:00 +0000, maximilian attems wrote:
> On Sun, May 27, 2012 at 10:13:46AM +0100, James Bottomley wrote:
> > scsi_wait_scan was introduced with asynchronous host scanning as a hack
> > for distributions that weren't using proper udev based wait for root to
> > appear in their initramfs scripts.  In 2.6.30 Commit 
>  
> > c751085943362143f84346d274e0011419c84202
> > Author: Rafael J. Wysocki <rjw-KKrjLPT3xs0@public.gmane.org>
> > Date:   Sun Apr 12 20:06:56 2009 +0200
> > 
> >     PM/Hibernate: Wait for SCSI devices scan to complete during resume
> > 
> > Actually broke scsi_wait_scan because it renders
> > scsi_complete_async_scans() a nop for modular SCSI if you include
> > scsi_scans.h (which this module does).
> > 
> > The lack of bug reports is sufficient proof that this module is no
> > longer used.
> 
> We do use it in initramfs-tools.
> 
> There is quite a number of bug reports moaning about having to boot with
> `scsi_mod.scan=sync'. I didn't pass them on, because I didn't knew that
> the module itself got broken, for example:
> http://bugs.debian.org/616689

OK, so what these bugs show is the breakage ... basically scsi_wait_scan
isn't really waiting for the scans to complete.  I can fix it in stable
so you can close your bug reports, but if I do, can you also transition
away from using it so I can remove it in 3.5?

James

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Remove scsi_wait_scan module
  2012-05-28 12:07       ` James Bottomley
@ 2012-05-30 10:03         ` maximilian attems
  2012-05-30 18:26         ` Dan Williams
  1 sibling, 0 replies; 16+ messages in thread
From: maximilian attems @ 2012-05-30 10:03 UTC (permalink / raw)
  To: James Bottomley
  Cc: linux-scsi, Dave Jones, Jeff Mahoney, Ben Hutchings,
	initramfs-u79uwXL29TY76Z2rM5mHXA

On Mon, May 28, 2012 at 04:07:46PM +0400, James Bottomley wrote:
> On Mon, 2012-05-28 at 10:00 +0000, maximilian attems wrote:
> > 
> > There is quite a number of bug reports moaning about having to boot with
> > `scsi_mod.scan=sync'. I didn't pass them on, because I didn't knew that
> > the module itself got broken, for example:
> > http://bugs.debian.org/616689
> 
> OK, so what these bugs show is the breakage ... basically scsi_wait_scan
> isn't really waiting for the scans to complete.  I can fix it in stable
> so you can close your bug reports, but if I do, can you also transition
> away from using it so I can remove it in 3.5?
> 

Thank you very much for the patch, guess Ben will pick it for 3.2 via
stable and we'll add it for 2.6.32 too.

I'll have enough time for afterwards fix to have the udev wait root,
even if right now I'm a bit unsure what it means beyond adding a specific
rule?

-- 
maks

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Remove scsi_wait_scan module
  2012-05-28 12:07       ` James Bottomley
  2012-05-30 10:03         ` maximilian attems
@ 2012-05-30 18:26         ` Dan Williams
       [not found]           ` <CAA9_cmfh9ZtepX+hjLVRM95u_pAe90kZTkBeVmFPWm8AMaqJ5g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 1 reply; 16+ messages in thread
From: Dan Williams @ 2012-05-30 18:26 UTC (permalink / raw)
  To: James Bottomley
  Cc: maximilian attems, linux-scsi, Dave Jones, Jeff Mahoney,
	Ben Hutchings, initramfs

On Mon, May 28, 2012 at 5:07 AM, James Bottomley
<James.Bottomley@hansenpartnership.com> wrote:
> On Mon, 2012-05-28 at 10:00 +0000, maximilian attems wrote:
>> On Sun, May 27, 2012 at 10:13:46AM +0100, James Bottomley wrote:
>> > scsi_wait_scan was introduced with asynchronous host scanning as a hack
>> > for distributions that weren't using proper udev based wait for root to
>> > appear in their initramfs scripts.  In 2.6.30 Commit
>>
>> > c751085943362143f84346d274e0011419c84202
>> > Author: Rafael J. Wysocki <rjw@sisk.pl>
>> > Date:   Sun Apr 12 20:06:56 2009 +0200
>> >
>> >     PM/Hibernate: Wait for SCSI devices scan to complete during resume
>> >
>> > Actually broke scsi_wait_scan because it renders
>> > scsi_complete_async_scans() a nop for modular SCSI if you include
>> > scsi_scans.h (which this module does).
>> >
>> > The lack of bug reports is sufficient proof that this module is no
>> > longer used.
>>
>> We do use it in initramfs-tools.
>>
>> There is quite a number of bug reports moaning about having to boot with
>> `scsi_mod.scan=sync'. I didn't pass them on, because I didn't knew that
>> the module itself got broken, for example:
>> http://bugs.debian.org/616689
>
> OK, so what these bugs show is the breakage ... basically scsi_wait_scan
> isn't really waiting for the scans to complete.  I can fix it in stable
> so you can close your bug reports, but if I do, can you also transition
> away from using it so I can remove it in 3.5?

Is there some other method whereby userspace can sync all driver
probing actions?

We won't need scsi_complete_async_scans() after:

  http://marc.info/?l=linux-scsi&m=133840132007532&w=2

...but won't initramfs environments still need a way to trigger
wait_for_device_probe()?  Something like echo "flush" >
/sys/devices/async_probe. and maybe reading that file indicates if
some async probing is still in-flight?

--
Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Remove scsi_wait_scan module
       [not found]           ` <CAA9_cmfh9ZtepX+hjLVRM95u_pAe90kZTkBeVmFPWm8AMaqJ5g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-05-30 23:32             ` James Bottomley
  2012-05-31  2:34               ` Dan Williams
  0 siblings, 1 reply; 16+ messages in thread
From: James Bottomley @ 2012-05-30 23:32 UTC (permalink / raw)
  To: Dan Williams
  Cc: maximilian attems, linux-scsi, Dave Jones, Jeff Mahoney,
	Ben Hutchings, initramfs-u79uwXL29TY76Z2rM5mHXA

On Wed, 2012-05-30 at 11:26 -0700, Dan Williams wrote:
> On Mon, May 28, 2012 at 5:07 AM, James Bottomley
> <James.Bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org> wrote:
> > On Mon, 2012-05-28 at 10:00 +0000, maximilian attems wrote:
> >> On Sun, May 27, 2012 at 10:13:46AM +0100, James Bottomley wrote:
> >> > scsi_wait_scan was introduced with asynchronous host scanning as a hack
> >> > for distributions that weren't using proper udev based wait for root to
> >> > appear in their initramfs scripts.  In 2.6.30 Commit
> >>
> >> > c751085943362143f84346d274e0011419c84202
> >> > Author: Rafael J. Wysocki <rjw-KKrjLPT3xs0@public.gmane.org>
> >> > Date:   Sun Apr 12 20:06:56 2009 +0200
> >> >
> >> >     PM/Hibernate: Wait for SCSI devices scan to complete during resume
> >> >
> >> > Actually broke scsi_wait_scan because it renders
> >> > scsi_complete_async_scans() a nop for modular SCSI if you include
> >> > scsi_scans.h (which this module does).
> >> >
> >> > The lack of bug reports is sufficient proof that this module is no
> >> > longer used.
> >>
> >> We do use it in initramfs-tools.
> >>
> >> There is quite a number of bug reports moaning about having to boot with
> >> `scsi_mod.scan=sync'. I didn't pass them on, because I didn't knew that
> >> the module itself got broken, for example:
> >> http://bugs.debian.org/616689
> >
> > OK, so what these bugs show is the breakage ... basically scsi_wait_scan
> > isn't really waiting for the scans to complete.  I can fix it in stable
> > so you can close your bug reports, but if I do, can you also transition
> > away from using it so I can remove it in 3.5?
> 
> Is there some other method whereby userspace can sync all driver
> probing actions?

No,  but then there never really was.  The theory is you know all the
disks you need (/ /usr and so on) and you just wait for them to appear
before mounting them and proceeding with boot.

> We won't need scsi_complete_async_scans() after:
> 
>   http://marc.info/?l=linux-scsi&m=133840132007532&w=2
> 
> ...but won't initramfs environments still need a way to trigger
> wait_for_device_probe()?  Something like echo "flush" >
> /sys/devices/async_probe. and maybe reading that file indicates if
> some async probing is still in-flight?

Why?  The job of an initramfs is to mount root.  All it has to do is
wait for root to appear via udev and then proceed.  The whole reason for
doing stuff async initially was to speed boot, so probing can still be
ongoing even after the initrd exits.

If you think about it, most modern fabrics are hot plug.  Just because
the initial scan has completed there's no guarantee that all the devices
have appeared yet.

James

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Remove scsi_wait_scan module
  2012-05-30 23:32             ` James Bottomley
@ 2012-05-31  2:34               ` Dan Williams
       [not found]                 ` <CAA9_cmfZFm5+9ARB7tNVwNzwxJh3bPD=h7gMWhByjy00-qZvgg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2012-05-31  8:21                 ` James Bottomley
  0 siblings, 2 replies; 16+ messages in thread
From: Dan Williams @ 2012-05-31  2:34 UTC (permalink / raw)
  To: James Bottomley
  Cc: maximilian attems, linux-scsi, Dave Jones, Jeff Mahoney,
	Ben Hutchings, initramfs-u79uwXL29TY76Z2rM5mHXA

On Wed, May 30, 2012 at 4:32 PM, James Bottomley
<James.Bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org> wrote:
> On Wed, 2012-05-30 at 11:26 -0700, Dan Williams wrote:
>> On Mon, May 28, 2012 at 5:07 AM, James Bottomley
>> <James.Bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org> wrote:
>> > On Mon, 2012-05-28 at 10:00 +0000, maximilian attems wrote:
>> >> On Sun, May 27, 2012 at 10:13:46AM +0100, James Bottomley wrote:
>> >> > scsi_wait_scan was introduced with asynchronous host scanning as a hack
>> >> > for distributions that weren't using proper udev based wait for root to
>> >> > appear in their initramfs scripts.  In 2.6.30 Commit
>> >>
>> >> > c751085943362143f84346d274e0011419c84202
>> >> > Author: Rafael J. Wysocki <rjw-KKrjLPT3xs0@public.gmane.org>
>> >> > Date:   Sun Apr 12 20:06:56 2009 +0200
>> >> >
>> >> >     PM/Hibernate: Wait for SCSI devices scan to complete during resume
>> >> >
>> >> > Actually broke scsi_wait_scan because it renders
>> >> > scsi_complete_async_scans() a nop for modular SCSI if you include
>> >> > scsi_scans.h (which this module does).
>> >> >
>> >> > The lack of bug reports is sufficient proof that this module is no
>> >> > longer used.
>> >>
>> >> We do use it in initramfs-tools.
>> >>
>> >> There is quite a number of bug reports moaning about having to boot with
>> >> `scsi_mod.scan=sync'. I didn't pass them on, because I didn't knew that
>> >> the module itself got broken, for example:
>> >> http://bugs.debian.org/616689
>> >
>> > OK, so what these bugs show is the breakage ... basically scsi_wait_scan
>> > isn't really waiting for the scans to complete.  I can fix it in stable
>> > so you can close your bug reports, but if I do, can you also transition
>> > away from using it so I can remove it in 3.5?
>>
>> Is there some other method whereby userspace can sync all driver
>> probing actions?
>
> No,  but then there never really was.  The theory is you know all the
> disks you need (/ /usr and so on) and you just wait for them to appear
> before mounting them and proceeding with boot.
>
>> We won't need scsi_complete_async_scans() after:
>>
>>   http://marc.info/?l=linux-scsi&m=133840132007532&w=2
>>
>> ...but won't initramfs environments still need a way to trigger
>> wait_for_device_probe()?  Something like echo "flush" >
>> /sys/devices/async_probe. and maybe reading that file indicates if
>> some async probing is still in-flight?
>
> Why?  The job of an initramfs is to mount root.  All it has to do is
> wait for root to appear via udev and then proceed.  The whole reason for
> doing stuff async initially was to speed boot, so probing can still be
> ongoing even after the initrd exits.
>
> If you think about it, most modern fabrics are hot plug.  Just because
> the initial scan has completed there's no guarantee that all the devices
> have appeared yet.

Fine for single device root, but what about raid and degraded assembly?

Last time I checked scsi_wait_scan was still being used by dracut in
the case where it decides to stop waiting for all raid members to
appear.  It's a "last call" before proceeding with degraded assembly.

If you immediately assemble and mount root as soon as the root device
could be started it will almost always be a degraded array.  Sure the
initramfs can just timeout arrival, but at a minimum that timeout
should be "load module + flush scanning".  Without a flush mechanism
it's just a shot in the dark what that minimum timeout should be.

If ata error recovery is kicking in and needs 10s of seconds to
recover a drive I'd want my initramfs to wait for that process to
quiesce before timing out and moving on.

--
Dan

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Remove scsi_wait_scan module
       [not found]                 ` <CAA9_cmfZFm5+9ARB7tNVwNzwxJh3bPD=h7gMWhByjy00-qZvgg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-05-31  8:15                   ` Harald Hoyer
       [not found]                     ` <4FC7288C.302-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2012-05-31 17:54                     ` Dave Jones
  0 siblings, 2 replies; 16+ messages in thread
From: Harald Hoyer @ 2012-05-31  8:15 UTC (permalink / raw)
  To: Dan Williams
  Cc: James Bottomley, maximilian attems, linux-scsi, Dave Jones,
	Jeff Mahoney, Ben Hutchings, initramfs-u79uwXL29TY76Z2rM5mHXA

Am 31.05.2012 04:34, schrieb Dan Williams:
> On Wed, May 30, 2012 at 4:32 PM, James Bottomley
> <James.Bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org> wrote:
>> On Wed, 2012-05-30 at 11:26 -0700, Dan Williams wrote:
>>> On Mon, May 28, 2012 at 5:07 AM, James Bottomley
>>> <James.Bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org> wrote:
>>>> On Mon, 2012-05-28 at 10:00 +0000, maximilian attems wrote:
>>>>> On Sun, May 27, 2012 at 10:13:46AM +0100, James Bottomley wrote:
>>>>>> scsi_wait_scan was introduced with asynchronous host scanning as a hack
>>>>>> for distributions that weren't using proper udev based wait for root to
>>>>>> appear in their initramfs scripts.  In 2.6.30 Commit
>>>>>
>>>>>> c751085943362143f84346d274e0011419c84202
>>>>>> Author: Rafael J. Wysocki <rjw-KKrjLPT3xs0@public.gmane.org>
>>>>>> Date:   Sun Apr 12 20:06:56 2009 +0200
>>>>>>
>>>>>>     PM/Hibernate: Wait for SCSI devices scan to complete during resume
>>>>>>
>>>>>> Actually broke scsi_wait_scan because it renders
>>>>>> scsi_complete_async_scans() a nop for modular SCSI if you include
>>>>>> scsi_scans.h (which this module does).
>>>>>>
>>>>>> The lack of bug reports is sufficient proof that this module is no
>>>>>> longer used.
>>>>>
>>>>> We do use it in initramfs-tools.
>>>>>
>>>>> There is quite a number of bug reports moaning about having to boot with
>>>>> `scsi_mod.scan=sync'. I didn't pass them on, because I didn't knew that
>>>>> the module itself got broken, for example:
>>>>> http://bugs.debian.org/616689
>>>>
>>>> OK, so what these bugs show is the breakage ... basically scsi_wait_scan
>>>> isn't really waiting for the scans to complete.  I can fix it in stable
>>>> so you can close your bug reports, but if I do, can you also transition
>>>> away from using it so I can remove it in 3.5?
>>>
>>> Is there some other method whereby userspace can sync all driver
>>> probing actions?
>>
>> No,  but then there never really was.  The theory is you know all the
>> disks you need (/ /usr and so on) and you just wait for them to appear
>> before mounting them and proceeding with boot.
>>
>>> We won't need scsi_complete_async_scans() after:
>>>
>>>   http://marc.info/?l=linux-scsi&m=133840132007532&w=2
>>>
>>> ...but won't initramfs environments still need a way to trigger
>>> wait_for_device_probe()?  Something like echo "flush" >
>>> /sys/devices/async_probe. and maybe reading that file indicates if
>>> some async probing is still in-flight?
>>
>> Why?  The job of an initramfs is to mount root.  All it has to do is
>> wait for root to appear via udev and then proceed.  The whole reason for
>> doing stuff async initially was to speed boot, so probing can still be
>> ongoing even after the initrd exits.
>>
>> If you think about it, most modern fabrics are hot plug.  Just because
>> the initial scan has completed there's no guarantee that all the devices
>> have appeared yet.
> 
> Fine for single device root, but what about raid and degraded assembly?
> 
> Last time I checked scsi_wait_scan was still being used by dracut in
> the case where it decides to stop waiting for all raid members to
> appear.  It's a "last call" before proceeding with degraded assembly.
> 
> If you immediately assemble and mount root as soon as the root device
> could be started it will almost always be a degraded array.  Sure the
> initramfs can just timeout arrival, but at a minimum that timeout
> should be "load module + flush scanning".  Without a flush mechanism
> it's just a shot in the dark what that minimum timeout should be.
> 
> If ata error recovery is kicking in and needs 10s of seconds to
> recover a drive I'd want my initramfs to wait for that process to
> quiesce before timing out and moving on.
> 
> --
> Dan

For Fedora17 scsi_wait_scan is not used anymore in the normal initramfs. I
removed it and raid is only tried to be started in degraded mode after a timeout
(several udevadm settle waits plus some extra 10 seconds).

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Remove scsi_wait_scan module
  2012-05-31  2:34               ` Dan Williams
       [not found]                 ` <CAA9_cmfZFm5+9ARB7tNVwNzwxJh3bPD=h7gMWhByjy00-qZvgg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-05-31  8:21                 ` James Bottomley
       [not found]                   ` <1338452505.3073.4.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
  1 sibling, 1 reply; 16+ messages in thread
From: James Bottomley @ 2012-05-31  8:21 UTC (permalink / raw)
  To: Dan Williams
  Cc: maximilian attems, linux-scsi, Dave Jones, Jeff Mahoney,
	Ben Hutchings, initramfs

On Wed, 2012-05-30 at 19:34 -0700, Dan Williams wrote:
> On Wed, May 30, 2012 at 4:32 PM, James Bottomley
> <James.Bottomley@hansenpartnership.com> wrote:
> > On Wed, 2012-05-30 at 11:26 -0700, Dan Williams wrote:
> >> On Mon, May 28, 2012 at 5:07 AM, James Bottomley
> >> <James.Bottomley@hansenpartnership.com> wrote:
> >> > On Mon, 2012-05-28 at 10:00 +0000, maximilian attems wrote:
> >> >> On Sun, May 27, 2012 at 10:13:46AM +0100, James Bottomley wrote:
> >> >> > scsi_wait_scan was introduced with asynchronous host scanning as a hack
> >> >> > for distributions that weren't using proper udev based wait for root to
> >> >> > appear in their initramfs scripts.  In 2.6.30 Commit
> >> >>
> >> >> > c751085943362143f84346d274e0011419c84202
> >> >> > Author: Rafael J. Wysocki <rjw@sisk.pl>
> >> >> > Date:   Sun Apr 12 20:06:56 2009 +0200
> >> >> >
> >> >> >     PM/Hibernate: Wait for SCSI devices scan to complete during resume
> >> >> >
> >> >> > Actually broke scsi_wait_scan because it renders
> >> >> > scsi_complete_async_scans() a nop for modular SCSI if you include
> >> >> > scsi_scans.h (which this module does).
> >> >> >
> >> >> > The lack of bug reports is sufficient proof that this module is no
> >> >> > longer used.
> >> >>
> >> >> We do use it in initramfs-tools.
> >> >>
> >> >> There is quite a number of bug reports moaning about having to boot with
> >> >> `scsi_mod.scan=sync'. I didn't pass them on, because I didn't knew that
> >> >> the module itself got broken, for example:
> >> >> http://bugs.debian.org/616689
> >> >
> >> > OK, so what these bugs show is the breakage ... basically scsi_wait_scan
> >> > isn't really waiting for the scans to complete.  I can fix it in stable
> >> > so you can close your bug reports, but if I do, can you also transition
> >> > away from using it so I can remove it in 3.5?
> >>
> >> Is there some other method whereby userspace can sync all driver
> >> probing actions?
> >
> > No,  but then there never really was.  The theory is you know all the
> > disks you need (/ /usr and so on) and you just wait for them to appear
> > before mounting them and proceeding with boot.
> >
> >> We won't need scsi_complete_async_scans() after:
> >>
> >>   http://marc.info/?l=linux-scsi&m=133840132007532&w=2
> >>
> >> ...but won't initramfs environments still need a way to trigger
> >> wait_for_device_probe()?  Something like echo "flush" >
> >> /sys/devices/async_probe. and maybe reading that file indicates if
> >> some async probing is still in-flight?
> >
> > Why?  The job of an initramfs is to mount root.  All it has to do is
> > wait for root to appear via udev and then proceed.  The whole reason for
> > doing stuff async initially was to speed boot, so probing can still be
> > ongoing even after the initrd exits.
> >
> > If you think about it, most modern fabrics are hot plug.  Just because
> > the initial scan has completed there's no guarantee that all the devices
> > have appeared yet.
> 
> Fine for single device root, but what about raid and degraded assembly?
> 
> Last time I checked scsi_wait_scan was still being used by dracut in
> the case where it decides to stop waiting for all raid members to
> appear.  It's a "last call" before proceeding with degraded assembly.

That's pretty pointless behaviour, isn't it?  What it's basically doing
is allowing a set time for the devices to appear, waiting out that time
(so presumably something is wrong with one or more of the devices), then
inserting scsi_wait_scan as some type of magic incantation to just make
it work.

> If you immediately assemble and mount root as soon as the root device
> could be started it will almost always be a degraded array.  Sure the
> initramfs can just timeout arrival, but at a minimum that timeout
> should be "load module + flush scanning".  Without a flush mechanism
> it's just a shot in the dark what that minimum timeout should be.

No, you wait a specified time for all the devices to appear before
assembling the raid.  If they don't, you try to bring a degraded raid
up.

The behaviour is also dependent on the user: If I'm a savvy user and I
have a raid log, I want my system up as fast as possible, so I only want
to wait until the minimum number of devices appears before assembling
the raid and moving on, knowing that hotplug of the remaining will cause
a log replay.

> If ata error recovery is kicking in and needs 10s of seconds to
> recover a drive I'd want my initramfs to wait for that process to
> quiesce before timing out and moving on.

That's the timeout you specify.

James



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Remove scsi_wait_scan module
       [not found]                   ` <1338452505.3073.4.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
@ 2012-05-31 16:40                     ` Dan Williams
       [not found]                       ` <CAA9_cmet6tMi6rNNv_ktRwHh3_N4rOSd+_jBW0P_gomHLpOytw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Dan Williams @ 2012-05-31 16:40 UTC (permalink / raw)
  To: James Bottomley
  Cc: maximilian attems, linux-scsi, Dave Jones, Jeff Mahoney,
	Ben Hutchings, initramfs-u79uwXL29TY76Z2rM5mHXA

On Thu, May 31, 2012 at 1:21 AM, James Bottomley
<James.Bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org> wrote:
>> Last time I checked scsi_wait_scan was still being used by dracut in
>> the case where it decides to stop waiting for all raid members to
>> appear.  It's a "last call" before proceeding with degraded assembly.
>
> That's pretty pointless behaviour, isn't it?  What it's basically doing
> is allowing a set time for the devices to appear, waiting out that time
> (so presumably something is wrong with one or more of the devices), then
> inserting scsi_wait_scan as some type of magic incantation to just make
> it work.

Random timeouts are magic, waiting for known probing to complete is not.

>> If you immediately assemble and mount root as soon as the root device
>> could be started it will almost always be a degraded array.  Sure the
>> initramfs can just timeout arrival, but at a minimum that timeout
>> should be "load module + flush scanning".  Without a flush mechanism
>> it's just a shot in the dark what that minimum timeout should be.
>
> No, you wait a specified time for all the devices to appear before
> assembling the raid.  If they don't, you try to bring a degraded raid
> up.
>
> The behaviour is also dependent on the user: If I'm a savvy user and I
> have a raid log, I want my system up as fast as possible, so I only want
> to wait until the minimum number of devices appears before assembling
> the raid and moving on, knowing that hotplug of the remaining will cause
> a log replay.
>
>> If ata error recovery is kicking in and needs 10s of seconds to
>> recover a drive I'd want my initramfs to wait for that process to
>> quiesce before timing out and moving on.
>
> That's the timeout you specify.

I'm a savvy raid user who wants his raid arrays to start as soon as
possible and one that knows that  lldds, libsas, and libata can inject
long unpredictable delays to discover devices that were attached since
boot.

So it's not about hotplug it's about letting the initial scan /
discovery process (which may involve 3 resets and 1 minute of timeouts
per-disk in a pathological ata configuration) complete for devices
that were minimally indicated in the initial scan.  The initramfs
timeout is then an optional cushion to allow a hotplug event to land,
but for the "as fast as possible case" that means letting link
recovery actions quiesce.

--
Dan

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Remove scsi_wait_scan module
       [not found]                     ` <4FC7288C.302-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2012-05-31 16:45                       ` Dan Williams
  2012-05-31 17:44                         ` James Bottomley
  0 siblings, 1 reply; 16+ messages in thread
From: Dan Williams @ 2012-05-31 16:45 UTC (permalink / raw)
  To: Harald Hoyer
  Cc: James Bottomley, maximilian attems, linux-scsi, Dave Jones,
	Jeff Mahoney, Ben Hutchings, initramfs-u79uwXL29TY76Z2rM5mHXA

On Thu, May 31, 2012 at 1:15 AM, Harald Hoyer <harald.hoyer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> For Fedora17 scsi_wait_scan is not used anymore in the normal initramfs. I
> removed it and raid is only tried to be started in degraded mode after a timeout
> (several udevadm settle waits plus some extra 10 seconds).

I'm probably missing something, but that sounds like "sprinkle
timeouts until it magically works"?  If udevadm settle is being used
as a discovery barrier shouldn't it be closing the loop with
wait_for_device_probe() in the kernel?

--
Dan

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Remove scsi_wait_scan module
       [not found]                       ` <CAA9_cmet6tMi6rNNv_ktRwHh3_N4rOSd+_jBW0P_gomHLpOytw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-05-31 17:42                         ` James Bottomley
  2012-05-31 18:49                           ` Dan Williams
  0 siblings, 1 reply; 16+ messages in thread
From: James Bottomley @ 2012-05-31 17:42 UTC (permalink / raw)
  To: Dan Williams
  Cc: maximilian attems, linux-scsi, Dave Jones, Jeff Mahoney,
	Ben Hutchings, initramfs-u79uwXL29TY76Z2rM5mHXA

On Thu, 2012-05-31 at 09:40 -0700, Dan Williams wrote:
> On Thu, May 31, 2012 at 1:21 AM, James Bottomley
> <James.Bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org> wrote:
> >> Last time I checked scsi_wait_scan was still being used by dracut in
> >> the case where it decides to stop waiting for all raid members to
> >> appear.  It's a "last call" before proceeding with degraded assembly.
> >
> > That's pretty pointless behaviour, isn't it?  What it's basically doing
> > is allowing a set time for the devices to appear, waiting out that time
> > (so presumably something is wrong with one or more of the devices), then
> > inserting scsi_wait_scan as some type of magic incantation to just make
> > it work.
> 
> Random timeouts are magic, waiting for known probing to complete is not.

Well, yes it is ... it's just a question of whose magic timeouts.
Probing mostly waits the device appearance timeout on the bus.

The timeout in question is how long the user is prepared to wait for the
root device.  Most distros tend to code for 120s+, so that's way beyond
any bus timeout.  If the user wishes forever, that's fine too.

> >> If you immediately assemble and mount root as soon as the root device
> >> could be started it will almost always be a degraded array.  Sure the
> >> initramfs can just timeout arrival, but at a minimum that timeout
> >> should be "load module + flush scanning".  Without a flush mechanism
> >> it's just a shot in the dark what that minimum timeout should be.
> >
> > No, you wait a specified time for all the devices to appear before
> > assembling the raid.  If they don't, you try to bring a degraded raid
> > up.
> >
> > The behaviour is also dependent on the user: If I'm a savvy user and I
> > have a raid log, I want my system up as fast as possible, so I only want
> > to wait until the minimum number of devices appears before assembling
> > the raid and moving on, knowing that hotplug of the remaining will cause
> > a log replay.
> >
> >> If ata error recovery is kicking in and needs 10s of seconds to
> >> recover a drive I'd want my initramfs to wait for that process to
> >> quiesce before timing out and moving on.
> >
> > That's the timeout you specify.
> 
> I'm a savvy raid user who wants his raid arrays to start as soon as
> possible and one that knows that  lldds, libsas, and libata can inject
> long unpredictable delays to discover devices that were attached since
> boot.
> 
> So it's not about hotplug it's about letting the initial scan /
> discovery process (which may involve 3 resets and 1 minute of timeouts
> per-disk in a pathological ata configuration) complete for devices
> that were minimally indicated in the initial scan.  The initramfs
> timeout is then an optional cushion to allow a hotplug event to land,
> but for the "as fast as possible case" that means letting link
> recovery actions quiesce.

If there are errors on the bus, the chances are the devices are missed
by the initial discover and appear later anyway, so neither approach is
foolproof.  I like the how long is the user prepared to wait approach vs
how long does it take to complete error recovery simply because mostly
if the device doesn't appear within that time it is a bug (or a hardware
configuration problem).

Conversely, if you think of the usual case: the root device appears long
before bus probing finishes, so by only waiting for root, we assist the
fast boot process.

James

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Remove scsi_wait_scan module
  2012-05-31 16:45                       ` Dan Williams
@ 2012-05-31 17:44                         ` James Bottomley
  0 siblings, 0 replies; 16+ messages in thread
From: James Bottomley @ 2012-05-31 17:44 UTC (permalink / raw)
  To: Dan Williams
  Cc: Harald Hoyer, maximilian attems, linux-scsi, Dave Jones,
	Jeff Mahoney, Ben Hutchings, initramfs

On Thu, 2012-05-31 at 09:45 -0700, Dan Williams wrote:
> On Thu, May 31, 2012 at 1:15 AM, Harald Hoyer <harald.hoyer@gmail.com> wrote:
> > For Fedora17 scsi_wait_scan is not used anymore in the normal initramfs. I
> > removed it and raid is only tried to be started in degraded mode after a timeout
> > (several udevadm settle waits plus some extra 10 seconds).
> 
> I'm probably missing something, but that sounds like "sprinkle
> timeouts until it magically works"?  If udevadm settle is being used
> as a discovery barrier shouldn't it be closing the loop with
> wait_for_device_probe() in the kernel?

No, that was pretty much the whole point of booting async.  It only
really matters in huge numbers of devices systems (like san connected
beasts).  What you *really* want is the boot to proceed immediately
after root appears and let the rest of the device probing continue in
parallel.

James



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Remove scsi_wait_scan module
  2012-05-31  8:15                   ` Harald Hoyer
       [not found]                     ` <4FC7288C.302-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2012-05-31 17:54                     ` Dave Jones
  1 sibling, 0 replies; 16+ messages in thread
From: Dave Jones @ 2012-05-31 17:54 UTC (permalink / raw)
  To: Harald Hoyer
  Cc: Dan Williams, James Bottomley, maximilian attems, linux-scsi,
	Jeff Mahoney, Ben Hutchings, initramfs

On Thu, May 31, 2012 at 10:15:08AM +0200, Harald Hoyer wrote:

 > For Fedora17 scsi_wait_scan is not used anymore in the normal initramfs.

Did/can you backport the same changes to F16 ?
If this module goes away, we don't want unpleasant surprises if we're still
dependant on it when we rebase the kernel.

	Dave


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Remove scsi_wait_scan module
  2012-05-31 17:42                         ` James Bottomley
@ 2012-05-31 18:49                           ` Dan Williams
  0 siblings, 0 replies; 16+ messages in thread
From: Dan Williams @ 2012-05-31 18:49 UTC (permalink / raw)
  To: James Bottomley
  Cc: maximilian attems, linux-scsi, Dave Jones, Jeff Mahoney,
	Ben Hutchings, initramfs

On Thu, May 31, 2012 at 10:42 AM, James Bottomley
<James.Bottomley@hansenpartnership.com> wrote:
> If there are errors on the bus, the chances are the devices are missed
> by the initial discover and appear later anyway, so neither approach is
> foolproof.  I like the how long is the user prepared to wait approach vs
> how long does it take to complete error recovery simply because mostly
> if the device doesn't appear within that time it is a bug (or a hardware
> configuration problem).

I agree that the "how long is the user prepared to wait" approach is
optimal.  But there is no way for the user to express "I want to be
fast and safe" i.e. wait just the minimum time the subsystem needs to
complete an initial scan.  Outside of building the module into the
kernel to take advantage of the built-in wait_for_device_probe() in
prepare_namespace().  That minimum time varies based on configuration.
 I've watched dracut fail raid assembly even though the driver had not
returned 'done' from ->scan_finished().  A generous timeout would fix
that, but now you've overshot what the kernel was prepared to call the
initial discovery window.

> Conversely, if you think of the usual case: the root device appears long
> before bus probing finishes, so by only waiting for root, we assist the
> fast boot process.

Yes, it sucks to do "wait world" when you just need a subset, but I'm
only saying to do the global wait in the case where the raid metadata
expects all devices to be present and we are about to degrade the
array for the first time.  So in the "all devices appear case" or the
"array already marked degraded case" we wouldn't need to wait and boot
would proceed soon as root is able to be assembled.

...but maybe that is my answer.  A generous timeout incurred only when
that first degraded event happens?  I don't know just makes me
uncomfortable that userspace has no visibility into all the machinery
that makes wait_for_device_probe() work in the built-in case.  But
maybe that is because prepare_namespace() is not free to be as
expressive as an initramfs and can only use the big hammer.

--
Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-05-31 18:49 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-27  9:13 Remove scsi_wait_scan module James Bottomley
2012-05-27 14:48 ` Jeff Mahoney
     [not found] ` <1338110026.2957.5.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
2012-05-28 10:00   ` maximilian attems
     [not found]     ` <20120528100015.GB10036-VJknIhvjf2Ov8OlOgJ4AIV6hYfS7NtTn@public.gmane.org>
2012-05-28 12:07       ` James Bottomley
2012-05-30 10:03         ` maximilian attems
2012-05-30 18:26         ` Dan Williams
     [not found]           ` <CAA9_cmfh9ZtepX+hjLVRM95u_pAe90kZTkBeVmFPWm8AMaqJ5g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-05-30 23:32             ` James Bottomley
2012-05-31  2:34               ` Dan Williams
     [not found]                 ` <CAA9_cmfZFm5+9ARB7tNVwNzwxJh3bPD=h7gMWhByjy00-qZvgg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-05-31  8:15                   ` Harald Hoyer
     [not found]                     ` <4FC7288C.302-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-05-31 16:45                       ` Dan Williams
2012-05-31 17:44                         ` James Bottomley
2012-05-31 17:54                     ` Dave Jones
2012-05-31  8:21                 ` James Bottomley
     [not found]                   ` <1338452505.3073.4.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
2012-05-31 16:40                     ` Dan Williams
     [not found]                       ` <CAA9_cmet6tMi6rNNv_ktRwHh3_N4rOSd+_jBW0P_gomHLpOytw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-05-31 17:42                         ` James Bottomley
2012-05-31 18:49                           ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).