linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, sa-dev@rainbow.by,
	andre.roth@roche.com
Subject: Re: [PATCH 2/2] ovl: allow distributed fs as lower layer
Date: Fri, 5 Jun 2015 01:07:15 +0100	[thread overview]
Message-ID: <20150605000715.GP7232@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1433424586-7771-3-git-send-email-miklos@szeredi.hu>

On Thu, Jun 04, 2015 at 03:29:46PM +0200, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@suse.cz>
> 
> Allow filesystems with .d_revalidate as lower layer(s), but not as upper
> layer.
> 
> For local filesystems the rule was that modifications on the layers
> directly while being part of the overlay results in undefined behavior.
> 
> This can easily be extended to distributed filesystems: we assume the tree
> used as lower layer is static, which means ->d_revalidate() should always
> return "1".  If that is not the case, return -ESTALE, don't try to work
> around the modification.

Umm...  Cosmetical point is that this

> +static bool ovl_remote(struct dentry *root)
> +{
> +	const struct dentry_operations *dop = root->d_op;
> +
> +	return dop && (dop->d_revalidate || dop->d_weak_revalidate);
> +}

is better done as
	root->d_flags & (DCACHE_OP_REVALIDATE | DCACHE_OP_WEAK_REVALIDATE)

More interesting question is whether anything in the system relies on
existing behaviour that follows ->d_revalidate() returning 0.  Have you
tried to mount e.g. procfs as underlying layer and torture it for a while?

  reply	other threads:[~2015-06-05  0:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-04 13:29 [PATCH 0/2] ovl: support NFS as lower layer Miklos Szeredi
2015-06-04 13:29 ` [PATCH 1/2] ovl: don't traverse automount points Miklos Szeredi
2015-06-04 13:29 ` [PATCH 2/2] ovl: allow distributed fs as lower layer Miklos Szeredi
2015-06-05  0:07   ` Al Viro [this message]
2015-06-05 15:37     ` Miklos Szeredi
2015-06-07  1:02       ` Eric W. Biederman
2015-06-09 12:44         ` Miklos Szeredi
2015-06-09 12:54           ` Eric W. Biederman

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=20150605000715.GP7232@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=andre.roth@roche.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=sa-dev@rainbow.by \
    /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).