linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] tree reading cleanups in mount
@ 2019-10-15 15:42 Nikolay Borisov
  2019-10-15 15:42 ` [PATCH 1/8] btrfs: Cleanup and simplify find_newest_super_backup Nikolay Borisov
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Nikolay Borisov @ 2019-10-15 15:42 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

Hello, 

Here is the second version of the tree reading code which gets executed during 
mount. This goes a bit further than the previous posting in that it not only 
introduces a new function but also refactors the code which decides which backup
root to use. Overall I think the semantics are now much cleaner and centralised
in a single function - init_tree_roots rather than split between mount and 
backup root write out. 

The series starts gradually by simplifying find_newest_super_backup and its
callers (patches 1-2). 

It then paves the way forward by introducing read_backup_rooti (patch 3) which
supersedes (patch 4) next_root_backup, the latter is then removed (patch 6). While
at it I also remove the unnecessary objectid mutex during mount (patch 5). 

The final 2 patches streamlines how btrfs_fs_info::backup_root_index is being
initialised. 

This patchset has been tested by simulating (via btrfs-corrupt-block) corruption
of the primary root and resorting to using usebackuproot mount option. I've also 
added a regression test to btrfs-progs that will follow shortly. 

Nikolay Borisov (8):
  btrfs: Cleanup and simplify find_newest_super_backup
  btrfs: Remove newest_gen argument from find_oldest_super_backup
  btrfs: Add read_backup_root
  btrfs: Factor out tree roots initialization during mount
  btrfs: Don't use objectid_mutex during mount
  btrfs: Remove unused next_root_backup function
  btrfs: Rename find_oldest_super_backup to init_backup_root_slot
  btrfs: Streamline btrfs_fs_info::backup_root_index semantics

 fs/btrfs/disk-io.c | 252 ++++++++++++++++++++-------------------------
 1 file changed, 113 insertions(+), 139 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-10-29 16:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-15 15:42 [PATCH 0/8] tree reading cleanups in mount Nikolay Borisov
2019-10-15 15:42 ` [PATCH 1/8] btrfs: Cleanup and simplify find_newest_super_backup Nikolay Borisov
2019-10-17 13:56   ` David Sterba
2019-10-15 15:42 ` [PATCH 2/8] btrfs: Remove newest_gen argument from find_oldest_super_backup Nikolay Borisov
2019-10-15 15:42 ` [PATCH 3/8] btrfs: Add read_backup_root Nikolay Borisov
2019-10-15 15:42 ` [PATCH 4/8] btrfs: Factor out tree roots initialization during mount Nikolay Borisov
2019-10-15 15:42 ` [PATCH 5/8] btrfs: Don't use objectid_mutex " Nikolay Borisov
2019-10-15 15:42 ` [PATCH 6/8] btrfs: Remove unused next_root_backup function Nikolay Borisov
2019-10-15 15:42 ` [PATCH 7/8] btrfs: Rename find_oldest_super_backup to init_backup_root_slot Nikolay Borisov
2019-10-15 15:42 ` [PATCH 8/8] btrfs: Streamline btrfs_fs_info::backup_root_index semantics Nikolay Borisov
2019-10-29 16:42 ` [PATCH 0/8] tree reading cleanups in mount David Sterba

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).