From 540b379902dbc9e317548164026340181424d3d5 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Fri, 23 Sep 2005 16:22:17 +0000 Subject: [PATCH] Don't hide snapshots from default 'lvs' output. --- WHATS_NEW | 1 + lib/report/report.c | 3 ++- tools/reporter.c | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 822477872..95d7ec454 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.01.15 - ================================= + Don't hide snapshots from default 'lvs' output. Add is_dm_major() for use in duplicate device detection in lvmcache_add(). Really switch device number in lvmcache when it says it is doing so. Option for bitset memory allocation using malloc as well as pool. diff --git a/lib/report/report.c b/lib/report/report.c index f0e2b78dc..d4f6129f5 100644 --- a/lib/report/report.c +++ b/lib/report/report.c @@ -524,7 +524,8 @@ static int _lvname_disp(struct report_handle *rh, struct field *field, char *repstr; size_t len; - if (lv->status & VISIBLE_LV) { + /* FIXME Remove need for snapshot special case */ + if (lv->status & VISIBLE_LV || lv_is_cow(lv)) { repstr = lv->name; return _string_disp(rh, field, &repstr); } diff --git a/tools/reporter.c b/tools/reporter.c index 2cc172ac6..4cee509cc 100644 --- a/tools/reporter.c +++ b/tools/reporter.c @@ -35,7 +35,9 @@ static int _vgs_single(struct cmd_context *cmd, const char *vg_name, static int _lvs_single(struct cmd_context *cmd, struct logical_volume *lv, void *handle) { - if (!arg_count(cmd, all_ARG) && !(lv->status & VISIBLE_LV)) + /* FIXME Avoid snapshot special-case */ + if (!arg_count(cmd, all_ARG) && !(lv->status & VISIBLE_LV) && + !(lv_is_cow(lv))) return ECMD_PROCESSED; if (!report_object(handle, lv->vg, lv, NULL, NULL, NULL))