search for: cleaner_kthread

Displaying 9 results from an estimated 9 matches for "cleaner_kthread".

2009 Sep 03
2
[PATCH] Don't exist from cleaner_kthread and transaction_kthread until kthread_should_stop is true
upstream commit 2ad49887150894b9ed6a87a76b409adceee6b074 Motivated from the commit, I found that cleaner_kthread() and transaction_kthread() can result similar error since these two function can exit even though kthread_should_stop() is not true. In order to resolve the bug, break statements are changed into continue statements in order to wait until kthread_should_stop() becomes true. --- a/fs/btrfs/async...
2012 Apr 26
7
[PATCH 2/4] Btrfs: fix deadlock on sb->s_umount when doing umount
The reason the deadlock is that: Task Btrfs-cleaner umount() down_write(&s->s_umount) sync_filesystem() do auto-defragment and produce 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()
2009 Jan 19
1
[PATCH] Btrfs: check return value for kthread_run() correctly
...- diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 81a3138..f718d25 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1740,13 +1740,13 @@ struct btrfs_root *open_ctree(struct super_block *sb, fs_info->system_alloc_profile = fs_info->metadata_alloc_profile; fs_info->cleaner_kthread = kthread_run(cleaner_kthread, tree_root, "btrfs-cleaner"); - if (!fs_info->cleaner_kthread) + if (IS_ERR(fs_info->cleaner_kthread)) goto fail_csum_root; fs_info->transaction_kthread = kthread_run(transaction_kthread, tree_root, "btrfs...
2010 Apr 19
0
[PATCH 08/12] Btrfs: Introduce global metadata reservation
...ilemap_flush until - we''re under a threshold */ struct list_head list; diff -urp 8/fs/btrfs/disk-io.c 9/fs/btrfs/disk-io.c --- 8/fs/btrfs/disk-io.c 2010-04-18 10:24:51.286697000 +0800 +++ 9/fs/btrfs/disk-io.c 2010-04-18 10:47:31.056726210 +0800 @@ -1472,10 +1472,6 @@ static int cleaner_kthread(void *arg) struct btrfs_root *root = arg; do { - smp_mb(); - if (root->fs_info->closing) - break; - vfs_check_frozen(root->fs_info->sb, SB_FREEZE_WRITE); if (!(root->fs_info->sb->s_flags & MS_RDONLY) && @@ -1488,11 +1484,9 @@ static int cleaner_kth...
2012 Aug 24
4
[PATCH] Btrfs: pass lockdep rwsem metadata to async commit transaction
The freeze rwsem is taken by sb_start_intwrite() and dropped during the commit_ or end_transaction(). In the async case, that happens in a worker thread. Tell lockdep the calling thread is releasing ownership of the rwsem and the async thread is picking it up. Josef and I worked out a more complicated solution that made the async commit thread join and potentially get a later transaction, but
2012 Sep 12
2
Deadlock in btrfs-cleaner, related to snapshot deletion
....318789] [<ffffffffa00ed2b8>] btrfs_end_transaction_throttle+0x18/0x20 [btrfs] [ 386.318820] [<ffffffffa00dca03>] btrfs_drop_snapshot+0x213/0x600 [btrfs] [ 386.318857] [<ffffffffa00edae7>] btrfs_clean_old_snapshots+0xa7/0x150 [btrfs] [ 386.318890] [<ffffffffa00e57d9>] cleaner_kthread+0xa9/0x120 [btrfs] [ 386.318924] [<ffffffffa00e5730>] ? btree_invalidatepage+0x80/0x80 [btrfs] [ 386.318931] [<ffffffff8107c3f3>] kthread+0x93/0xa0 [ 386.318939] [<ffffffff816a7a84>] kernel_thread_helper+0x4/0x10 [ 386.318946] [<ffffffff8107c360>] ? flush_kthread_wor...
2013 Jun 10
1
btrfs-cleaner Blocked on xfstests 068
...e4>] schedule+0x64/0x66 [ 413.409157] [<ffffffff8110525c>] __sb_start_write+0x9a/0xf0 [ 413.409157] [<ffffffff8104e2d7>] ? remove_wait_queue+0x3a/0x3a [ 413.409157] [<ffffffffa019018e>] btrfs_run_defrag_inodes+0x20a/0x327 [btrfs] [ 413.409157] [<ffffffffa017a6c1>] cleaner_kthread+0x95/0x122 [btrfs] [ 413.409157] [<ffffffffa017a62c>] ? transaction_kthread+0x1a0/0x1a0 [btrfs] [ 413.409157] [<ffffffff8104da7c>] kthread+0xba/0xc2 [ 413.409157] [<ffffffff8104d9c2>] ? kthread_freezable_should_stop+0x52/0x52 [ 413.409157] [<ffffffff8161fd1c>] ret_fr...
2008 Sep 25
0
[PATCH 2/4] Add shared reference cache
...RFS_MULTIPLE_OBJECTIDS -255ULL @@ -539,6 +543,12 @@ struct list_head list; }; +struct btrfs_leaf_ref_tree { + struct rb_root root; + struct list_head list; + spinlock_t lock; +}; + struct btrfs_device; struct btrfs_fs_devices; struct btrfs_fs_info { @@ -637,6 +647,8 @@ struct task_struct *cleaner_kthread; int thread_pool_size; + struct btrfs_leaf_ref_tree shared_ref_tree; + struct kobject super_kobj; struct completion kobj_unregister; int do_barriers; @@ -668,13 +680,6 @@ u64 system_alloc_profile; void *bdev_holder; -}; - -struct btrfs_leaf_ref_tree { - struct rb_root root; - struct...
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...ee_space(struct btrfs_root *root, struct inode *inode, u64 bytes); void btrfs_free_reserved_data_space(struct btrfs_root *root, diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index fafd6f2..dbd2f13 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1456,7 +1456,6 @@ static int cleaner_kthread(void *arg) static int transaction_kthread(void *arg) { struct btrfs_root *root = arg; - struct btrfs_trans_handle *trans; struct btrfs_transaction *cur; unsigned long now; unsigned long delay; @@ -1485,8 +1484,7 @@ static int transaction_kthread(void *arg) goto sleep; } mutex_un...