[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <bug-15827-13602@https.bugzilla.kernel.org/>
Date: Thu, 22 Apr 2010 04:36:14 GMT
From: bugzilla-daemon@...zilla.kernel.org
To: linux-ext4@...r.kernel.org
Subject: [Bug 15827] New: ext4_get_blocks may be called while
ext4_truncate() is in progress
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: fs_ext4@...nel-bugs.osdl.org
ReportedBy: dmonakhov@...nvz.org
CC: jack@...e.cz, dmonakhov@...nvz.org
Regression: No
Dmitry Monakhov <dmonakhov@...nvz.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dmonakhov@...nvz.org
CC| |jack@...e.cz
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 <jack@...e.cz>
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 <dmonakhov@...nvz.org> 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.
--- Comment #2 from Dmitry Monakhov <dmonakhov@...nvz.org> 2010-04-21 15:55:15 ---
in given example both alloc and truncate tasks try to modify same path
path: 218:[1]33:108506
So ext4_ext_rm_leaf goes crazy because leaf node was modified.
Possible solutions:
1) Truncate_task: Drop path collected if ext4_ext_truncate_extend_restart
result in journal_restart, ant retry lookup.
2) Save current truncate path some where in inode, so get_block may check
about conflicts and to let truncate task to know that path is no longer
valid.
If so truncate task must goes back to (1).
--- Comment #3 from Dmitry Monakhov <dmonakhov@...nvz.org> 2010-04-22 04:36:10 ---
Proposed patch
http://patchwork.ozlabs.org/patch/50687/
BTW IMHO it is also reasonable to replace simple
printk("strange request..") to something more scary
like EXT4_ERROR_INODE(inode, "strange request..")
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists