mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-22 06:10:06 +00:00
btrfs-progs: btrfstune: add option to enable NO_HOLES
New option -n to enable the NO_HOLES feature. Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
parent
c476696b82
commit
6a4a3acbc2
@ -24,6 +24,8 @@ Enable seeding forces a fs readonly so that you can use it to build other filesy
|
||||
Enable extended inode refs.
|
||||
-x::
|
||||
Enable skinny metadata extent refs.
|
||||
-n::
|
||||
Enable no-holes feature. More efficient representation of file holes.
|
||||
-f::
|
||||
Allow dangerous changes, e.g. clear the seeding flag or change fsid. Make sure
|
||||
that you are aware of the dangers.
|
||||
|
@ -392,6 +392,7 @@ static void print_usage(void)
|
||||
fprintf(stderr, "\t-S value\tpositive value will enable seeding, zero to disable, negative is not allowed\n");
|
||||
fprintf(stderr, "\t-r \t\tenable extended inode refs\n");
|
||||
fprintf(stderr, "\t-x \t\tenable skinny metadata extent refs\n");
|
||||
fprintf(stderr, "\t-n \t\tenable no-holes feature (more efficient sparse file representation)\n");
|
||||
fprintf(stderr, "\t-f \t\tforce to do dangerous operation, make sure that you are aware of the dangers\n");
|
||||
fprintf(stderr, "\t-u \t\tchange fsid, use a random one\n");
|
||||
fprintf(stderr, "\t-U UUID\t\tchange fsid to UUID\n");
|
||||
@ -412,7 +413,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
optind = 1;
|
||||
while(1) {
|
||||
int c = getopt(argc, argv, "S:rxfuU:");
|
||||
int c = getopt(argc, argv, "S:rxfuU:n");
|
||||
if (c < 0)
|
||||
break;
|
||||
switch(c) {
|
||||
@ -426,6 +427,9 @@ int main(int argc, char *argv[])
|
||||
case 'x':
|
||||
super_flags |= BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA;
|
||||
break;
|
||||
case 'n':
|
||||
super_flags |= BTRFS_FEATURE_INCOMPAT_NO_HOLES;
|
||||
break;
|
||||
case 'f':
|
||||
force = 1;
|
||||
break;
|
||||
|
@ -53,4 +53,5 @@ test_feature()
|
||||
|
||||
test_feature extref -r EXTENDED_IREF
|
||||
test_feature skinny-metadata -x SKINNY_METADATA
|
||||
test_feature no-holes -n NO_HOLES
|
||||
test_feature '' '-S 1' SEEDING
|
||||
|
Loading…
Reference in New Issue
Block a user