linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Userspace support for FSID change
@ 2018-08-29  8:35 Nikolay Borisov
  2018-08-29  8:35 ` [PATCH 1/4] btrfs-progs: Add support for metadata_uuid field Nikolay Borisov
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Nikolay Borisov @ 2018-08-29  8:35 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

Here is the userspace tooling support for utilising the new metadata_uuid field, 
enabling the change of fsid without having to rewrite every metadata block. This
patchset consists of adding support for the new field to various tools and 
files (Patch 1). The actual implementation of the new -m|-M options (which are 
described in more detail in Patch 2). A new misc-tests testcasei (Patch 3) which
exercises the new options and verifies certain invariants hold (these are also
described in Patch2). Patch 4 is more or less copy of the kernel conuterpart 
just reducing some duplication between btrfs_fs_info and btrfs_fs_devices 
structures. 

The intended usecase of this feature is to give the sysadmin the ability to 
create copies of filesystesm, change their uuid quickly and mount them alongside
the original filesystem for, say, forensic purposes. 

One thing which still hasn't been set in stone is whether the new options 
will remain as -m|-M or whether they should subsume the current -u|-U - from 
the point of view of users nothing should change. So this is something which 
I'd like to hear from the community. Of course the alternative of rewriting 
the metadata blocks will be assigne new options - perhaps -m|M ?

I've tested this with multiple xfstest runs with the new tools installed as 
well as running btrfs-progs test and have observed no regressions. 

Nikolay Borisov (4):
  btrfs-progs: Add support for metadata_uuid field.
  btrfstune: Add support for changing the user uuid
  btrfs-progs: tests: Add tests for changing fsid feature
  btrfs-progs: Remove fsid/metdata_uuid fields from fs_info

 btrfstune.c                                | 174 ++++++++++++++++++++++++-----
 check/main.c                               |   2 +-
 chunk-recover.c                            |  17 ++-
 cmds-filesystem.c                          |   2 +
 cmds-inspect-dump-super.c                  |  22 +++-
 convert/common.c                           |   2 +
 ctree.c                                    |  15 +--
 ctree.h                                    |   8 +-
 disk-io.c                                  |  62 ++++++++--
 image/main.c                               |  25 +++--
 tests/misc-tests/033-metadata-uuid/test.sh | 137 +++++++++++++++++++++++
 volumes.c                                  |  37 ++++--
 volumes.h                                  |   1 +
 13 files changed, 431 insertions(+), 73 deletions(-)
 create mode 100755 tests/misc-tests/033-metadata-uuid/test.sh

-- 
2.7.4

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

end of thread, other threads:[~2018-09-03  4:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-29  8:35 [PATCH 0/4] Userspace support for FSID change Nikolay Borisov
2018-08-29  8:35 ` [PATCH 1/4] btrfs-progs: Add support for metadata_uuid field Nikolay Borisov
2018-08-29  8:35 ` [PATCH 2/4] btrfstune: Add support for changing the user uuid Nikolay Borisov
2018-08-29  8:35 ` [PATCH 3/4] btrfs-progs: tests: Add tests for changing fsid feature Nikolay Borisov
2018-08-29  8:35 ` [PATCH 4/4] btrfs-progs: Remove fsid/metdata_uuid fields from fs_info Nikolay Borisov
2018-08-29 12:09 ` [PATCH 0/4] Userspace support for FSID change Qu Wenruo
2018-08-29 12:33   ` Nikolay Borisov
2018-08-29 12:43     ` Austin S. Hemmelgarn
2018-08-29 12:47     ` Qu Wenruo
2018-09-02  9:56       ` Nikolay Borisov
2018-09-02 23:50         ` Qu Wenruo

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