All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gionatan Danti <g.danti-N44kj/XGErOonA0d6jMUrA@public.gmane.org>
To: "linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
	Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	James McDonough <jmcd-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
	Gionatan Danti <g.danti-N44kj/XGErOonA0d6jMUrA@public.gmane.org>
Subject: Re: Problem with Samba re-share of a CIFS mount
Date: Fri, 14 Feb 2014 11:25:17 +0100	[thread overview]
Message-ID: <52FDEF0D.8010708@assyoma.it> (raw)
In-Reply-To: <20140213144038.2101ea44-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>



On 02/13/2014 08:40 PM, Jeff Layton wrote:
>
> You'll have similar problems with NFS.
>
> You can't acquire leases on NFS either, so with kernel oplocks enabled
> on samba you won't ever get oplocks on there. If you turn them off (so
> that oplocks are tracked internally) you won't be aware of changes that
> occur outside of samba.

Ok, so it is the SMB protocol which is intrinsically unfriendly to 
persistent caches. Maybe it is for this very same reason that Microsoft 
suggest to use the "offline files" feature only where files change on 
one single side (eg: laptop).

> I don't recall whether Suresh ever fixed those bugs. cifs+fsc is
> certainly not widely used, and it wouldn't surprise me if it were still
> horribly buggy.
>
> fscache is somewhat at odds with the fundamental caching model of the
> cifs protocol. The whole point of fscache is to speed up access to
> frequently read files when a client starts up, and to reduce load on the
> server in these cases.
>
> For NFS, that works because we rely on looking at inode attributes to
> determine whether the file has changed (i.e. the mtime, size, NFSv4
> change attribute). So, with NFS we can reasonably tell whether a file
> has changed across a client remount.
>
> For CIFS, things are different. The protocol basically states that you
> should only cache file data if you hold an oplock, and you only get an
> oplock when you open a file. When you first bring up a client, you
> don't hold one, so you really should just toss out any data that you're
> caching...thereby making fscache sort of pointless.

What about not having an oplock but watch at file attributes (eg: last 
modified date)? I think cache=loose do this same thing. The man page say 
that Windows can be "lazy" to update file's attribute, but I think that 
we are speaking of some seconds at most. In scenarios with low 
cross-editing probability, this some-second window seems reasonable 
small. I am missing something?

> Now, there is some argument that you can use fsc and still follow the
> protocol by using it as "swap for pagecache". IOW, you could use it
> to cache a large amount of open file data than you have memory. I'm not
> aware of anyone having actually tested to see if that works however.
>

Mmm... this "swap for pagecache" will not survive reboot, right? Or, 
better stated, the cache _will_ survive, but by not having any oplock, 
the client will request the live data from the server, right?

Thank you.

-- 
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.danti-N44kj/XGErOonA0d6jMUrA@public.gmane.org - info-N44kj/XGErOonA0d6jMUrA@public.gmane.org
GPG public key ID: FF5F32A8

  parent reply	other threads:[~2014-02-14 10:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11  9:30 Problem with Samba re-share of a CIFS mount Gionatan Danti
     [not found] ` <52F9EDA5.1020004-N44kj/XGErOonA0d6jMUrA@public.gmane.org>
2014-02-11 15:33   ` Jeff Layton
     [not found]     ` <20140211103302.6d74b90d-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2014-02-11 15:50       ` Gionatan Danti
     [not found]         ` <52FA46D5.8020904-N44kj/XGErOonA0d6jMUrA@public.gmane.org>
2014-02-11 16:59           ` Steve French
     [not found]             ` <CAH2r5mvXh2A_LOm5y7BpgKS6bQhNGjEDR8CYn=K2CnMv01HQeQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-11 17:05               ` Gionatan Danti
2014-02-11 17:45           ` Jeff Layton
     [not found]             ` <20140211124536.5fdcb56f-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2014-02-11 18:01               ` Steve French
     [not found]                 ` <CAH2r5mvQ590zaniv3cDuu+Do0N9TePasTaEFkrNSAdatTiaZ5Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-13 11:37                   ` Jeff Layton
     [not found]                     ` <20140213063738.1b345466-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2014-02-13 17:29                       ` Gionatan Danti
     [not found]                         ` <52FD0109.5030909-N44kj/XGErOonA0d6jMUrA@public.gmane.org>
2014-02-13 18:04                           ` Steve French
     [not found]                             ` <CAH2r5msMZsnC8hxh6=P=f_vsuB=DR_Hv9xyLUEZtG+WpzYU=Sg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-14 10:27                               ` Gionatan Danti
2014-02-13 19:40                           ` Jeff Layton
     [not found]                             ` <20140213144038.2101ea44-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2014-02-14  2:14                               ` Suresh Jayaraman
     [not found]                                 ` <52FDC978020000F4000256F9-ce6RLXgGx+vWGUEhTRrCg1aTQe2KTcn/@public.gmane.org>
2014-02-14 12:06                                   ` Jeff Layton
2014-02-14 10:25                               ` Gionatan Danti [this message]
     [not found]                                 ` <52FDEF0D.8010708-N44kj/XGErOonA0d6jMUrA@public.gmane.org>
2014-02-14 12:17                                   ` Jeff Layton
     [not found]                                     ` <20140214071724.725d8545-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2014-02-14 14:10                                       ` Gionatan Danti
2014-02-14 12:08                           ` Jeff Layton
     [not found]                             ` <20140214070846.09904331-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2014-02-14 14:05                               ` Gionatan Danti
2014-02-11 18:09               ` Gionatan Danti

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=52FDEF0D.8010708@assyoma.it \
    --to=g.danti-n44kj/xgeroona0d6jmura@public.gmane.org \
    --cc=jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
    --cc=jmcd-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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.