summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_actlog.c
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2012-02-20 21:53:28 +0100
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 16:58:31 +0100
commit9a51ab1c1b3c1e21f076cdd571bbe6ca7d1b504c (patch)
tree863ba573f9a803d5f64979dae566a89ea22bbe5f /drivers/block/drbd/drbd_actlog.c
parent26ec92871be1e6bd48d0be9ab38ee1ebbeea49f1 (diff)
downloadop-kernel-dev-9a51ab1c1b3c1e21f076cdd571bbe6ca7d1b504c.zip
op-kernel-dev-9a51ab1c1b3c1e21f076cdd571bbe6ca7d1b504c.tar.gz
drbd: New disk option al-updates
By disabling al-updates one might increase performace. The price for that is that in case a crashed primary (that had al-updates disabled) is reintegraded, it will receive a full-resync instead of a bitmap based resync. 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_actlog.c')
-rw-r--r--drivers/block/drbd/drbd_actlog.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c
index 9eae289..83d48d2 100644
--- a/drivers/block/drbd/drbd_actlog.c
+++ b/drivers/block/drbd/drbd_actlog.c
@@ -276,8 +276,16 @@ void drbd_al_begin_io(struct drbd_conf *mdev, struct drbd_interval *i)
/* Double check: it may have been committed by someone else,
* while we have been waiting for the lock. */
if (mdev->act_log->pending_changes) {
- al_write_transaction(mdev);
- mdev->al_writ_cnt++;
+ bool write_al_updates;
+
+ rcu_read_lock();
+ write_al_updates = rcu_dereference(mdev->ldev->disk_conf)->al_updates;
+ rcu_read_unlock();
+
+ if (write_al_updates) {
+ al_write_transaction(mdev);
+ mdev->al_writ_cnt++;
+ }
spin_lock_irq(&mdev->al_lock);
/* FIXME
OpenPOWER on IntegriCloud