~ubuntu-branches/debian/stretch/lvm2/stretch

« back to all changes in this revision

Viewing changes to lib/metadata/snapshot_manip.c

  • Committer: Package Import Robot
  • Author(s): Bastian Blank
  • Date: 2014-08-19 15:37:06 UTC
  • mfrom: (30.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20140819153706-0p2sc6a53ef7xnvl
Tags: 2.02.109-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
static uint64_t _cow_extra_chunks(struct cmd_context *cmd, uint64_t n_chunks)
42
42
{
43
43
        const struct segment_type *segtype;
44
 
        unsigned attrs;
 
44
        unsigned attrs = 0;
45
45
 
46
46
        if (activation() &&
47
47
            (segtype = get_segtype_from_string(cmd, "snapshot")) &&
141
141
 
142
142
int lv_is_merging_cow(const struct logical_volume *snapshot)
143
143
{
 
144
        struct lv_segment *snap_seg = find_snapshot(snapshot);
144
145
        /* checks lv_segment's status to see if cow is merging */
145
 
        return (find_snapshot(snapshot)->status & MERGING) ? 1 : 0;
 
146
        return (snap_seg && (snap_seg->status & MERGING)) ? 1 : 0;
146
147
}
147
148
 
148
149
struct lv_segment *find_snapshot(const struct logical_volume *lv)