linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven French <sfrench@samba.org>
To: Jeff Layton <jlayton@redhat.com>,
	David Howells <dhowells@redhat.com>,
	lsf-pc@lists.linux-foundation.org,
	Trond Myklebust <trond.myklebust@hammerspace.com>,
	Anna Schumaker <anna.schumaker@netapp.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [LSF/MM/BPF TOPIC] How to make disconnected operation work?
Date: Fri, 6 Mar 2020 01:11:01 -0600	[thread overview]
Message-ID: <9d5d8081-9c41-aa9d-1ae4-0b09c3a940d4@samba.org> (raw)
In-Reply-To: <8d872ab39c590dbfc6f02230dddb8740630f1444.camel@redhat.com>

As discussed in hallway discussions at Linux Storage Conference - this 
would make a good topic for LSF/MM

On 12/9/19 5:14 PM, Jeff Layton wrote:
> On Mon, 2019-12-09 at 14:46 +0000, David Howells wrote:
>> I've been rewriting fscache and cachefiles to massively simplify it and make
>> use of the kiocb interface to do direct-I/O to/from the netfs's pages which
>> didn't exist when I first did this.
>>
>> 	https://lore.kernel.org/lkml/24942.1573667720@warthog.procyon.org.uk/
>> 	https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=fscache-iter
>>
>> I'm getting towards the point where it's working and able to do basic caching
>> once again.  So now I've been thinking about what it'd take to support
>> disconnected operation.  Here's a list of things that I think need to be
>> considered or dealt with:
>>
> I'm quite interested in this too. I see that you've already given a lot
> of thought to potential interfaces here. I think we'll end up having to
> add a fair number of new interfaces to make something like this work.
>
>>   (1) Making sure the working set is present in the cache.
>>
>>       - Userspace (find/cat/tar)
>>       - Splice netfs -> cache
>>       - Metadata storage (e.g. directories)
>>       - Permissions caching
>>
>>   (2) Making sure the working set doesn't get culled.
>>
>>       - Pinning API (cachectl() syscall?)
>>       - Allow culling to be disabled entirely on a cache
>>       - Per-fs/per-dir config
>>
>>   (3) Switching into/out of disconnected mode.
>>
>>       - Manual, automatic
>>       - On what granularity?
>>         - Entirety of fs (eg. all nfs)
>>         - By logical unit (server, volume, cell, share)
>>
>>   (4) Local changes in disconnected mode.
>>
>>       - Journal
>>       - File identifier allocation
> Yep, necessary if you want to allow disconnected creates. By coincidence
> I'm working an (experimental) patchset now to add async create support
> to kcephfs, and part of that involves delegating out ranges of inode
> numbers. I may have some experience to report with it by the time LSF
> rolls around.
>
>>       - statx flag to indicate provisional nature of info
>>       - New error codes
>> 	- EDISCONNECTED - Op not available in disconnected mode
>> 	- EDISCONDATA - Data not available in disconnected mode
>> 	- EDISCONPERM - Permission cannot be checked in disconnected mode
>> 	- EDISCONFULL - Disconnected mode cache full
>>       - SIGIO support?
>>
>>   (5) Reconnection.
>>
>>       - Proactive or JIT synchronisation
>>         - Authentication
>>       - Conflict detection and resolution
>> 	 - ECONFLICTED - Disconnected mode resolution failed
> ECONFLICTED sort of implies that reconnection will be manual. If it
> happens automagically in the background you'll have no way to report
> such errors.
>
> Also, you'll need some mechanism to know what inodes are conflicted.
> This is the real difficult part of this problem, IMO.
>
>
>>       - Journal replay
>>       - Directory 'diffing' to find remote deletions
>>       - Symlink and other non-regular file comparison
>>
>>   (6) Conflict resolution.
>>
>>       - Automatic where possible
>>         - Just create/remove new non-regular files if possible
>>         - How to handle permission differences?
>>       - How to let userspace access conflicts?
>>         - Move local copy to 'lost+found'-like directory
>>         	 - Might not have been completely downloaded
>>         - New open() flags?
>>         	 - O_SERVER_VARIANT, O_CLIENT_VARIANT, O_RESOLVED_VARIANT
>>         - fcntl() to switch variants?
>>
> Again, conflict resolution is the difficult part. Maybe the right
> solution is to look at snapshotting-style interfaces -- i.e., handle a
> disconnected mount sort of like you would a writable snapshot. Do any
> (local) fs' currently offer writable snapshots, btw?
>
>>   (7) GUI integration.
>>
>>       - Entering/exiting disconnected mode notification/switches.
>>       - Resolution required notification.
>>       - Cache getting full notification.
>>
>> Can anyone think of any more considerations?  What do you think of the
>> proposed error codes and open flags?  Is that the best way to do this?
>>
>> David
>>

      reply	other threads:[~2020-03-06  7:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-09 14:46 [LSF/MM/BPF TOPIC] How to make disconnected operation work? David Howells
2019-12-09 17:33 ` [Lsf-pc] " Amir Goldstein
2020-01-24 14:13   ` Amir Goldstein
2020-01-27 16:32   ` David Howells
2020-01-27 19:18     ` Amir Goldstein
2019-12-09 23:14 ` Jeff Layton
2020-03-06  7:11   ` Steven French [this message]

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=9d5d8081-9c41-aa9d-1ae4-0b09c3a940d4@samba.org \
    --to=sfrench@samba.org \
    --cc=anna.schumaker@netapp.com \
    --cc=dhowells@redhat.com \
    --cc=jlayton@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=trond.myklebust@hammerspace.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).