* Re: lock i_mutex for fallocate?
[not found] <4E5ED2D5.8040302@linux.vnet.ibm.com>
@ 2011-09-01 1:12 ` Allison Henderson
2011-09-01 17:59 ` Josef Bacik
0 siblings, 1 reply; 2+ messages in thread
From: Allison Henderson @ 2011-09-01 1:12 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel; +Cc: Ext4 Developers List, Andreas Dilger
Oh, I meant for this to go to linux-fsdevel instead of linux-kernel, but
all feedback is welcome! :)
On 08/31/2011 05:33 PM, Allison Henderson wrote:
> Hi All,
>
> In ext4 punch hole, we realized that the punch hole operation needs to
> be done under i_mutex just like truncate. i_mutex for truncate is held
> in the vfs layer, so we dont need to lock it at the file system layer,
> but vfs does not lock i_mutex for fallocate. We can lock i_mutex for
> fallocate at the fs layer, but question was raised then: should i_mutex
> for fallocate be held in the vfs layer instead? I do not know if other
> file systems need i_mutex to be locked for fallocate, or if they might
> be locking it already, so I am doing some investigating on this idea,
> and also the appropriate use of i_mutex in general. Can someone provide
> some insight this topic? Thx!
>
> Allison Henderson
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: lock i_mutex for fallocate?
2011-09-01 1:12 ` lock i_mutex for fallocate? Allison Henderson
@ 2011-09-01 17:59 ` Josef Bacik
0 siblings, 0 replies; 2+ messages in thread
From: Josef Bacik @ 2011-09-01 17:59 UTC (permalink / raw)
To: Allison Henderson
Cc: linux-kernel, linux-fsdevel, Ext4 Developers List, Andreas Dilger
On Wed, Aug 31, 2011 at 06:12:04PM -0700, Allison Henderson wrote:
> Oh, I meant for this to go to linux-fsdevel instead of linux-kernel, but
> all feedback is welcome! :)
>
> On 08/31/2011 05:33 PM, Allison Henderson wrote:
>> Hi All,
>>
>> In ext4 punch hole, we realized that the punch hole operation needs to
>> be done under i_mutex just like truncate. i_mutex for truncate is held
>> in the vfs layer, so we dont need to lock it at the file system layer,
>> but vfs does not lock i_mutex for fallocate. We can lock i_mutex for
>> fallocate at the fs layer, but question was raised then: should i_mutex
>> for fallocate be held in the vfs layer instead? I do not know if other
>> file systems need i_mutex to be locked for fallocate, or if they might
>> be locking it already, so I am doing some investigating on this idea,
>> and also the appropriate use of i_mutex in general. Can someone provide
>> some insight this topic? Thx!
>>
Btrfs has range locking for our extents, so we don't really need to be holding
the i_mutex, even tho it appears we do it anyway. So I'd rather this not be
moved to VFS for us who can do more fine grained locking. Thanks,
Josef
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-01 17:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4E5ED2D5.8040302@linux.vnet.ibm.com>
2011-09-01 1:12 ` lock i_mutex for fallocate? Allison Henderson
2011-09-01 17:59 ` Josef Bacik
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).