[ext2resize] Re: Deadlock help
Status: Inactive
Brought to you by:
adilger
From: Robert W. <rj...@du...> - 2002-10-02 20:42:50
|
[ Andreas: just for context - I was getting an oops while doing I/O on a filesystem that was being resized. ] > Is this ext3? Probably you have someone doing a journal_start() > while holding the superblock lock. That's the wrong order. That was it. The resize code does a lock_super/unlock_super around the two resize entry points in ioctl.c and calls journal_start/journal_stop in several places while doing the resize. This was causing the oops while doing I/O and resizing simultaneously. Since I don't know when the superblock actually really needs to be locked, I err'd on the side of caution and put an unlock_super/lock_super around each call to journal_start and journal_stop. This seemed to make the problem go away but it's a lot of locking/unlocking to be going on. Is it really necessary for the resize code to hold onto the superblock locks for such a long length of time? Would it be possible to minimize the amount of locking needed here? I can create a new patch with the fix, but if there's a better way of doing this, I'd like to wait... Regards, Robert.=20 --=20 Robert Walsh Amalgamated Durables, Inc. - "We don't make the things you buy." Email: rj...@du... |