diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2011-01-20 07:25:21 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-10 05:48:01 -0500 |
commit | 62b0da3a244ac33d25a77861ef1cc0080103f2ff (patch) | |
tree | a4313df7c46ac50d751fb0798323e34a3e4efbee /drivers/block/drbd/drbd_worker.c | |
parent | d07c9c10e5620c632aae9cac2b609033398f6139 (diff) |
drbd: log UUIDs whenever they change
All decisions about sync, sync direction, and wether or not to
allow a connect or attach are based on our set of UUIDs to tag a
data generation.
Log changes to the UUIDs whenever they occur,
logging "new current UUID P:Q:R:S" is more useful
than "Creating new current UUID".
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_worker.c')
-rw-r--r-- | drivers/block/drbd/drbd_worker.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index ec42e04bb51..ff0eb308ee4 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c | |||
@@ -871,14 +871,18 @@ int drbd_resync_finished(struct drbd_conf *mdev) | |||
871 | } | 871 | } |
872 | } | 872 | } |
873 | 873 | ||
874 | drbd_uuid_set_bm(mdev, 0UL); | 874 | if (!(os.conn == C_VERIFY_S || os.conn == C_VERIFY_T)) { |
875 | 875 | /* for verify runs, we don't update uuids here, | |
876 | if (mdev->p_uuid) { | 876 | * so there would be nothing to report. */ |
877 | /* Now the two UUID sets are equal, update what we | 877 | drbd_uuid_set_bm(mdev, 0UL); |
878 | * know of the peer. */ | 878 | drbd_print_uuids(mdev, "updated UUIDs"); |
879 | int i; | 879 | if (mdev->p_uuid) { |
880 | for (i = UI_CURRENT ; i <= UI_HISTORY_END ; i++) | 880 | /* Now the two UUID sets are equal, update what we |
881 | mdev->p_uuid[i] = mdev->ldev->md.uuid[i]; | 881 | * know of the peer. */ |
882 | int i; | ||
883 | for (i = UI_CURRENT ; i <= UI_HISTORY_END ; i++) | ||
884 | mdev->p_uuid[i] = mdev->ldev->md.uuid[i]; | ||
885 | } | ||
882 | } | 886 | } |
883 | } | 887 | } |
884 | 888 | ||