An error occurred fetching the project authors.
- 19 Oct, 2004 2 commits
-
-
Andrew Morton authored
Processes can sleep in do_get_write_access(), waiting for buffers to be removed from the BJ_Shadow state. We did this by doing a wake_up_buffer() in the commit path and sleeping on the buffer in do_get_write_access(). With the filtered bit-level wakeup code this doesn't work properly any more - the wake_up_buffer() accidentally wakes up tasks which are sleeping in lock_buffer() as well. Those tasks now implicitly assume that the buffer came unlocked. Net effect: Bogus I/O errors when reading journal blocks, because the buffer isn't up to date yet. Hence the recently spate of journal_bmap() failure reports. The patch creates a new jbd-private BH flag purely for this wakeup function. So a wake_up_bit(..., BH_Unshadow) doesn't wake up someone who is waiting for a wake_up_bit(BH_Lock). JBD was the only user of wake_up_buffer(), so remove it altogether. Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
William Lee Irwin III authored
Eliminate the bh waitqueue hashtable using bit_waitqueue() via wait_on_bit() and wake_up_bit() to locate the waitqueue head associated with a bit. Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 07 Aug, 2004 1 commit
-
-
Andrew Morton authored
Fix a race identified by Chris Mason <mason@suse.com> journal_unmap_buffer -> __dispose_buffers has the j_list_lock and the jbd_lock_bh_state held. journal_get_write_access calls journal_put_journal_head, which takes jbd_lock_bh_journal_head(bh) and doesn't seem to have any other locks held. Since journal_unmap_buffers trusts the buffer_jbd bit to see if we need to call __dispose_buffer, and nobody seems to test buffer_jbd after taking jbd_lock_bh_journal_head. The kernel dereferences a null jh pointer in __journal_remove_journal_head. The patch fixes this by using journal_grab_journal_head() in journal_unmap_buffer(). It ensures that we either grab and pin the journal_head if the bh has one, or we bale out if the bh doesn't have a journal_head. Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 02 Jul, 2004 1 commit
-
-
Andrew Morton authored
From the new Stanford locking checker Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 30 Jun, 2004 1 commit
-
-
Mika Kukkonen authored
-
- 14 May, 2004 1 commit
-
-
Andrew Morton authored
From: William Lee Irwin III <wli@holomorphy.com> This patch implements wake-one semantics for buffer_head wakeups in a single step. The buffer_head being waited on is passed to the waiter's wakeup function by the waker, and the wakeup function compares that to the a pointer stored in its on-stack structure and checking the readiness of the bit there also. Wake-one semantics are achieved by using WQ_FLAG_EXCLUSIVE in the codepaths waiting to acquire the bit for mutual exclusion.
-
- 18 Apr, 2004 1 commit
-
-
Andrew Morton authored
Reduce the locking coverage of the oft-used j_list_lock: the per-bh jbd_lock_bh_state() gives us sufficient locking of buffer_head and journal_head internals.
-
- 12 Apr, 2004 4 commits
-
-
Andrew Morton authored
Almost everywhere where JBD removes a buffer from the transaction lists the caller then nulls out jh->b_transaction. Sometimes, the caller does that without holding the locks which are defined to protect b_transaction. This makes me queazy. So change things so that __journal_unfile_buffer() nulls out b_transaction inside both j_list_lock and jbd_lock_bh_state(). It cleans things up a bit, too.
-
Andrew Morton authored
We're seeing heavy contention against j_list_lock on 8-way in do_get_write_access(). We actually don't need j_list_lock in there except for one little case - the per-bh jbd_lock_bh_state() is sufficient to protect this buffer's internal state. On some nice quick LVM array Ram Pai measured an overall 3x speedup from this patch: the script took the following time on 265mm1 real 0m57.504s user 0m0.400s sys 7m29.867s and with the 2patches it took real 0m19.983s user 0m0.438s sys 1m55.896s
-
Andrew Morton authored
ext3 transaction batching has been ineffective since the scheduler changes forced us to replace the yield() with a schedule(). Using schedule_timeout(1) fixes it up again. Benchmarking is positive with wither a 1 or 10 millisecond delay in there, so there appears to be no need to play around with HZ.
-
Andrew Morton authored
For data=ordered, kjournald at commit time has to write out and wait upon a long list of buffers. It does this in a rather awkward way with a single list. it causes complexity and long lock hold times, and makes the addition of rescheduling points quite hard So what we do instead (based on Chris Mason's suggestion) is to add a new buffer list (t_locked_list) to the journal. It contains buffers which have been placed under I/O. So as we walk the t_sync_datalist list we move buffers over to t_locked_list as they are written out. When t_sync_datalist is empty we may then walk t_locked_list waiting for the I/O to complete. As a side-effect this means that we can remove the nasty synchronous wait in journal_dirty_data which is there to avoid the kjournald livelock which would otherwise occur when someone is continuously dirtying a buffer.
-
- 19 Jan, 2004 1 commit
-
-
Andrew Morton authored
From: Alex Tomas <alex@clusterfs.com> start_this_handle() returns 0 always. because of this journal_start() may return handle with h_transaction = NULL
-
- 28 Oct, 2003 1 commit
-
-
Andrew Morton authored
The wait_event() in there can touch the memory at *transaction after kjournald has freed it. Rework the code to not wait until the transaction enters T_FLUSH state: just loop back and try against after the wakeup.
-
- 21 Sep, 2003 1 commit
-
-
Andrew Morton authored
- Remove dead declaration from elevator.h (Nick Piggin) - Fix the scheduler selection boot-time message. "Using anticipatory scheduling io scheduler" is not grammatical. - Remove last use of __SMP__ (Randy Dunlap)
-
- 07 Aug, 2003 1 commit
-
-
Andrew Morton authored
Teach journal_get_write_access() and journal_get_undo_access() to handle aborted trasaction handles.
-
- 01 Aug, 2003 1 commit
-
-
Andrew Morton authored
- remove unneeded loglevel manipulation in journal_dirty_metadata() - remove crud which was acidentally added to blkmtd.c - remove unused vars in mxser.c (Vinay K Nallamothu <vinay-rc@naturesoft.net>) - PF_LESS_THROTTLE was using the wrong bit (Joe Korty <joe.korty@ccur.com>) - unused var in cyclades.c ("Krishnakumar. R" <krishnakumar@naturesoft.net>)
-
- 18 Jul, 2003 3 commits
-
-
Alan Cox authored
(Vita Samel) maybe the set function should return the old value instead ?
-
Andrew Morton authored
From: Andreas Gruenbacher <agruen@suse.de> - Fix transaction credit exhaustion BUG. - ext3_journal_get_write_access_credits failures break out of the loop in 1058, so <ce> is not released properly. - <credits> must be reset after journal_release_buffer() in line 1072.
-
Andrew Morton authored
- i460-agp linkage fix ("Luck, Tony" <tony.luck@intel.com>) - Don't reimplement offsetof() in hfs - NBD warning fix - Remove unneeded null-pointer test in journal_stop (Andreas Gruenbacher) - remove debug stuff in journal_dirty_metadata() - slab.c typo fixes (Lev Makhlis <mlev@despammed.com>) - In devfs_mk_cdev() error path, don't print `buf' until we've written something into it. (Reported by Gergely Nagy <algernon@gandalph.mad.hu>) - Two ISA sound drivers had their kmalloc() args reversed (Spotted by Steve French)
-
- 10 Jul, 2003 1 commit
-
-
Andrew Morton authored
From: Alex Tomas <bzzz@tmi.comex.ru> Some transaction checkpointing improvements for the JBD commit phase. Decent speedups: creation of 500K files in single dir (with htree, of course): before: 4m16.094s, 4m12.035s, 4m11.911s after: 1m41.364s, 1m43.461s, 1m45.189s removal of 500K files in single dir: before: 43m50.161s after: 38m45.510s - Make __log_wait_for_space() recalculate the needed blocks because journal free space changes during commit - Make log_do_checkpoint() starts scanning from the oldest transaction - Make log_do_checkpoint() stop scanning if a transaction gets dropped. The caller will reevaluate the transaction state and decide whether more space needs to be generated in the log. The effect of this is to smooth out the I/O patterns, avoid the huge stop-and-go which currently happens when forced checkpointing writes out and waits upon 3/4 of the journal's size worth of data.
-
- 02 Jul, 2003 1 commit
-
-
Andrew Morton authored
CPU0 CPU1 journal_get_write_access(bh) (Add buffer to t_reserved_list) journal_get_write_access(bh) (It's already on t_reserved_list: nothing to do) (We decide we don't want to journal the buffer after all) journal_release_buffer() (It gets pulled off the transaction) journal_dirty_metadata() (The buffer isn't on the reserved list! The kernel explodes) Simple fix: just leave the buffer on t_reserved_list in journal_release_buffer(). If nobody ends up claiming the buffer then it will get thrown away at start of transaction commit.
-
- 20 Jun, 2003 1 commit
-
-
Andrew Morton authored
ext3 and JBD still have enormous numbers of lines which end in tabs. Fix them all up.
-
- 18 Jun, 2003 18 commits
-
-
Andrew Morton authored
Minro tweak: once log_wait_for_space() has created sufficient space in the journal to start the new handle, hang onto the spinlock as start_this_handle() loops around to reevaluate the journal's state. It prevents anyone else from zooming in and stealing the space we just made.
-
Andrew Morton authored
There are various places in which JBD is starting a commit against a transaction without sufficient locking in place to ensure that that transaction is still alive. Change it so that log_start_commit() takes a transaction ID instead. Make the caller take a copy of that ID inside the appropriate locks.
-
Andrew Morton authored
This was a flag which said "the transaction's time is active". timer_pending() could have told us that, but in fact there is no need to query it at all.
-
Andrew Morton authored
Try to trap some more state when an assertion which cannot happen happens.
-
Andrew Morton authored
Before taking the highly-taken j_list_lock, take a peek to seem if this buffer is already journalled and in the appropriate state.
-
Andrew Morton authored
There is a race between transaction commit's attempt to free journal_heads and journal_try_to_free_buffers' attempt. Fix that by taking a ref against the journal_head in journal_try_to_free_buffers().
-
Andrew Morton authored
ext3's fully data-journalled mode has been broken for a year. This patch fixes it up. The prepare_write/commit_write/writepage implementations have been split up. Instead of having each function handle all three journalling mode we now have three separate sets of address_space_operations. The problematic part of data=journal is MAP_SHARED writepage traffic: pages which don't have buffers. In 2.4 these were cheatingly treated as data-ordered buffers and that caused several nasty problems. Here we do it properly: writepage traffic is fully journalled. This means that the various workarounds for the 2.4 scheme can be removed, when I remember where they all are. The PG_checked flag has been borrowed: it it set in the atomic set_page_dirty a_op to tell the subsequent writepage() that this page needs to have buffers attached, dirtied and journalled. This rather defines PG_checked as "fs-private info in page->flags" and it should be renamed sometime.
-
Andrew Morton authored
Avoid holding the journal's j_list_lock while copying the buffer_head's data. We hold jbd_lock_bh_state() during the copy, which is all that is needed.
-
Andrew Morton authored
In start_this_handle() the caller does not have a handle ref pinning the transaction open, and so the call to log_start_commit() is racy because some other CPU could take the transaction into commit state independently. Fix that by holding j_state_lock (which pins j_running_transaction) across the log_start_commit() call.
-
Andrew Morton authored
Drop in a few assertions to ensure that the locking rules are being adhered to.
-
Andrew Morton authored
Add a comment describing why a race isn't there.
-
Andrew Morton authored
We need to check that buffer is still journalled _after_ taking the right locks.
-
Andrew Morton authored
There's a bug: a caller tries to journal a buffer and then decides he didn't want to after all. He calls journal_release_buffer(). But journal_release_buffer() is only allowed to give the caller a buffer credit back if it was the caller who added the buffer in the first place. journal_release_buffer() currently looks at the buffer state to work that out, but gets it wrong: if the buffer has been moved onto a different list by some other part of ext3 the credit is bogusly not returned to the caller and the fs can later go BUG due to handle credit exhaustion. The fix: Change journal_get_undo_access() to return the number of buffers which the caller actually added to the journal. (one or zero). When the caller later calls journal_release_buffer(), he passes in that count, to tell journal_release_buffer() how many credits the caller should get back. For API consistency this change should also be made to journal_get_create_access() and journal_get_write_access(). But there is no requirement for that in ext3 at this time. The remaining bug: This logic effectively gives another transaction handle a free buffer credit. These could conceivably accumulate and cause a journal overflow. This is a separate problem and needs changes to the t_outstanding_credits accounting and the logic in start_this_handle.
-
Andrew Morton authored
This filesystem-wide sleeping lock is no longer needed. Remove it.
-
Andrew Morton authored
lock_kernel() is no longer needed in JBD. Remove all the lock_kernel() calls from fs/jbd/. Here is where I get to say "ex-parrot".
-
Andrew Morton authored
Implement the designed locking around journal->j_free. Things get a lot better here, too.
-
Andrew Morton authored
Go through all sites which use j_committing_transaction and ensure that the deisgned locking is correctly implemented there.
-
Andrew Morton authored
Implement the designed locking around journal->j_running_transaction. A lot more of the new locking scheme falls into place.
-