lkml.org 
[lkml]   [2015]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 2/2] zram: remove init_lock in zram_make_request
On (02/02/15 16:06), Sergey Senozhatsky wrote:
> So, guys, how about doing it differently, in less lines of code,
> hopefully. Don't move reset_store()'s work to zram_reset_device().
> Instead, move
>
> set_capacity(zram->disk, 0);
> revalidate_disk(zram->disk);
>
> out from zram_reset_device() to reset_store(). this two function are
> executed only when called from reset_store() anyway. this also will let
> us drop `bool reset capacity' param from zram_reset_device().
>
>
> so we will do in reset_store()
>
> mutex_lock(bdev->bd_mutex);
>
> fsync_bdev(bdev);
> zram_reset_device(zram);
> set_capacity(zram->disk, 0);
>
> mutex_unlock(&bdev->bd_mutex);
>
> revalidate_disk(zram->disk);
> bdput(bdev);
>
>
>
> and change zram_reset_device(zram, false) call to simply zram_reset_device(zram)
> in __exit zram_exit(void).
>

Hello,

Minchan, Ganesh, I sent a patch last night, with the above solution.
looks ok to you?

Minchan, I think I'll send my small struct zram clean-up patch after
your init_lock patch. what's your opinion?

-ss


\
 
 \ /
  Last update: 2015-02-03 03:21    [W:0.190 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site