From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mikulas Patocka Subject: Re: [dm-devel] [PATCH] deadlock with suspend and quotas Date: Wed, 30 Nov 2011 12:03:12 -0500 (EST) Message-ID: References: <20111128150400.GE6366@quack.suse.cz> <20111129101901.GA5635@quack.suse.cz> <20111130140913.GX7595@agk-dp.fab.redhat.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Jan Kara , esandeen@redhat.com, linux-kernel@vger.kernel.org, dm-devel@redhat.com, linux-fsdevel@vger.kernel.org, Christopher Chaltain , Valerie Aurora To: Alasdair G Kergon Return-path: Received: from mx1.redhat.com ([209.132.183.28]:8852 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757375Ab1K3RDn (ORCPT ); Wed, 30 Nov 2011 12:03:43 -0500 In-Reply-To: <20111130140913.GX7595@agk-dp.fab.redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > The sync only needs to block on a particular fs if there is data to flush. > > A sync that originated in a way that can only be independent of any > application that is changing the fs may skip that fs if it is frozen. > > It's the user's responsibility only to freeze filesystems for very brief > periods of time if they are still being changed. The problem is that the process that is freezing filesystem (lvm) is totally independent on the process that is writing data to the filesystem and syncing it. For example, you have a transactional database running in userspace and that database is writing and syncing and you take a snapshot at the same time. --- so you cannot make these two processes cooperate in any way. You can't tell to the database server "please don't write now, I am suspending to make a snapshot". The database server still writes and still assumes that sync() commits to permanent storage, regardless on what is going on in lvm. Mikulas > ? > > Alasdair