diff options
author | Pavel Kretov <firegurafiku@gmail.com> | 2017-10-25 01:47:45 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-11-14 15:59:00 +0100 |
commit | a624f1616731da6113ab9c6613be733ab41e664b (patch) | |
tree | d41c18a5f00ba63e3d22901b7154c869b8a551d0 /cmds-filesystem.c | |
parent | ea085932dc7ef0dfebf09455c347c72b6bffad95 (diff) |
btrfs-progs: defrag: add a brief warning about ref-link breakage
There is a warning in btrfs-filesystem(8) saying that running 'defrag'
in Linux will almost certainly break ref-links, with much data potentially
being physically duplicated.
However, many users tend to read man pages *after* trying to run things
on their own risk and may miss this important information. This commit
adds a brief copy of this warning into the command built-in help message
where it has good chances to be spotted before user is stuck with
a crowded filesystem.
Pull-request: #73
Signed-off-by: Pavel Kretov <firegurafiku@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-filesystem.c')
-rw-r--r-- | cmds-filesystem.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmds-filesystem.c b/cmds-filesystem.c index c39f2d15..46aa4973 100644 --- a/cmds-filesystem.c +++ b/cmds-filesystem.c @@ -893,6 +893,11 @@ static const char * const cmd_filesystem_defrag_usage[] = { "-s start defragment only from byte onward", "-l len defragment only up to len bytes", "-t size target extent size hint (default: 32M)", + "", + "Warning: most Linux kernels will break up the ref-links of COW data", + "(e.g., files copied with 'cp --reflink', snapshots) which may cause", + "considerable increase of space usage. See btrfs-filesystem(8) for", + "more information.", NULL }; |