diff options
author | Alasdair Kergon <agk@redhat.com> | 2011-01-12 20:42:50 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2011-01-12 20:42:50 +0000 |
commit | a8de276520b7b4cc252fb12be1714d5008180fd2 (patch) | |
tree | d15ba09807b64500b75ff3923f9500f1388056ee /daemons | |
parent | fd1aaee33f60cbddfb74d9e64b261257fe9e710f (diff) | |
download | lvm2-a8de276520b7b4cc252fb12be1714d5008180fd2.tar.gz lvm2-a8de276520b7b4cc252fb12be1714d5008180fd2.tar.xz lvm2-a8de276520b7b4cc252fb12be1714d5008180fd2.zip |
Replace fs_unlock by sync_local_dev_names to notify local clvmd. (2.02.80)
Introduce sync_local_dev_names and CLVMD_CMD_SYNC_NAMES to issue fs_unlock.
Diffstat (limited to 'daemons')
-rw-r--r-- | daemons/clvmd/clvm.h | 1 | ||||
-rw-r--r-- | daemons/clvmd/clvmd-command.c | 6 | ||||
-rw-r--r-- | daemons/clvmd/lvm-functions.c | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/daemons/clvmd/clvm.h b/daemons/clvmd/clvm.h index c9ea10c4..8922a19c 100644 --- a/daemons/clvmd/clvm.h +++ b/daemons/clvmd/clvm.h @@ -71,4 +71,5 @@ static const char CLVMD_SOCKNAME[]= DEFAULT_RUN_DIR "/clvmd.sock"; #define CLVMD_CMD_SET_DEBUG 42 #define CLVMD_CMD_VG_BACKUP 43 #define CLVMD_CMD_RESTART 44 +#define CLVMD_CMD_SYNC_NAMES 45 #endif diff --git a/daemons/clvmd/clvmd-command.c b/daemons/clvmd/clvmd-command.c index bd6f348f..eee5bc3e 100644 --- a/daemons/clvmd/clvmd-command.c +++ b/daemons/clvmd/clvmd-command.c @@ -139,6 +139,10 @@ int do_command(struct local_client *client, struct clvm_header *msg, int msglen, do_refresh_cache(); break; + case CLVMD_CMD_SYNC_NAMES: + lvm_do_fs_unlock(); + break; + case CLVMD_CMD_SET_DEBUG: debug = args[0]; break; @@ -275,6 +279,7 @@ int do_pre_command(struct local_client *client) case CLVMD_CMD_GET_CLUSTERNAME: case CLVMD_CMD_SET_DEBUG: case CLVMD_CMD_VG_BACKUP: + case CLVMD_CMD_SYNC_NAMES: case CLVMD_CMD_LOCK_QUERY: case CLVMD_CMD_RESTART: break; @@ -307,6 +312,7 @@ int do_post_command(struct local_client *client) case CLVMD_CMD_LOCK_VG: case CLVMD_CMD_VG_BACKUP: + case CLVMD_CMD_SYNC_NAMES: case CLVMD_CMD_LOCK_QUERY: /* Nothing to do here */ break; diff --git a/daemons/clvmd/lvm-functions.c b/daemons/clvmd/lvm-functions.c index cba6f445..f06657d9 100644 --- a/daemons/clvmd/lvm-functions.c +++ b/daemons/clvmd/lvm-functions.c @@ -897,6 +897,7 @@ struct dm_hash_node *get_next_excl_lock(struct dm_hash_node *v, char **name) void lvm_do_fs_unlock(void) { pthread_mutex_lock(&lvm_lock); + DEBUGLOG("Syncing device names\n"); fs_unlock(); pthread_mutex_unlock(&lvm_lock); } |