writeback.h (539d39eb27083405b82b9e604e88af01a9a46c63) writeback.h (2831231d4c3f999d2d062b23dfbc8b0faa4bc6e0)
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _BCACHE_WRITEBACK_H
3#define _BCACHE_WRITEBACK_H
4
5#define CUTOFF_WRITEBACK 40
6#define CUTOFF_WRITEBACK_SYNC 70
7
8#define MAX_WRITEBACKS_IN_PASS 5

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

19}
20
21static inline uint64_t bcache_flash_devs_sectors_dirty(struct cache_set *c)
22{
23 uint64_t i, ret = 0;
24
25 mutex_lock(&bch_register_lock);
26
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _BCACHE_WRITEBACK_H
3#define _BCACHE_WRITEBACK_H
4
5#define CUTOFF_WRITEBACK 40
6#define CUTOFF_WRITEBACK_SYNC 70
7
8#define MAX_WRITEBACKS_IN_PASS 5

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

19}
20
21static inline uint64_t bcache_flash_devs_sectors_dirty(struct cache_set *c)
22{
23 uint64_t i, ret = 0;
24
25 mutex_lock(&bch_register_lock);
26
27 for (i = 0; i < c->nr_uuids; i++) {
27 for (i = 0; i < c->devices_max_used; i++) {
28 struct bcache_device *d = c->devices[i];
29
30 if (!d || !UUID_FLASH_ONLY(&c->uuids[i]))
31 continue;
32 ret += bcache_dev_sectors_dirty(d);
33 }
34
35 mutex_unlock(&bch_register_lock);

--- 81 unchanged lines hidden ---
28 struct bcache_device *d = c->devices[i];
29
30 if (!d || !UUID_FLASH_ONLY(&c->uuids[i]))
31 continue;
32 ret += bcache_dev_sectors_dirty(d);
33 }
34
35 mutex_unlock(&bch_register_lock);

--- 81 unchanged lines hidden ---