All of lore.kernel.org
 help / color / mirror / Atom feed
From: Allison Henderson <achender@linux.vnet.ibm.com>
To: Ext4 Developers List <linux-ext4@vger.kernel.org>,
	"Ted Ts'o" <tytso@mit.edu>
Subject: i_mutex questions
Date: Tue, 13 Sep 2011 11:33:29 -0700	[thread overview]
Message-ID: <4E6FA1F9.6080802@linux.vnet.ibm.com> (raw)

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


             reply	other threads:[~2011-09-13 18:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-13 18:33 Allison Henderson [this message]
2011-09-13 19:02 ` i_mutex questions 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E6FA1F9.6080802@linux.vnet.ibm.com \
    --to=achender@linux.vnet.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.