History

Add new functions for triggering inode writeback

When btrfs is running low on metadata space, it needs to force delayed allocation pages to disk. It currently does this with a suboptimal walk of a private list of inodes with delayed allocation, and it would be much better if we used the generic flusher threads. writeback_inodes_sb_if_idle would be ideal, but it waits for the flusher thread to start IO on all the dirty pages in the FS before it returns. This adds variants of writeback_inodes_sb* that allow the caller to control how many pages get sent down.

Chris Mason committed 16 years ago

Commit 3259f8b1 parent cb449212 files · +44 −10Browse files

Showing the changes to include (1 of 2 files). Show all

Unified · Split

include/linux/writeback.h+2−0
@@ -60,7 +60,9 @@ struct writeback_control { · 59 unmodified lines
6060 struct bdi_writeback;
6161 int inode_wait(void *);
6262 void writeback_inodes_sb(struct super_block *);
63+void writeback_inodes_sb_nr(struct super_block *, unsigned long nr);
6364 int writeback_inodes_sb_if_idle(struct super_block *);
65+int writeback_inodes_sb_nr_if_idle(struct super_block *, unsigned long nr);
6466 void sync_inodes_sb(struct super_block *);
6567 void writeback_inodes_wb(struct bdi_writeback *wb,
6668 struct writeback_control *wbc);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t