All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Van Hensbergen <ericvh@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: kernel-mentors@selenic.com, v9fs-developer@lists.sourceforge.net,
	linux-fsdevel@vger.kernel.org, hch@infradead.org,
	viro@parcelfarce.linux.theplanet.co.uk
Subject: Re: v9fs writepage
Date: Sat, 30 Apr 2005 13:10:39 -0500	[thread overview]
Message-ID: <a4e6962a050430111029bdcadb@mail.gmail.com> (raw)
In-Reply-To: <E1DRwE4-0002ps-00@dorka.pomaz.szeredi.hu>

On 4/30/05, Miklos Szeredi <miklos@szeredi.hu> wrote:
> > I'm not given an easy handle (in most cases its the dentry or the
> > file structure) to resolve a FID against.
> 
> While it had a writepage(), FUSE had a similar problem.  The solution
> was to store a list of files suitable for writing in the inode (the
> private inode data).  The list was updated in the open() and release()
> methods.  And in writepage() the first entry on the list was taken.
> No searching was required.
> 
> You're probably wondering what happened to writepage() in FUSE.  Well
> it was removed because it turned out to be deadlock prone in OOM
> situations.  That is actually not a speciality of FUSE, most network
> filesystems are vulnerable in case the server is running on the same
> machine as the client.  And in other cases as well, but only to a
> lesser extent.
> 
> The reason is that if the server needs to allocate memory to fulfill
> the writeback request, this allocation will block (since the system is
> just trying to free up memory) resulting in a deadlock.
> 
> You should keep this in mind for v9fs too, if you want to allow
> non-privileged users to mount their filesystems.
> 

I remember seeing some of this thread on LKML, wasn't this one of
Linus' big complaints about FUSE?  I'm fine with leaving writepage out
of v9fs, particularly for user-mounts and/or synthetic file systems. 
Is there an established guideline for its use? (I suppose as long as
we know the file system is remote then we can allow it -- or is it
only user-space file systems/user-mounts that are a concern?)

It would seem a relaxed check in my v9fs_fid_locate  would provide the
same service as keeping open files in the inode.  We had looked at
doing something similar, but I hated the idea of having to keep the
extra book-keeping if there was another path (particularly since we
are already cacheing fids in dentries).  Basically, I could add a flag
to v9fs_fid locate which says if you can't find an appropriate context
(a fid owned by the same user, pid, or pgrp as the context performing
the writepage) then choose any open fid matching the file.  I may be
able to get closer by flagging fids which have been mmapped -- but
that seems like overkill and doesn't necessarily provide any
additional accuracy for this corner case.

Thanks Miklos.

         -eric

  reply	other threads:[~2005-04-30 18:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-30 17:17 v9fs writepage Eric Van Hensbergen
2005-04-30 17:58 ` Miklos Szeredi
2005-04-30 18:10   ` Eric Van Hensbergen [this message]
2005-04-30 18:36     ` Al Viro
2005-04-30 18:47       ` Eric Van Hensbergen
2005-04-30 19:01         ` Al Viro
2005-04-30 20:03           ` Miklos Szeredi
2005-04-30 20:09             ` Al Viro
2005-04-30 21:44               ` Miklos Szeredi
2005-05-01  1:10           ` Eric Van Hensbergen
2005-05-01 15:36             ` [V9fs-developer] " Ronald G. Minnich
2005-05-01 15:29           ` Ronald G. Minnich
2005-04-30 19:53     ` Miklos Szeredi

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=a4e6962a050430111029bdcadb@mail.gmail.com \
    --to=ericvh@gmail.com \
    --cc=hch@infradead.org \
    --cc=kernel-mentors@selenic.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=v9fs-developer@lists.sourceforge.net \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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.