search for: try_to_writeback_inodes_sb_nr

Displaying 3 results from an estimated 3 matches for "try_to_writeback_inodes_sb_nr".

2013 Jun 20
0
[PATCH] Btrfs: stop using try_to_writeback_inodes_sb_nr to flush delalloc
try_to_writeback_inodes_sb_nr returns 1 if writeback is already underway, which is completely fraking useless for us as we need to make sure pages are actually written before we go and check if there are ordered extents. So replace this with an open coding of try_to_writeback_inodes_sb_nr minus the writeback underway check so...
2012 Apr 29
0
[PATCH 1/2] vfs: re-implement writeback_inodes_sb(_nr)_if_idle() and rename them
...c int shrink_delalloc(struct btrfs_root *root, u64 to_reclaim, smp_mb(); nr_pages = min_t(unsigned long, nr_pages, root->fs_info->delalloc_bytes >> PAGE_CACHE_SHIFT); - writeback_inodes_sb_nr_if_idle(root->fs_info->sb, nr_pages, - WB_REASON_FS_FREE_SPACE); + try_to_writeback_inodes_sb_nr(root->fs_info->sb, nr_pages, + WB_REASON_FS_FREE_SPACE); spin_lock(&space_info->lock); if (reserved > space_info->bytes_may_use) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index c77b0bd..2dccb4d 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -2380,7 +...
2012 Apr 26
7
[PATCH 2/4] Btrfs: fix deadlock on sb->s_umount when doing umount
...roduce lots of dirty pages close_ctree() wait for the end of btrfs-cleaner start_transaction reserve space shrink_delalloc() writeback_inodes_sb_nr_if_idle() down_read(&sb->s_umount) So, the deadlock has happened. We fix it by using try_to_writeback_inodes_sb_nr(), this function will try to get sb->s_umount, if fail, it won''t do any writeback. At this time, In order to get enough space to reserve successfully, we will use the sync function of btrfs to sync all the delalloc file. This operation is safe, we needn''t worry about the case t...