Linux bcachefs list
 help / color / mirror / Atom feed
From: Demi Marie Obenour <demi@invisiblethingslab.com>
To: linux-bcachefs@vger.kernel.org
Subject: Are reflinks always O(n)?
Date: Thu, 30 Jun 2022 01:00:29 -0400	[thread overview]
Message-ID: <Yr0uBS40F87h+Lxp@itl-email> (raw)

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

In bcachefs, is creating a reflink O(n) in the size of the file, or in
the number of currently unshared extents that need to be moved into the
reflink btree?  The former would be annoying, but the latter is
proportional to the number of modifications to the file since it was
last reflinked, which is fine for my use-case so long as unlinking a
heavily reflinked file is also fast.  My reading of “bcachefs:
Principles of Operation” suggests the latter.

Basically, if a file is already reflinked, is reflinking it *again*
cheap?
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)
Invisible Things Lab

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2022-06-30  5:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30  5:00 Demi Marie Obenour [this message]
2022-07-04 14:56 ` Are reflinks always O(n)? Kent Overstreet
2022-07-04 16:03   ` Demi Marie Obenour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yr0uBS40F87h+Lxp@itl-email \
    --to=demi@invisiblethingslab.com \
    --cc=linux-bcachefs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox