Re: 2.6.18 ext3 panic.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jan Kara wrote:

Talking with Stephen, it seemed like the page lock should synchronize these threads, but I've found that we can get to journal_dirty_data acting on the buffer heads w/o having the page locked...
  Yes, PageLock should protect us. Where can we call
journal_dirty_data() without PageLock? I see the following callers:
  ext3_ordered_commit_write - should have PageLock
  ext3_ordered_writepage - has PageLock
  ext3_block_truncate_page - has PageLock

  And that are all callers from ext3. Am I missing something?

								Honza

I put an assert about the page being locked in journal_dirty_data, and hit it right away. I'll look a bit more but I think this is how I got there:


ext3_ordered_writepage <-- assert PageLocked
	...
	block_write_full_page
		__block_write_full_page
			unlock_page()
	...
	walk_page_buffers
		journal_dirty_data_fn
			ext3_journal_dirty_data
				journal_dirty_data <-- find page unlocked

there's a comment in ext3_ordered_writepage:

        /*
         * The page can become unlocked at any point now, and
         * truncate can then come in and change things.  So we
         * can't touch *page from now on.  But *page_bufs is
         * safe due to elevated refcount.
         */

-Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux