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

« back to all changes in this revision

Viewing changes to lib/locking/no_locking.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:
37
37
                             uint32_t flags, struct logical_volume *lv)
38
38
{
39
39
        switch (flags & LCK_SCOPE_MASK) {
 
40
        case LCK_ACTIVATION:
 
41
                break;
40
42
        case LCK_VG:
41
43
                if (!strcmp(resource, VG_SYNC_NAMES))
42
44
                        fs_unlock();
91
93
        return _no_lock_resource(cmd, resource, flags, lv);
92
94
}
93
95
 
94
 
int init_no_locking(struct locking_type *locking, struct cmd_context *cmd __attribute__((unused)),
 
96
void init_no_locking(struct locking_type *locking, struct cmd_context *cmd __attribute__((unused)),
95
97
                    int suppress_messages)
96
98
{
97
99
        locking->lock_resource = _no_lock_resource;
99
101
        locking->reset_locking = _no_reset_locking;
100
102
        locking->fin_locking = _no_fin_locking;
101
103
        locking->flags = LCK_CLUSTERED;
102
 
 
103
 
        return 1;
104
104
}
105
105
 
106
106
int init_readonly_locking(struct locking_type *locking, struct cmd_context *cmd __attribute__((unused)),
114
114
 
115
115
        return 1;
116
116
}
 
117
 
 
118
void init_dummy_locking(struct locking_type *locking, struct cmd_context *cmd __attribute__((unused)),
 
119
                    int suppress_messages)
 
120
{
 
121
        locking->lock_resource = _readonly_lock_resource;
 
122
        locking->query_resource = _no_query_resource;
 
123
        locking->reset_locking = _no_reset_locking;
 
124
        locking->fin_locking = _no_fin_locking;
 
125
        locking->flags = LCK_CLUSTERED;
 
126
}