From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takahiro Yasui Subject: Re: Re: [RFC][PATCH] dm-mirror: fix data corruption Date: Wed, 09 Sep 2009 16:18:45 -0400 Message-ID: <4AA80DA5.7080709@redhat.com> References: <4A568333.6090901@redhat.com> <4A5790C5.90508@redhat.com> <20090830192441.GA641@us.ibm.com> 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: Mikulas Patocka Cc: device-mapper development List-Id: dm-devel.ids Hi Mikulas, On 08/31/09 17:39, Mikulas Patocka wrote: > I uploaded patches for this bug at: > http://people.redhat.com/mpatocka/patches/kernel/mirror-race/ > > But note! They were never tried. When I wanted to try them, I found out > that dmeventd is totally nonworking in upstream code (it doesn't pass > "handle_errors" argument and has some crashes and signal errors), so I > didn't test them with dmeventd. Dmeventd must be fixed first, then we can > work on this bug. Thank you for posting the patch set. I roughly looked at your patch and have several comments. - The flag, "handle_errors," won't be passed to dm-raid1 by dmeventd. lvm commands (e.g. vgchange) or dmsetup pass "handle_errors" when new mirror mapping is created. - As I mentioned before, bios which are sent to out-of-sync regions also need to be blocked because bios to out-of-sync regions are processed by generic_make_request() and would return the "success" to upper layer without dm-raid1 notices it. This might cause data corruption. https://www.redhat.com/archives/dm-devel/2009-July/msg00118.html - The modification of write_callback() looks a little confusing to me. Do all bios need to be blocked? When all legs returns error, the bio should be returned with -EIO to upper layer without being blocked as original code using uptodate flag. I appreciate your comments. Thanks, Taka -- Takahiro Yasui Hitachi Computer Products (America), Inc.