All of lore.kernel.org
 help / color / mirror / Atom feed
* question about a possible deadlock
@ 2002-04-26 11:07 Andrey Savochkin
  2002-04-26 12:00 ` Chris Mason
  0 siblings, 1 reply; 5+ messages in thread
From: Andrey Savochkin @ 2002-04-26 11:07 UTC (permalink / raw)
  To: reiserfs-list

Hi,

I've found a call sequence leading to what looks like a deadlock:
open
  reiserfs_create
    journal_begin
    reiserfs_new_inode
      failure by one of multiple reasons
      iput [note that inode->i_nlink == 0]
        reiserfs_delete_inode
          journal_begin
            deadlock, waiting for previous journal_begin to end
The code was checked by the mainstream 2.4.18 kernel.
Any reasons why this deadlock can't happen?

My reading is that the deadlock should happen under the condition expressed
in the code as
  if (  (!join && SB_JOURNAL(p_s_sb)->j_must_wait > 0) ||
     ( !join && (SB_JOURNAL(p_s_sb)->j_len_alloc + nblocks + 2) >= JOURNAL_MAX_BATCH) ||
     (!join && atomic_read(&(SB_JOURNAL(p_s_sb)->j_wcount)) > 0 && SB_JOURNAL(p_s_sb)->j_trans_start_time > 0 &&
      (now - SB_JOURNAL(p_s_sb)->j_trans_start_time) > JOURNAL_MAX_TRANS_AGE) ||     (!join && atomic_read(&(SB_JOURNAL(p_s_sb)->j_jlock)) ) ||
     (!join && SB_JOURNAL(p_s_sb)->j_cnode_free < (JOURNAL_TRANS_MAX * 3)))
I'm not a specialist in this code, but it should be possible to trigger
this condition, shouldn't it?

Or is it yet another already fixed issue?

Best regards
		Andrey

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-04-26 14:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-26 11:07 question about a possible deadlock Andrey Savochkin
2002-04-26 12:00 ` Chris Mason
2002-04-26 13:01   ` Andrey Savochkin
2002-04-26 13:14     ` Chris Mason
2002-04-26 14:06   ` Hans Reiser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.