linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* i_mutex questions
@ 2011-09-13 18:33 Allison Henderson
  2011-09-13 19:02 ` Joel Becker
  2011-09-14  1:29 ` Yongqiang Yang
  0 siblings, 2 replies; 7+ messages in thread
From: Allison Henderson @ 2011-09-13 18:33 UTC (permalink / raw)
  To: Ext4 Developers List, Ted Ts'o

Hi All,

I have been trying to find a way to synchronize punch hole with read and 
write operations with out the use of i_mutex.  The concern is that after 
punch hole has released the pages inside the hole, another process may 
remap the page to a block before punch has taken i_data_sem.  I think 
putting i_mutex around the punch hole operation would fix this, but 
since we are trying to avoid further improper use of i_mutex, I am 
trying to avoid that solution.

I cannot use i_data_sem to protect the pages because it seems most of 
the code has already established a locking order of pages first, then 
i_data_sem.  So moving i_data_sem up tends to cause a lot of dead locks. 
  I'm thinking that there probably needs to be a another mutex involved 
some where, but I wasnt sure if some one is already working on the idea 
of introducing a replacement for i_mutex.  So I just wanted to know if 
there are any plans already in motion for this, or if any one else could 
suggest some ideas for the punch hole issue.  Thx all!

Allison Henderson


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

end of thread, other threads:[~2011-09-14 18:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-13 18:33 i_mutex questions Allison Henderson
2011-09-13 19:02 ` Joel Becker
2011-09-13 22:10   ` Allison Henderson
2011-09-14  0:05     ` Joel Becker
2011-09-14  1:29 ` Yongqiang Yang
2011-09-14  4:23   ` Andreas Dilger
2011-09-14 18:36     ` Allison Henderson

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).