linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Murphy <lists@colorremedies.com>
To: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: space_cache=v1 and v2 at the time time?
Date: Tue, 26 May 2020 20:12:10 -0600	[thread overview]
Message-ID: <CAJCQCtQVPFi7fB+p4HEVy1Gw3AjzrvQ8qcY6cRbKj3T-+7yVxA@mail.gmail.com> (raw)

What are the implications of not clearing v1 before enabling v2?

From btrfs insp dump-t, I still see the v1 bitmaps present:

root tree
leaf 6468501504 items 42 free space 9246 generation 22 owner ROOT_TREE
leaf 6468501504 flags 0x1(WRITTEN) backref revision 1
...
    item 30 key (FREE_SPACE UNTYPED 22020096) itemoff 11145 itemsize 41
        location key (256 INODE_ITEM 0)
        cache generation 17 entries 0 bitmaps 0
    item 31 key (FREE_SPACE UNTYPED 1095761920) itemoff 11104 itemsize 41
        location key (257 INODE_ITEM 0)
        cache generation 17 entries 0 bitmaps 0
...


And later the free space tree:

free space tree key (FREE_SPACE_TREE ROOT_ITEM 0)
leaf 6471073792 items 39 free space 15196 generation 22 owner FREE_SPACE_TREE
leaf 6471073792 flags 0x1(WRITTEN) backref revision 1
fs uuid 3c464210-08c7-4cf0-b175-e4b781ebea19
chunk uuid f1d18732-7c3d-401c-8637-e7d4d9c7a0b8
    item 0 key (1048576 FREE_SPACE_INFO 4194304) itemoff 16275 itemsize 8
        free space info extent count 2 flags 0
    item 1 key (1048576 FREE_SPACE_EXTENT 16384) itemoff 16275 itemsize 0
        free space extent
    item 2 key (1081344 FREE_SPACE_EXTENT 4161536) itemoff 16275 itemsize 0
        free space extent
...

I was surprised there's no warning when I use space_cache=v2 without
first clearing v1.


-- 
Chris Murphy

             reply	other threads:[~2020-05-27  2:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27  2:12 Chris Murphy [this message]
2020-05-28 21:04 ` space_cache=v1 and v2 at the time time? Hans van Kranenburg
2020-06-01 17:52   ` David Sterba
2020-06-01 20:35     ` Hans van Kranenburg

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=CAJCQCtQVPFi7fB+p4HEVy1Gw3AjzrvQ8qcY6cRbKj3T-+7yVxA@mail.gmail.com \
    --to=lists@colorremedies.com \
    --cc=linux-btrfs@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;
as well as URLs for NNTP newsgroup(s).