Skip to contentSkip to conversation

New: ext4_get_blocks may be called while ext4_truncate() is in progress

Bug 15827 [email protected] 1 participant 2 messages Apr 21, 2010 – Jul 6, 2010

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=15827

Summary: ext4_get_blocks may be called while ext4_truncate()
is in progress
Product: File System
Version: 2.5
Kernel Version: v2.6.29-rc5
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: high
Priority: P1
Component: ext4
AssignedTo: [email protected]
ReportedBy: [email protected]
Regression: No

Created an attachment (id=26081)
--> (https://bugzilla.kernel.org/attachment.cgi?id=26081)
dmesg output

During truncate we may need to restart new transaction, to avoid deadlock on i_data_sem it was dropped
commit 487caeef9fc08c0565e082c40a8aaf58dad92bbb

Author: Jan Kara <[email protected]>
Date:   Mon Aug 17 22:17:20 2009 -0400

Jan given a good explanation why this approach would work, I have better explanation why this can't work work.
Yes we have blocked all writers beyond i_size, but writers(flush, page_mkwrite) before i_size still may change node blocks, so 'path' which was lookup by truncate is not longer valid. So we are in big big troubles.

I've add created inode's history tracer patch which spotted the issue. See attachments.

--- Comment #1 from Dmitry Monakhov <[email protected]> 2010-04-21 15:41:13 --- Created an attachment (id=26082)
--> (https://bugzilla.kernel.org/attachment.cgi?id=26082)
debug patch against ext4.git/next + patches from bug #15792

The debug patch is rather ugly, but still useful.

Signature · 3 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
#1 lore raw

[Bug 15827] ext4_get_blocks may be called while ext4_truncate() is in progress

https://bugzilla.kernel.org/show_bug.cgi?id=15827

Dmitry Monakhov <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|                            |CODE_FIX
Signature · 3 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.