This repository has been archived by the owner on Jan 6, 2020. It is now read-only.
forked from 150balbes/Jetson-Nano
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To make background writeback aware of raid5/6 stripes, we first need to track the amount of dirty data within each stripe - we do this by breaking up the existing sectors_dirty into per stripe atomic_ts Signed-off-by: Kent Overstreet <koverstreet@google.com>
- Loading branch information
Kent Overstreet
committed
Jun 27, 2013
1 parent
444fc0b
commit 279afba
Showing
7 changed files
with
105 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef _BCACHE_WRITEBACK_H | ||
#define _BCACHE_WRITEBACK_H | ||
|
||
static inline uint64_t bcache_dev_sectors_dirty(struct bcache_device *d) | ||
{ | ||
uint64_t i, ret = 0; | ||
|
||
for (i = 0; i < d->nr_stripes; i++) | ||
ret += atomic_read(d->stripe_sectors_dirty + i); | ||
|
||
return ret; | ||
} | ||
|
||
void bcache_dev_sectors_dirty_add(struct cache_set *, unsigned, uint64_t, int); | ||
void bch_writeback_queue(struct cached_dev *); | ||
void bch_writeback_add(struct cached_dev *); | ||
|
||
void bch_sectors_dirty_init(struct cached_dev *dc); | ||
void bch_cached_dev_writeback_init(struct cached_dev *); | ||
|
||
#endif |