[uml-devel] [PATCH] uml: use DIV_ROUND_UP

2008-02-19 Thread Jiri Olsa
Hi,

I just saw similar patches in the janitor kernel's list,
and spotted place it fits.

Signed-off-by: Jiri Olsa <[EMAIL PROTECTED]>
---
 arch/um/drivers/ubd_kern.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index b1a77b1..1e579e4 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -1020,8 +1020,7 @@ static void cowify_bitmap(__u64 io_offset, int length, 
unsigned long *cow_mask,
 * by one word.  Thanks to Lynn Kerby for the fix and James McMechan
 * for the original diagnosis.
 */
-   if(*cow_offset == ((bitmap_len + sizeof(unsigned long) - 1) /
-  sizeof(unsigned long) - 1))
+   if(*cow_offset == (DIV_ROUND_UP(bitmap_len, sizeof(unsigned long)) - 1))
(*cow_offset)--;
 
bitmap_words[0] = bitmap[*cow_offset];


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


Re: [uml-devel] [PATCH] uml: use DIV_ROUND_UP

2008-02-19 Thread WANG Cong
From: Jiri Olsa <[EMAIL PROTECTED]>
Subject: [PATCH] uml: use DIV_ROUND_UP
Date: Tue, 19 Feb 2008 22:49:33 +0100
Message-ID: <[EMAIL PROTECTED]>

> Hi,
> 
> I just saw similar patches in the janitor kernel's list,
> and spotted place it fits.
> 
> Signed-off-by: Jiri Olsa <[EMAIL PROTECTED]>
> ---
>  arch/um/drivers/ubd_kern.c |3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
> index b1a77b1..1e579e4 100644
> --- a/arch/um/drivers/ubd_kern.c
> +++ b/arch/um/drivers/ubd_kern.c
> @@ -1020,8 +1020,7 @@ static void cowify_bitmap(__u64 io_offset, int length, 
> unsigned long *cow_mask,
>* by one word.  Thanks to Lynn Kerby for the fix and James McMechan
>* for the original diagnosis.
>*/
> - if(*cow_offset == ((bitmap_len + sizeof(unsigned long) - 1) /
> -sizeof(unsigned long) - 1))
> + if(*cow_offset == (DIV_ROUND_UP(bitmap_len, sizeof(unsigned long)) - 1))

Looks good for me. ACK.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


[uml-devel] sleep() calls blocks forever after settimeofday()

2008-02-19 Thread Stephen Su
Hi Jeff,

I am still on Linux kernel 2.6.17.4, I ran into sleep() calls blocks forever 
after change date of time. Please help!

Thanks,
-steve





   
-
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel