linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: attempt to fix race in bigalloc code path
@ 2011-08-22 13:54 Yongqiang Yang
  2011-08-22 17:30 ` Aditya Kali
  0 siblings, 1 reply; 3+ messages in thread
From: Yongqiang Yang @ 2011-08-22 13:54 UTC (permalink / raw)
  To: adityakali; +Cc: Jan Kara, Ted Ts'o, Ext4 Developers List

Hi,

I can not find the patch - attempt to fix race in bigalloc code path -
in the mailing list.

I don't think this patch can work.  set_buffers_da_mapped() is called
under i_data_sem, so it can not lock page.  If the page is not locked,
calling page_has_buffers() is not secure as Jan pointed out
previously.  If a page is partially mapped(block size < page size),
setting BH_Da_Mapped without locking page is not safe too.

BTW:  find_delalloc_range() does not lock page as ext4_fiemap_cb().
As Jan said, it can crash system.  BUT we can not lock page in both
scenarios, because i_data_sem is hold. So delayed extent list is
necessary.  I have finished the code implementing delayed extent list,
which needs some further testing.


What are your opinions?


-- 
Best Wishes
Yongqiang Yang

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

end of thread, other threads:[~2011-08-23  1:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-22 13:54 attempt to fix race in bigalloc code path Yongqiang Yang
2011-08-22 17:30 ` Aditya Kali
2011-08-23  1:12   ` Yongqiang Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).