dm-writecache.c (ff36e78fdb251b9fa65028554689806961e011eb) dm-writecache.c (adc0daad366b62ca1bce3e2958a40b0b71a8b8b3)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2018 Red Hat. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include <linux/device-mapper.h>

--- 828 unchanged lines hidden (view full) ---

837 flush_on_suspend = wc->flush_on_suspend;
838 if (flush_on_suspend) {
839 wc->flush_on_suspend = false;
840 wc->writeback_all++;
841 queue_work(wc->writeback_wq, &wc->writeback_work);
842 }
843 wc_unlock(wc);
844
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2018 Red Hat. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include <linux/device-mapper.h>

--- 828 unchanged lines hidden (view full) ---

837 flush_on_suspend = wc->flush_on_suspend;
838 if (flush_on_suspend) {
839 wc->flush_on_suspend = false;
840 wc->writeback_all++;
841 queue_work(wc->writeback_wq, &wc->writeback_work);
842 }
843 wc_unlock(wc);
844
845 flush_workqueue(wc->writeback_wq);
845 drain_workqueue(wc->writeback_wq);
846
847 wc_lock(wc);
848 if (flush_on_suspend)
849 wc->writeback_all--;
850 while (writecache_wait_for_writeback(wc));
851
852 if (WC_MODE_PMEM(wc))
853 persistent_memory_flush_cache(wc->memory_map, wc->memory_map_size);

--- 1499 unchanged lines hidden ---
846
847 wc_lock(wc);
848 if (flush_on_suspend)
849 wc->writeback_all--;
850 while (writecache_wait_for_writeback(wc));
851
852 if (WC_MODE_PMEM(wc))
853 persistent_memory_flush_cache(wc->memory_map, wc->memory_map_size);

--- 1499 unchanged lines hidden ---