All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Liu <jeff.liu@oracle.com>
To: shencanquan <shencanquan@huawei.com>
Cc: Richard Yao <ryao@gentoo.org>, Mark Fasheh <mfasheh@suse.com>,
	kernel@gentoo.org, linux-fsdevel@vger.kernel.org,
	Ocfs2-Devel <ocfs2-devel@oss.oracle.com>
Subject: [Ocfs2-devel] [PATCH 1/2] ocfs2: Fix llseek() semantics and do some cleanup
Date: Sun, 16 Jun 2013 15:16:26 +0800	[thread overview]
Message-ID: <51BD664A.6000405@oracle.com> (raw)
In-Reply-To: <51BD1B84.9080402@huawei.com>

Remove kernel-dev from the CC-list as this is particular to OCFS2.

On 06/16/2013 09:57 AM, shencanquan wrote:

> On 2013/6/16 8:44, Richard Yao wrote:
>> 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.

This sounds like a bug because SEEK_END references the file size, hence it
requires the OCFS2 specified inode lock protection.

So patch is always welcome.

Thanks,
-Jeff

>> 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.
> 
>    it is a occur sequentially.  after close the file on NodeA , on nodeB
> and then open the file and llseek the end of file.
> 
>>
>> 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.
>>
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: Jeff Liu <jeff.liu@oracle.com>
To: shencanquan <shencanquan@huawei.com>
Cc: Richard Yao <ryao@gentoo.org>, Mark Fasheh <mfasheh@suse.com>,
	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: Sun, 16 Jun 2013 15:16:26 +0800	[thread overview]
Message-ID: <51BD664A.6000405@oracle.com> (raw)
In-Reply-To: <51BD1B84.9080402@huawei.com>

Remove kernel-dev from the CC-list as this is particular to OCFS2.

On 06/16/2013 09:57 AM, shencanquan wrote:

> On 2013/6/16 8:44, Richard Yao wrote:
>> 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.

This sounds like a bug because SEEK_END references the file size, hence it
requires the OCFS2 specified inode lock protection.

So patch is always welcome.

Thanks,
-Jeff

>> 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.
> 
>    it is a occur sequentially.  after close the file on NodeA , on nodeB
> and then open the file and llseek the end of file.
> 
>>
>> 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.
>>
> 
> 



  reply	other threads:[~2013-06-16  7:16 UTC|newest]

Thread overview: 21+ 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   ` [Ocfs2-devel] " Jeff Liu
2013-06-15  5:09     ` Jeff Liu
2013-06-15  5:09     ` Jeff Liu
2013-06-15  6:22     ` [Ocfs2-devel] " shencanquan
2013-06-15  6:22       ` shencanquan
2013-06-16  0:44       ` Richard Yao
2013-06-16  0:45         ` Richard Yao
2013-06-16  1:57         ` shencanquan
2013-06-16  1:57           ` shencanquan
2013-06-16  7:16           ` Jeff Liu [this message]
2013-06-16  7:16             ` Jeff Liu
2013-06-16  0:46     ` Richard Yao
2013-06-16  0:47       ` [Ocfs2-devel] " Richard Yao
2013-06-16  7:00       ` Jeff Liu
2013-06-16  7:00         ` Jeff Liu
2013-06-16  7:00         ` Jeff Liu
2013-06-16  7:17         ` Richard Yao
2013-06-16  7:17           ` [Ocfs2-devel] " 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=51BD664A.6000405@oracle.com \
    --to=jeff.liu@oracle.com \
    --cc=kernel@gentoo.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mfasheh@suse.com \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=ryao@gentoo.org \
    --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 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.