Re: Does fsync() block read and write ops on the same file?

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

 



* Christoph Hellwig:

> On Fri, Dec 11, 2009 at 11:42:24PM +1100, Dave Chinner wrote:
>> No usually - normally only for data writes and metadata
>> modifications. However, some filesystems
>> dirty objects even on read (e.g. changing atime) and so can
>> serialise on other filesystem locks (e.g. ext3 journal lock) that
>> is being held by the fsync.
>
> Actually we also take the XFS ilock in shared mode in read, and XFS
> takes it in exclusive mode if it has to update filesystem attributes
> like the atime.  This might be what Florian is seeing.

The file system is mounted noatime.  But the file in question is
heavily fragmented due to the way it is created--databases pages are
written in more-or-less random order, creating holes which are later
filled.

-- 
Florian Weimer                <fweimer@xxxxxx>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux