All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@bfk.de>
To: Christoph Hellwig <hch@infradead.org>
Cc: Dave Chinner <david@fromorbit.com>, linux-fsdevel@vger.kernel.org
Subject: Re: Does fsync() block read and write ops on the same file?
Date: Fri, 11 Dec 2009 13:35:32 +0000	[thread overview]
Message-ID: <82hbrxd463.fsf@mid.bfk.de> (raw)
In-Reply-To: <20091211132133.GA18258@infradead.org> (Christoph Hellwig's message of "Fri\, 11 Dec 2009 08\:21\:33 -0500")

* 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@bfk.de>
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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2009-12-11 13:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-10  9:22 Does fsync() block read and write ops on the same file? Florian Weimer
2009-12-11  3:55 ` Dave Chinner
2009-12-11  8:53   ` Florian Weimer
2009-12-11 12:42     ` Dave Chinner
2009-12-11 12:53       ` Florian Weimer
2009-12-12 23:05         ` Dave Chinner
2009-12-11 13:21       ` Christoph Hellwig
2009-12-11 13:35         ` Florian Weimer [this message]

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=82hbrxd463.fsf@mid.bfk.de \
    --to=fweimer@bfk.de \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /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.