Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Btrfs support in filesystem plugin #595

Merged

Conversation

vojtechtrefny
Copy link
Member

First two commits are from #583 and #585.

The idea here is to provide functions for users that want to use btrfs as a filesystem and not as a volume manager. This implementation also uses only the command line tools so there are no compile time dependencies (as opposed to the btrfs plugin which we plan to rewrite to use libbtrfsutil library, see #552).

Few highlights:

  • resize and get_info functions will fail when called on filesystem that is part of a multidevice btrfs volume. This is indented and we want users to use btrfs plugin for these. Other functions do not check number of btrfs devices and should generally work, but we'll encourage people to not use these on multidevice btrfs volumes.
  • Some functions (resize, set_label...) take moutpoint as an argument and not the device. We already do this for some xfs functions and it probably makes more sense than taking device that must be mounted. The generic functions for resize and other actions that require the device to be mounted will temporarily mount the device if necessary.

Copy link
Member

@tbzatek tbzatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indented -> intended

Needs some work...

src/lib/plugin_apis/fs.api Outdated Show resolved Hide resolved
src/lib/plugin_apis/fs.api Outdated Show resolved Hide resolved
src/lib/plugin_apis/fs.api Outdated Show resolved Hide resolved
src/lib/plugin_apis/fs.api Outdated Show resolved Hide resolved
src/lib/plugin_apis/fs.api Outdated Show resolved Hide resolved
src/lib/plugin_apis/fs.api Outdated Show resolved Hide resolved
GError *local_error = NULL;
BDFSBtrfsInfo* btrfs_info = NULL;

mountpoint = fs_mount (device, "btrfs", &unmount, error);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hint: we should be using separate mount namespace for this, someday.

src/plugins/fs/generic.c Show resolved Hide resolved
Copy link
Member

@tbzatek tbzatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go, don't forget to reorder the mkfs extra options...

@vojtechtrefny
Copy link
Member Author

Rebased to latest master and removed the UDF commit. UDF PR needs to be fixed so we can merge this first.

This is intended for use case where btrfs is used as a "normal"
filesystem on a single device and not as a "volume manager".
We need bigger devices for Btrfs which needs at least 256 MiB.
@vojtechtrefny vojtechtrefny merged commit 0bc3006 into storaged-project:master Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants