From a551de6152436f5b7527511dac1b5a7d13fd7383 Mon Sep 17 00:00:00 2001 From: Jonathan Earl Brassow Date: Fri, 14 Oct 2011 14:21:32 +0000 Subject: [PATCH] Use a more correct macro for 'seg_is_linear' It is better to check 'seg->area_count == 1' than '!seg->stripe_size'. --- lib/metadata/segtype.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/metadata/segtype.h b/lib/metadata/segtype.h index 7a42eb199..d3ad2b252 100644 --- a/lib/metadata/segtype.h +++ b/lib/metadata/segtype.h @@ -47,7 +47,7 @@ struct dev_manager; #define seg_is_replicator(seg) ((seg)->segtype->flags & SEG_REPLICATOR ? 1 : 0) #define seg_is_replicator_dev(seg) ((seg)->segtype->flags & SEG_REPLICATOR_DEV ? 1 : 0) #define seg_is_striped(seg) ((seg)->segtype->flags & SEG_AREAS_STRIPED ? 1 : 0) -#define seg_is_linear(seg) (seg_is_striped(seg) && !(seg)->stripe_size) +#define seg_is_linear(seg) (seg_is_striped(seg) && ((seg)->area_count == 1)) #define seg_is_snapshot(seg) ((seg)->segtype->flags & SEG_SNAPSHOT ? 1 : 0) #define seg_is_virtual(seg) ((seg)->segtype->flags & SEG_VIRTUAL ? 1 : 0) #define seg_is_raid(seg) ((seg)->segtype->flags & SEG_RAID ? 1 : 0)