]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] uml: use always a separate io thread for UBD
authorPaolo \'Blaisorblade\' Giarrusso <blaisorblade_spam@yahoo.it>
Wed, 13 Oct 2004 14:31:21 +0000 (07:31 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 13 Oct 2004 14:31:21 +0000 (07:31 -0700)
Currently, ubd=sync is different from replacing ubd#= with ubd#s=.  This is
against Principle of Least Surprise, so remove this difference.

Also the current ubd=sync behaviour is completely useless: it is to make sure
that when the kernel has synched its I/O to the virtual disk, the host does
not invalidate this with his caching; this causes ReiserFS corruption.

But since actually we call end_request() only after the io_thread has done its
work, we never lie to the block layer.  Using O_SYNC as we do when replacing
ubd#= with ubd#s= is enough.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/drivers/ubd_kern.c

index fb6041342995b926c2d848aed21499fea6a78ce7..53fba09adda838e7ccf754cbe8a6cc2c6b1faff1 100644 (file)
@@ -773,9 +773,11 @@ int ubd_driver_init(void){
        unsigned long stack;
        int err;
 
+       /* Set by CONFIG_BLK_DEV_UBD_SYNC or ubd=sync.*/
        if(global_openflags.s){
-               printk(KERN_INFO "ubd : Synchronous mode\n");
-               return(0);
+               printk(KERN_INFO "ubd: Synchronous mode\n");
+               /* Letting ubd=sync be like using ubd#s= instead of ubd#= is
+                * enough. So use anyway the io thread. */
        }
        stack = alloc_stack(0, 0);
        io_pid = start_io_thread(stack + PAGE_SIZE - sizeof(void *),