From: Richard Yao <ryao@gentoo.org>
To: shencanquan <shencanquan@huawei.com>
Cc: Jeff Liu <jeff.liu@oracle.com>, Mark Fasheh <mfasheh@suse.com>,
linux-kernel@vger.kernel.org, kernel@gentoo.org,
linux-fsdevel@vger.kernel.org,
Ocfs2-Devel <ocfs2-devel@oss.oracle.com>
Subject: Re: [Ocfs2-devel] [PATCH 1/2] ocfs2: Fix llseek() semantics and do some cleanup
Date: Sat, 15 Jun 2013 20:44:22 -0400 [thread overview]
Message-ID: <51BD0A66.4070003@gentoo.org> (raw)
In-Reply-To: <51BC080D.1090405@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]
On 06/15/2013 02:22 AM, shencanquan wrote:
> Hello, Richard and Jeff,
> we found that llseek has another bug when in SEEK_END. it should be
> add the inode lock and unlock.
> this bug can be reproduce the following scenario:
> on one nodeA, open the file and then write some data to file and
> close the file .
> on another nodeB , open the file and llseek the end of file . the
> position of file is old.
Did these operations occur sequentially or did they occur concurrently?
If you meant the former, the inode cache is not being invalidated. That
should be a bug because Oracle claims OCFS2 is cache-coherent. However,
it is possible that this case was left out of the cache-coherence
protocol for performance purposes. If that is the case, then this would
be by design. someone who works for Oracle would need to comment on that
though.
If you meant the latter, you should ask yourself what would happen when
you run two separate programs on the same file in a local filesystem.
There should be no way to avoid a race without some kind of a locking
mechanism.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
next prev parent reply other threads:[~2013-06-16 0:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-14 19:23 [PATCH 0/2] llseek fixes Richard Yao
2013-06-14 19:23 ` [PATCH 1/2] ocfs2: Fix llseek() semantics and do some cleanup Richard Yao
2013-06-15 5:09 ` Jeff Liu
2013-06-15 6:22 ` [Ocfs2-devel] " shencanquan
2013-06-16 0:44 ` Richard Yao [this message]
2013-06-16 1:57 ` shencanquan
2013-06-16 0:46 ` Richard Yao
2013-06-16 7:00 ` Jeff Liu
2013-06-16 7:17 ` Richard Yao
2013-06-14 19:23 ` [PATCH 2/2] btrfs: Cleanup llseek() Richard Yao
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=51BD0A66.4070003@gentoo.org \
--to=ryao@gentoo.org \
--cc=jeff.liu@oracle.com \
--cc=kernel@gentoo.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mfasheh@suse.com \
--cc=ocfs2-devel@oss.oracle.com \
--cc=shencanquan@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox