Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752198AbaKYHJh (ORCPT ); Tue, 25 Nov 2014 02:09:37 -0500 Received: from fw5a.wadns.net ([196.220.39.47]:11640 "EHLO fw5a.wadns.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750840AbaKYHJf (ORCPT ); Tue, 25 Nov 2014 02:09:35 -0500 X-Greylist: delayed 455 seconds by postgrey-1.27 at vger.kernel.org; Tue, 25 Nov 2014 02:09:34 EST X-WAScan-Signature: f0387f3b6ebfa9b9a99917943c23ffa1 Message-ID: <547419D6.40905@swiftspirit.co.za> Date: Tue, 25 Nov 2014 07:55:34 +0200 From: Brendan Hide User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Omar Sandoval CC: Filipe David Manana , David Sterba , linux-btrfs@vger.kernel.org, Alexander Viro , Andrew Morton , Chris Mason , Josef Bacik , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org, Trond Myklebust , Mel Gorman Subject: Re: [PATCH v2 5/5] btrfs: enable swap file support References: <20141121180045.GF8568@twin.jikos.cz> <20141122200357.GA15189@mew> <20141124220302.GA5785@mew.dhcp4.washington.edu> In-Reply-To: <20141124220302.GA5785@mew.dhcp4.washington.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2014/11/25 00:03, Omar Sandoval wrote: > [snip] > > The snapshot issue is a little tricker to resolve. I see a few options: > > 1. Just do the COW and hope for the best > 2. As part of btrfs_swap_activate, COW any shared extents. If a snapshot > happens while a swap file is active, we'll fall back to 1. > 3. Clobber any swap file extents which are in a snapshot, i.e., always use the > existing extent. > > I'm partial to 3, as it's the simplest approach, and I don't think it makes > much sense for a swap file to be in a snapshot anyways. I'd appreciate any > comments that anyone might have. > Personally, 3 seems pragmatic - but not necessarily "correct". :-/ -- __________ Brendan Hide http://swiftspirit.co.za/ http://www.webafrica.co.za/?AFF1E97 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/