Re: Question about commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed").

2016-09-18 Thread Guoqing Jiang
On 09/14/2016 04:39 PM, Marion & Christophe JAILLET wrote: I don't share your feeling. bitmap_create() can return ERR_PTR(-ENOMEM) or ERR_PTR(-EINVAL). In such cases 'if (!bitmap)' will not be helpful. Maybe it should be turned into 'if (IS_ERR_OR_NULL(bitmap))' to handle errors returned

Re: Question about commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed").

2016-09-18 Thread Guoqing Jiang
On 09/14/2016 04:39 PM, Marion & Christophe JAILLET wrote: I don't share your feeling. bitmap_create() can return ERR_PTR(-ENOMEM) or ERR_PTR(-EINVAL). In such cases 'if (!bitmap)' will not be helpful. Maybe it should be turned into 'if (IS_ERR_OR_NULL(bitmap))' to handle errors returned

Re: Question about commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed").

2016-09-14 Thread Marion & Christophe JAILLET
Le 14/09/2016 à 10:25, Guoqing Jiang a écrit : On 09/13/2016 01:24 PM, Shaohua Li wrote: On Mon, Sep 12, 2016 at 09:09:48PM +0200, Christophe JAILLET wrote: Hi, I'm puzzled by commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed"). Hi Christophe, Thank you very much to

Re: Question about commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed").

2016-09-14 Thread Marion & Christophe JAILLET
Le 14/09/2016 à 10:25, Guoqing Jiang a écrit : On 09/13/2016 01:24 PM, Shaohua Li wrote: On Mon, Sep 12, 2016 at 09:09:48PM +0200, Christophe JAILLET wrote: Hi, I'm puzzled by commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed"). Hi Christophe, Thank you very much to

Re: Question about commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed").

2016-09-14 Thread Guoqing Jiang
On 09/13/2016 01:24 PM, Shaohua Li wrote: On Mon, Sep 12, 2016 at 09:09:48PM +0200, Christophe JAILLET wrote: Hi, I'm puzzled by commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed"). Hi Christophe, Thank you very much to help check this! Part of the commit is: @@

Re: Question about commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed").

2016-09-14 Thread Guoqing Jiang
On 09/13/2016 01:24 PM, Shaohua Li wrote: On Mon, Sep 12, 2016 at 09:09:48PM +0200, Christophe JAILLET wrote: Hi, I'm puzzled by commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed"). Hi Christophe, Thank you very much to help check this! Part of the commit is: @@

Re: Question about commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed").

2016-09-13 Thread Shaohua Li
On Mon, Sep 12, 2016 at 09:09:48PM +0200, Christophe JAILLET wrote: > Hi, > > I'm puzzled by commit f9a67b1182e5 ("md/bitmap: clear bitmap if > bitmap_create failed"). Hi Christophe, Thank you very much to help check this! > Part of the commit is: > > @@ -1865,8 +1866,10 @@ int

Re: Question about commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed").

2016-09-13 Thread Shaohua Li
On Mon, Sep 12, 2016 at 09:09:48PM +0200, Christophe JAILLET wrote: > Hi, > > I'm puzzled by commit f9a67b1182e5 ("md/bitmap: clear bitmap if > bitmap_create failed"). Hi Christophe, Thank you very much to help check this! > Part of the commit is: > > @@ -1865,8 +1866,10 @@ int

Question about commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed").

2016-09-12 Thread Christophe JAILLET
Hi, I'm puzzled by commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed"). Part of the commit is: @@ -1865,8 +1866,10 @@ int bitmap_copy_from_slot(struct mddev *mddev, int slot, struct bitmap_counts *counts; struct bitmap *bitmap = bitmap_create(mddev, slot); -

Question about commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed").

2016-09-12 Thread Christophe JAILLET
Hi, I'm puzzled by commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed"). Part of the commit is: @@ -1865,8 +1866,10 @@ int bitmap_copy_from_slot(struct mddev *mddev, int slot, struct bitmap_counts *counts; struct bitmap *bitmap = bitmap_create(mddev, slot); -