From: Jeff Mahoney <jeffm@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <DSterba@suse.com>
Subject: Re: [PATCH 00/31] btrfs: simplify use of struct btrfs_root pointers
Date: Thu, 7 Jul 2016 22:19:37 -0400 [thread overview]
Message-ID: <27f7d3ef-3537-0f27-f485-8e52f79d22d0@suse.com> (raw)
In-Reply-To: <ad2900c1-b7d6-6fe0-f455-06e936355cc6@suse.com>
[-- Attachment #1.1: Type: text/plain, Size: 1538 bytes --]
On 7/7/16 9:48 PM, Jeff Mahoney wrote:
> On 6/24/16 6:14 PM, jeffm@suse.com wrote:
>> From: Jeff Mahoney <jeffm@suse.com>
>>
>> One of the common complaints I've heard from new and experienced
>> developers alike about the btrfs code is the ubiquity of
>> struct btrfs_root. There is one for every tree on disk and it's not
>> always obvious which root is needed in a particular call path. It can
>> be frustrating to spend time figuring out which root is required only
>> to discover that it's not actually used for anything other than
>> getting the fs-global struct btrfs_fs_info.
>>
>> The patchset contains several sections.
>>
>> 1) The fsid trace event patchset I posted earlier; I can rebase without this
>> but I'd prefer not to.
>>
>> 2) Converting btrfs_test_opt and friends to use an fs_info.
>>
>> 3) Converting tests to use an fs_info pointer whenever a root is used.
>>
>> 4) Moving sectorsize and nodesize to fs_info and cleaning up the
>> macros used to access them.
>
> This change was a little overzealous in free-space-cache.c, which hit
> block_group->sectorsize as well as root->sectorsize by accident. While
> the change is fine for general btrfs usage, it breaks the sanity tests
> since dummy block groups now depend on a dummy fs_info as well.
There's also another error in btrfs_alloc_dummy_fs_info that doesn't
initialize sectorsize.
Clearly my test config got CONFIG_BTRFS_FS_RUN_SANITY_TESTS disabled at
some point. :(
-Jeff
--
Jeff Mahoney
SUSE Labs
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 881 bytes --]
next prev parent reply other threads:[~2016-07-08 2:19 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-24 22:14 [PATCH 00/31] btrfs: simplify use of struct btrfs_root pointers jeffm
2016-06-24 22:14 ` [PATCH 01/31] btrfs: plumb fs_info into btrfs_work jeffm
2016-06-24 22:14 ` [PATCH 02/31] btrfs: prefix fsid to all trace events jeffm
2016-06-27 1:50 ` Qu Wenruo
2016-06-24 22:14 ` [PATCH 03/31] btrfs: btrfs_test_opt and friends should take a btrfs_fs_info jeffm
2016-06-27 2:14 ` Qu Wenruo
2016-06-27 2:21 ` Jeff Mahoney
2016-06-27 2:24 ` Qu Wenruo
2016-06-24 22:14 ` [PATCH 04/31] btrfs: tests, move initialization into tests/ jeffm
2016-06-27 2:17 ` Qu Wenruo
2016-06-27 2:28 ` Jeff Mahoney
2016-06-24 22:14 ` [PATCH 05/31] btrfs: tests, require fs_info for root jeffm
2016-07-08 1:32 ` Jeff Mahoney
2016-07-08 11:20 ` David Sterba
2016-06-24 22:14 ` [PATCH 06/31] btrfs: tests, use BTRFS_FS_STATE_DUMMY_FS_INFO instead of dummy root jeffm
2016-06-24 22:15 ` [PATCH 07/31] btrfs: simpilify btrfs_subvol_inherit_props jeffm
2016-06-24 22:15 ` [PATCH 08/31] btrfs: copy_to_sk drop unused root parameter jeffm
2016-06-24 22:15 ` [PATCH 09/31] btrfs: cleanup, remove prototype for btrfs_find_root_ref jeffm
2016-06-24 22:15 ` [PATCH 10/31] btrfs: introduce BTRFS_MAX_ITEM_SIZE jeffm
2016-06-24 22:15 ` [PATCH 11/31] btrfs: convert nodesize macros to static inlines jeffm
2016-06-24 22:15 ` [PATCH 12/31] btrfs: btrfs_relocate_chunk pass extent_root to btrfs_end_transaction jeffm
2016-06-24 22:15 ` [PATCH 13/31] btrfs: add btrfs_trans_handle->fs_info pointer jeffm
2016-06-24 22:15 ` [PATCH 14/31] btrfs: btrfs_abort_transaction, drop root parameter jeffm
2016-06-24 22:15 ` [PATCH 15/31] btrfs: call functions that overwrite their root parameter with fs_info jeffm
2016-09-06 17:40 ` David Sterba
2016-06-24 22:15 ` [PATCH 16/31] btrfs: call functions that always use the same root with fs_info instead jeffm
2016-06-24 22:15 ` [PATCH 17/31] btrfs: btrfs_init_new_device should use fs_info->dev_root jeffm
2016-06-24 22:15 ` [PATCH 18/31] btrfs: alloc_reserved_file_extent trace point should use extent_root jeffm
2016-06-24 22:15 ` [PATCH 19/31] btrfs: struct btrfsic_state->root should be an fs_info jeffm
2016-06-24 22:15 ` [PATCH 20/31] btrfs: struct reada_control.root -> reada_control.fs_info jeffm
2016-06-24 22:15 ` [PATCH 21/31] btrfs: root->fs_info cleanup, use fs_info->dev_root everywhere jeffm
2016-06-24 22:15 ` [PATCH 22/31] btrfs: root->fs_info cleanup, io_ctl_init jeffm
2016-06-24 22:15 ` [PATCH 24/31] btrfs: root->fs_info cleanup, btrfs_calc_{trans,trunc}_metadata_size jeffm
2016-06-24 22:15 ` [PATCH 25/31] btrfs: root->fs_info cleanup, lock/unlock_chunks jeffm
2016-06-24 22:15 ` [PATCH 26/31] btrfs: root->fs_info cleanup, update_block_group{,flags} jeffm
2016-06-24 22:15 ` [PATCH 28/31] btrfs: root->fs_info cleanup, access fs_info->delayed_root directly jeffm
2016-06-24 22:15 ` [PATCH 30/31] btrfs: root->fs_info cleanup, btrfs_commit_transaction already has root jeffm
2016-06-24 22:15 ` [PATCH 31/31] btrfs: root->fs_info cleanup, btrfs_end_transaction{,_throttle} use trans->fs_info instead of parameter jeffm
2016-06-26 13:50 ` [PATCH 00/31] btrfs: simplify use of struct btrfs_root pointers Jeff Mahoney
2016-06-27 1:34 ` Qu Wenruo
2016-07-07 14:07 ` David Sterba
2016-07-08 1:48 ` Jeff Mahoney
2016-07-08 2:19 ` Jeff Mahoney [this message]
2016-07-08 12:50 ` David Sterba
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=27f7d3ef-3537-0f27-f485-8e52f79d22d0@suse.com \
--to=jeffm@suse.com \
--cc=DSterba@suse.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).