Re: [RFC][Patch 1/2] Persistent preallocation in ext4

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

 



On Tue, 2007-01-02 at 16:34 +0530, Amit K. Arora wrote:
> Hi Mingming,
> > And, Looking at other places calling ext4_*_get_blocks() in the kernel,
> > it seems not all of them protected by i_mutex lock. I think it probably
> > okay to not holding i_mutex during calling ext4_ext4_get_blocks().
> 
> We are not holding i_mutex lock during ext4_ext_get_blocks() call.
> Above, this lock is being held inorder to avoid race while updating the
> filesize in inode (reference your comment in a previous mail "I think we
> should update i_size and i_disksize after preallocation. Oh,
> to protect parallel updating i_size, we have to take i_mutex down.").
> Perhaps, truncate_mutex lock should be used here, and not i_mutex.
> 

truncate_mutex is hold at the entry of ext4_**_get_blocks() to protect
parallel block allocation. Here I was worried about concurrent modifying
i_size and i_disksize which were protected by the i_mutex lock. Sorry
for any confusion.

-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux