From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F737C433F5 for ; Mon, 29 Nov 2021 16:26:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345105AbhK2Q3P (ORCPT ); Mon, 29 Nov 2021 11:29:15 -0500 Received: from vps.thesusis.net ([34.202.238.73]:46760 "EHLO vps.thesusis.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244943AbhK2Q1O (ORCPT ); Mon, 29 Nov 2021 11:27:14 -0500 Received: by vps.thesusis.net (Postfix, from userid 1000) id B8D5C68C35; Mon, 29 Nov 2021 11:23:26 -0500 (EST) References: <87r1azashl.fsf@vps.thesusis.net> User-agent: mu4e 1.7.0; emacs 27.1 From: Phillip Susi To: Borden Cc: linux-btrfs@vger.kernel.org Subject: Re: Connection lost during BTRFS move + resize Date: Mon, 29 Nov 2021 11:20:28 -0500 In-reply-to: Message-ID: <87mtlnaq2p.fsf@vps.thesusis.net> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Borden writes: > For my own education/curiosity/intellectual banter: ddrescue, > badblocks, rsync and other utilities have log files that track > progress and allow it to resume if it's interrupted. Since resize > operations work in the linear process you described, how hard would it > be, theoretically, to implement a "needle position" in a move > operation to allow a move to pick up where it left off? Theoretically it shouldn't be too hard. It's just a matter of deciding on a location where you can safely record the checkpoint information and then update the checkpoint between blocks. That's how LVM handles moves safely. In the worst case, you restart the move at the last checkpoint and just waste some time copying data that was already copied but not checkpointed.