From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takahiro Yasui Subject: Re: [PATCH 2/7] A framework for holding bios until suspend Date: Sat, 28 Nov 2009 13:02:15 -0500 Message-ID: <4B1165A7.3050303@redhat.com> References: Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: dm-devel@redhat.com List-Id: dm-devel.ids On 11/18/09 07:11, Mikulas Patocka wrote: > @@ -760,6 +775,7 @@ static void do_mirror(struct work_struct > bio_list_init(&ms->reads); > bio_list_init(&ms->writes); > bio_list_init(&ms->failures); > + bio_list_init(&ms->hold); > spin_unlock_irqrestore(&ms->lock, flags); Initializing the hold list in do_mirror() is a problem. Some bios might already in it and they will never be processed. This makes device-mapper "stuck" when the device goes suspend. The hold list should be inizialized only when the mirror device is created in alloc_context(). alloc_context() spin_lock_init(&ms->lock); bio_list_init(&ms->reads); bio_list_init(&ms->writes); bio_list_init(&ms->failures); + bio_list_init(&ms->hold); Thanks, Taka