Re: [PATCH] fix panic in jbd by adding locks

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jan Kara
Date: Tuesday, August 21, 2007 - 9:48 am

On Tue 21-08-07 11:43:12, Josef Bacik wrote:
  I also just want to understand how the oops can happen :).

  The trick is, there are in fact two revoke tables. So the commit code
does the following:
  1) It waits until all handles of the running transaction are released
(this is the while loop waiting checking t_updates).
  2) It does some cleanup of unused buffers.
  3) Switches revoke tables - i.e. journal->j_revoke now points to a
freshly initialized table, the table of the committing transaction is kept
hidden.
  4) Transaction state is changed to FLUSH, journal->j_running_transaction
is set to NULL, etc.
  5) Data writeout is performed.
  6) Saved revoke hash table is written.

  After 3), journal_revoke() and journal_revoke_cancel() access the new
hash table and thus have no influence on journal_write_revoke_records(). It
could possibly be that the pointer to the old hash table would be stored in
some local variable - but all the places where we store a pointer to the
hash table seem to be contained inside journal_start(), journal_stop()
pairs (all functions working with hash tables take a transaction handle
as an argument) and because all handles were released at some point in time,
we know that this should not happen either.
  I hope it is clearer now. If you still have any questions, please ask.

									Honza
-- 
Jan Kara <jack@suse.cz>
SuSE CR Labs
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] fix panic in jbd by adding locks, Josef Bacik, (Tue Aug 14, 8:22 am)
Re: [PATCH] fix panic in jbd by adding locks, Jan Kara, (Wed Aug 15, 4:37 am)
Re: [PATCH] fix panic in jbd by adding locks, Josef Bacik, (Wed Aug 15, 5:17 am)
Re: [PATCH] fix panic in jbd by adding locks, Jan Kara, (Thu Aug 16, 9:08 am)
Re: [PATCH] fix panic in jbd by adding locks, Josef Bacik, (Thu Aug 16, 9:37 am)
Re: [PATCH] fix panic in jbd by adding locks, Jan Kara, (Mon Aug 20, 8:20 am)
Re: [PATCH] fix panic in jbd by adding locks, Josef Bacik, (Tue Aug 21, 8:43 am)
Re: [PATCH] fix panic in jbd by adding locks, Jan Kara, (Tue Aug 21, 9:48 am)
Re: [PATCH] fix panic in jbd by adding locks, Josef Bacik, (Tue Aug 21, 10:45 am)
Re: [PATCH] fix panic in jbd by adding locks, Josef Bacik, (Thu Aug 23, 11:41 am)