Bug 22302
Summary: | 2.6.36 BUG: scheduling while atomic: rc.sysinit/1376/0x00000002 | ||
---|---|---|---|
Product: | File System | Reporter: | Maciej Rutecki (maciej.rutecki) |
Component: | ext4 | Assignee: | fs_ext4 (fs_ext4) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | florian, maciej.rutecki, mathias.buren, rjw, tytso |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.36 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Bug Depends on: | |||
Bug Blocks: | 16444 |
Description
Maciej Rutecki
2010-11-07 08:18:56 UTC
This is caused by an interaction in two changes that happened in parallel in 2.6.36: commit id's dd3932eddf4 (block: remove BLKDEV_IFL_WAIT) and commit 5c521830cf3 (ext4: Support discard requests when running in no-journal mode). The problem is that ext4_free_blocks() can be called by functions which are holding spinlocks, so it can't sleep --- and sb_issue_discard() now always waits for the discard to be completed. It doesn't support an asynchronous mode at all. The fix for the short-term is to remove the call to ext4_issue_discard() in ext4_free_blocks(). This effectively removes the functionality of commit 5c521830cf3. The long-term fix would be to implement a version of sb_issue_discard() which supports asynchronous mode, with an optional callback. Fixed by: commit b56ff9d397cecdaad6c98c9d57cc6fea475e1f50 Author: Theodore Ts'o <tytso@mit.edu> Date: Mon Nov 8 13:49:33 2010 -0500 ext4: Don't call sb_issue_discard() in ext4_free_blocks() |