|
@@ -1294,6 +1294,13 @@ static unsigned int drbd_al_extents_max(struct drbd_backing_dev *bdev)
|
|
|
return (al_size_4k - 1) * AL_CONTEXT_PER_TRANSACTION;
|
|
|
}
|
|
|
|
|
|
+static bool write_ordering_changed(struct disk_conf *a, struct disk_conf *b)
|
|
|
+{
|
|
|
+ return a->disk_barrier != b->disk_barrier ||
|
|
|
+ a->disk_flushes != b->disk_flushes ||
|
|
|
+ a->disk_drain != b->disk_drain;
|
|
|
+}
|
|
|
+
|
|
|
int drbd_adm_disk_opts(struct sk_buff *skb, struct genl_info *info)
|
|
|
{
|
|
|
struct drbd_config_context adm_ctx;
|
|
@@ -1400,7 +1407,8 @@ int drbd_adm_disk_opts(struct sk_buff *skb, struct genl_info *info)
|
|
|
else
|
|
|
set_bit(MD_NO_FUA, &device->flags);
|
|
|
|
|
|
- drbd_bump_write_ordering(device->resource, NULL, WO_bdev_flush);
|
|
|
+ if (write_ordering_changed(old_disk_conf, new_disk_conf))
|
|
|
+ drbd_bump_write_ordering(device->resource, NULL, WO_bdev_flush);
|
|
|
|
|
|
drbd_md_sync(device);
|
|
|
|