Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp3540179pxb; Sun, 26 Sep 2021 18:50:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3RzhqpolczdNtCap6nNQfK81q88yZ+fE6qU1KnM5EH136VzLIS9r+I/rKt8miwLRG0oGb X-Received: by 2002:a50:e18f:: with SMTP id k15mr14796894edl.45.1632707450099; Sun, 26 Sep 2021 18:50:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632707450; cv=none; d=google.com; s=arc-20160816; b=Qp8u5VqC9MkOlg11/xHHvI6ouqnYZttPijqsie0gKhQQrWtsvFrGfyIoPyzQJdGV24 s7oS/QwDgvutp4xUl0sJLDyoCItmRRkabNHIu3AdtgHr8OGrbypTUPszEsWRZp39lOj1 rTTvnxuDs5Rd/c1uoUuPmxuwwVjNbfzIyyzSMmhGkq2od9LEIs8uU5sHYSC6It3J8vp8 AIO3uOA2B3drO1RuQ4AK5CB3kby1sFhjXlL/RYQr5V/JRjpDbrmJmlwqUwJQSbInoy+C gC2DSWkAQeZpmZaMdUg7Fs3unb1Fnys7wwQt5b1fg3DOyaWYRHhFDYlM3hQJYll8a2wO KErg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:to:from:date:dkim-signature; bh=ygEFtDYZxT9vrjkErAYv8Q0mwvXb7MdrTep5bixORxg=; b=ERPbW21kIEMdDEOVMEOmvDf+lxg2wZTqQYLINlXMbPvcJkxFP9QvGQTsQfWDYA1RVv reyxmwa3exUVR0Y3NpFa9AX90TDSxZOOmhJ/Wbp1UDMc+I7jTA8Mez4+QQNbXd5K3WCS lJtrax5xRAhjMZeDjr32S2hMnUnsb+ifBDAaU/J+mMct+5a6BVy0haa7tJXMVmWSkui9 Pq48td4PmvWfegcfS36WxVpNZX4yVotRufhUswlCS0Hy+aCvaScd9SNMxiftLt7cA2nM RoKe71zMOrLEhSw+XopNQ7d56UkiDyXDgnsupV8z/o/APQNPiopOLZeCen4+cRxZg1kr sxdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FT2jkQ4U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l8si17351820edi.356.2021.09.26.18.50.26; Sun, 26 Sep 2021 18:50:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FT2jkQ4U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232392AbhI0Buu (ORCPT + 99 others); Sun, 26 Sep 2021 21:50:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232289AbhI0But (ORCPT ); Sun, 26 Sep 2021 21:50:49 -0400 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EB1EC061570; Sun, 26 Sep 2021 18:49:12 -0700 (PDT) Received: by mail-qv1-xf29.google.com with SMTP id cv2so4163404qvb.5; Sun, 26 Sep 2021 18:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:subject:message-id:mime-version:content-disposition; bh=ygEFtDYZxT9vrjkErAYv8Q0mwvXb7MdrTep5bixORxg=; b=FT2jkQ4UFhn/ygqm6BeHtVvO06xiH/nGq++DBQBpVJLPfYmmPG5A3BnV7mBCced2Ih +6+YSt6k0WHPQJWKq8FKaQE5JaLI+G72JHZOZPnVOyKrnrINuP2pFeoYsuau5y7wSY62 4GZ8aX1DWpd8f6K3X3iuhFmpyPXi0foAcE52ygBlyDgz356syItUMOY4wO8/fM2y/xfz aZQc3uCVHYhPeKmw9iQKD0YBTodycG1SNJgi///6il7dDE9z69dZB2Ee48bW6iketLpZ +ELy8vkrpaWqJPScWfqx4HrBAz102Xkob8f0Y34RKwe/v5wUTVPURNiZ8O91g13g816W kang== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=ygEFtDYZxT9vrjkErAYv8Q0mwvXb7MdrTep5bixORxg=; b=KFpRLNPg3bGRI9hbv8YfbA3YyuM5slotEMJMvMXu7C3fg1hCvpv9DkrVwtCjgQNojZ TCar9d7VC7pieO38ZDdwbvxX8OqSwtBuMy7p9+PmRenZCblo7pMYhHFwkGS5s+VZ6kVu eBIvM18OXSv1+XWi2pqdBw3c4+m60zQURCGY7h0sgKe8crc77iwV+2UH3mavZLHiFmBM XxliZpEsUxmfBCRg1GcHSzn+tx2xmEBr9xXcpC+nZj1Tg7Mry69AHVWWRoH3mTTtiE46 IY0QD+N9FhMa/+urQ6UwILDz96twi9OYAsSiqlXUR6adFulMFE81nJRHF6ztWzxR6y6a ixfA== X-Gm-Message-State: AOAM533dycWQysxOivAwlmPk1/UNb2lNiD/WlAVT/M8rJy8th7Df7kF/ xzSiDRsAlOESaT3vxgIrrrOBVBVrSw== X-Received: by 2002:a0c:f3c6:: with SMTP id f6mr21341819qvm.33.1632707350122; Sun, 26 Sep 2021 18:49:10 -0700 (PDT) Received: from moria.home.lan (c-73-219-103-14.hsd1.vt.comcast.net. [73.219.103.14]) by smtp.gmail.com with ESMTPSA id n20sm11522054qkk.135.2021.09.26.18.49.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Sep 2021 18:49:09 -0700 (PDT) Date: Sun, 26 Sep 2021 21:49:07 -0400 From: Kent Overstreet To: linux-kernel@vger.kernel.org, linux-bcachefs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: bcachefs - snapshots Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Snapshots have been merged! 9 months of work and 3k lines of new code, finally released. Some highlights: - btrfs style subvolumes & snapshots interface - snapshots are writeable - highly scalable: number of snapshots is limited only by your disk space - highly space efficient: no internal fragmentation issues Design doc here: https://bcachefs.org/Snapshots/ The core functionality is complete - snapshot creation and deletion works, fsck changes are done (most of the complexity was in making fsck work without O(number of snapshots) performance - tricky). Everything else is a todo item: - still need to export different st_dev for files in different subvolumes (we'll never allocate a new inode with an inode number that collides with an inode inother subvolume - but snapshots will naturally result in colliding inode numbers) - need to hide dirents that point to snapshots when inside snapshots... - snapshot creation is not atomic w.r.t. page cache, we do sync_fs() but don't block buffered writes - other niggling page cache stuff - need to walk page cache and mark blocks as no longer reserved on snapshot creation - we no longer have quota support, since old style quotas interact badly with snapshots - we need per subvolume disk space accounting before i can implement btrfs style subvolume quotas - all the things I neglected to think of yet, and all the bugs I haven't found yet Go wild, please try and break it.