3 Jan 2012 20:46
[PATCH] rmcp: print sensible error message on permission failure
When running as non-root, the error message seems to indicate a
checkpoint is a snapshot, rather than the actual problem, which is that
I do not have permission to delete the checkpoints.
Before:
$ rmcp 29..35
rmcp: 29: cannot remove snapshot
rmcp: 30: cannot remove snapshot
rmcp: 31: cannot remove snapshot
rmcp: 32: cannot remove snapshot
rmcp: 33: cannot remove snapshot
rmcp: 34: cannot remove snapshot
rmcp: 35: cannot remove snapshot
To delete snapshot(s), change them into checkpoints with
chcp command before removal.
After:
$ ./bin/rmcp 29..35
lt-rmcp: 29: cannot remove checkpoint: Operation not permitted
Remaining checkpoints were not removed.
Since May 2009 the kernel has returned EBUSY instead of EPERM for
removal requests against snapshots, commit 30c25be71fcbd87fd. We should
be able to treat EPERM as expected now, as the commit message there
indicates.
Signed-off-by: Dan McGee <dan@...>
---
bin/rmcp.c | 11 ++++++++---
(Continue reading)
RSS Feed