Re: "detect-zeroes=unmap" support in Btrfs?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 18 Jul 2017 16:57:10 +0500
Roman Mamedov <rm@xxxxxxxxxxx> wrote:

> if a block written consists of zeroes entirely, instead of writing zeroes to
> the backing storage, converts that into an "unmap" operation
> (FALLOC_FL_PUNCH_HOLE[1]).

BTW I found that it is very easy to "offline" process preexisting files for
this, using "fallocate -d".

       -d, --dig-holes
              Detect  and  dig  holes. Makes the file sparse in-place, without
              using extra disk space. The minimal size of the hole depends  on
              filesystem I/O block size (usually 4096 bytes). Also, when using
              this option, --keep-size is implied. If no range is specified by
              --offset and --length, then all file is analyzed for holes.

              You  can think of this as doing a "cp --sparse" and renaming the
              dest file as the original,  without  the  need  for  extra  disk
              space.

So my suggestion is to implement an "online" counterpart to such
forced-sparsifying, i.e. the same thing done on FS I/O in-band.
(the analogy is with offline vs in-band dedup).

-- 
With respect,
Roman
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux