All of lore.kernel.org
 help / color / mirror / Atom feed
* FSCache: Cookie create and destroy semantics on file open
@ 2013-08-07  4:40 Milosz Tanski
  2013-08-07  6:04 ` David Howells
  0 siblings, 1 reply; 4+ messages in thread
From: Milosz Tanski @ 2013-08-07  4:40 UTC (permalink / raw)
  To: David Howells; +Cc: linux-cachefs, linux-fsdevel

David,

I have a question for you about how added / removing the cookie for a
NFS inode works. Right the cache entry gets added when the file is
open. It gets revoked when the file re-opened in write mode. What
happens in this case.

Open for read (create cookie) -> Open for write (destroy cookie) ->
Open for read (create cookie again)

In this case, none of the 3 files were closed.

As I understand understand when the 3rd file is open for read it will
open the old cookie, invalidate it the data... but it will still
create the cookie for that inode despite one file having being open
for write.

Is there some other kind of scheme that prevents this from happening
that I'm unaware of?

Thanks,
-Milosz

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: FSCache: Cookie create and destroy semantics on file open
  2013-08-07  4:40 FSCache: Cookie create and destroy semantics on file open Milosz Tanski
@ 2013-08-07  6:04 ` David Howells
  2013-08-07 12:08   ` Milosz Tanski
  2013-08-07 12:46   ` David Howells
  0 siblings, 2 replies; 4+ messages in thread
From: David Howells @ 2013-08-07  6:04 UTC (permalink / raw)
  To: Milosz Tanski; +Cc: dhowells, linux-cachefs, linux-fsdevel

Milosz Tanski <milosz@adfin.com> wrote:

> I have a question for you about how added / removing the cookie for a
> NFS inode works. Right the cache entry gets added when the file is
> open. It gets revoked when the file re-opened in write mode. What
> happens in this case.
> 
> Open for read (create cookie) -> Open for write (destroy cookie) ->
> Open for read (create cookie again)
> 
> In this case, none of the 3 files were closed.

No.  The way NFS is doing this is wrong.  I have been given some patches that
should fix this, I think.

David

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: FSCache: Cookie create and destroy semantics on file open
  2013-08-07  6:04 ` David Howells
@ 2013-08-07 12:08   ` Milosz Tanski
  2013-08-07 12:46   ` David Howells
  1 sibling, 0 replies; 4+ messages in thread
From: Milosz Tanski @ 2013-08-07 12:08 UTC (permalink / raw)
  To: David Howells; +Cc: linux-cachefs, linux-fsdevel

Can you share those patches? I'd like to know what the approach you've
taken since I'm trying to figure out how to solve it for Ceph.

- M

On Aug 7, 2013, at 2:04 AM, David Howells <dhowells@redhat.com> wrote:

> Milosz Tanski <milosz@adfin.com> wrote:
>
>> I have a question for you about how added / removing the cookie for a
>> NFS inode works. Right the cache entry gets added when the file is
>> open. It gets revoked when the file re-opened in write mode. What
>> happens in this case.
>>
>> Open for read (create cookie) -> Open for write (destroy cookie) ->
>> Open for read (create cookie again)
>>
>> In this case, none of the 3 files were closed.
>
> No.  The way NFS is doing this is wrong.  I have been given some patches that
> should fix this, I think.
>
> David

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: FSCache: Cookie create and destroy semantics on file open
  2013-08-07  6:04 ` David Howells
  2013-08-07 12:08   ` Milosz Tanski
@ 2013-08-07 12:46   ` David Howells
  1 sibling, 0 replies; 4+ messages in thread
From: David Howells @ 2013-08-07 12:46 UTC (permalink / raw)
  To: Milosz Tanski; +Cc: dhowells, jiayisuse, linux-cachefs, linux-fsdevel

Milosz Tanski <milosz@adfin.com> wrote:

> Can you share those patches? I'd like to know what the approach you've
> taken since I'm trying to figure out how to solve it for Ceph.

http://www.jiayi.net/works/nfsfscache-writeback-cache/

David

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-07 12:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-07  4:40 FSCache: Cookie create and destroy semantics on file open Milosz Tanski
2013-08-07  6:04 ` David Howells
2013-08-07 12:08   ` Milosz Tanski
2013-08-07 12:46   ` David Howells

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.