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

subvol set-default: also accept path #35

Closed
kdave opened this issue Mar 24, 2017 · 2 comments
Closed

subvol set-default: also accept path #35

kdave opened this issue Mar 24, 2017 · 2 comments

Comments

@kdave
Copy link
Owner

@kdave kdave commented Mar 24, 2017

User request to make the following a convenience shortcut (instead of
resolving the subvol id):

btrfs subvolume set-default /path/to/subvol
  • ambiguity must be resolved: if there's a subvolume-by-name with a number
    that's also an existing subvol-by-id
@kdave kdave added the enhancement label Mar 27, 2017
@kdave kdave added this to TODO in Enhancements May 3, 2017
kdave added a commit that referenced this issue Oct 17, 2017
This patch changes "subvol set-default" to also accept the subvolume path
for convenience.

If there are two args, they are assumed as subvol id and path to the fs
(the same as current behavior), and if there is only one arg, it is assumed
as the path to the subvolume.

subvol id is resolved by test_issubvolume() + lookup_path_rootid().
The empty subvol (ino == 2) will get error on test_issubvolume() which
checks whether inode num is 256 or not.

Issue: #35
Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
[ update documentation, use the new multi-line command scheme ]
Signed-off-by: David Sterba <dsterba@suse.com>
@kdave kdave moved this from TODO to DONE in Enhancements Oct 17, 2017
@kdave kdave added test:ok and removed test:needed labels Oct 27, 2017
@kdave kdave added this to the v4.14 milestone Oct 27, 2017
@kdave
Copy link
Owner Author

@kdave kdave commented Oct 27, 2017

The ambiguity with name and number is nonsense, the syntax makes it clear which one is used.

@kdave kdave added doc:ok and removed doc:needed labels Oct 27, 2017
@kdave kdave moved this from DONE to READY in Enhancements Nov 14, 2017
kdave added a commit that referenced this issue Nov 20, 2017
This patch changes "subvol set-default" to also accept the subvolume path
for convenience.

If there are two args, they are assumed as subvol id and path to the fs
(the same as current behavior), and if there is only one arg, it is assumed
as the path to the subvolume.

subvol id is resolved by test_issubvolume() + lookup_path_rootid().
The empty subvol (ino == 2) will get error on test_issubvolume() which
checks whether inode num is 256 or not.

Issue: #35
Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
[ update documentation, use the new multi-line command scheme ]
Signed-off-by: David Sterba <dsterba@suse.com>
@kdave
Copy link
Owner Author

@kdave kdave commented Nov 20, 2017

Released.

@kdave kdave closed this Nov 20, 2017
@kdave kdave removed this from READY in Enhancements Nov 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.