[Gluster-users] Coherency problem with file buffer cache
ruj.sabya at gmail.com
Thu Jun 14 06:47:30 UTC 2012
Where should I apply this patch? On Gluster source or on fuse source.
I could not find any file called fs/file.c neither in gluster 3.3
source nor in fuse source.
On 13 June 2012 21:11, Brian Foster <bfoster at redhat.com> wrote:
> On 06/13/2012 03:02 AM, Sabyasachi Ruj wrote:
>>> So maybe the time when you gain an exclusive lock on a file is the
>>> appropriate time to flush your local cache?
>> I used exclusive lock is just for a simplified demonstration. In
>> reality, a shared read lock will be used when just reading from the
>> file is enough. I that case, the right time to flush local cache would
>> be whenever any *lock* is obtained.
> FWIW, here are a couple fuse patches that allow your test program to work:
> - The first has been posted upstream and fixes an issue where fuse
> wouldn't invalidate cache of a file unless the file size has changed:
> - The second I just cooked up to always invoke the revalidation in the
> read path. It currently only revalidates if a read is attempted beyond
> EOF (to ensure the size attribute is valid). I've only lightly tested so
> far to see how it behaves with your test. The patch is attached. Note
> that AFAICS this would still be a problem when using splice.
More information about the Gluster-users