lkml.org 
[lkml]   [2013]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Ocfs2-devel] [PATCH 1/2] ocfs2: Fix llseek() semantics and do some cleanup
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.

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-06-16 03:21    [W:0.073 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site