From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com ([74.125.82.46]:36686 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752826AbcGUPf6 (ORCPT ); Thu, 21 Jul 2016 11:35:58 -0400 Received: by mail-wm0-f46.google.com with SMTP id q128so26009821wma.1 for ; Thu, 21 Jul 2016 08:35:57 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <56C7BB16-91D2-42AB-B81A-33403CAFE0ED@gmail.com> <9d52a64a-eb5a-e626-2c62-2ff9bede2eef@friedels.name> <0e3dfcb6-c635-5904-9e97-1aa11a84dcd4@friedels.name> From: Patrik Lundquist Date: Thu, 21 Jul 2016 17:35:37 +0200 Message-ID: Subject: Re: Status of SMR with BTRFS To: Chris Murphy Cc: "Austin S. Hemmelgarn" , Hendrik Friedel , Tomasz Kusmierz , Btrfs BTRFS , dave@jikos.cz Content-Type: text/plain; charset=UTF-8 Sender: linux-btrfs-owner@vger.kernel.org List-ID: On 21 July 2016 at 15:34, Chris Murphy wrote: > > Do programs have a way to communicate what portion of a data file is > modified, so that only changed blocks are COW'd? When I change a > single pixel in a 400MiB image and do a save (to overwrite the > original file), it takes just as long to overwrite as to write it out > as a new file. It'd be neat if that could be optimized but I don't see > it being the case at the moment. Programs can choose to seek within a file and only overwrite changed parts, like BitTorrent (use NOCOW or defrag files like that). Paint programs usually compress the changed image on save, so most of the file is changed anyway. But if it's a raw image file just writing the changed pixels should work, but that would require a comparison with the original image (or a for pixel change history) so I doubt anyone cares to implement it at the application level.