linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Seth Forshee <seth.forshee@canonical.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: containers@lists.linux-foundation.org,
	linux-fsdevel@vger.kernel.org,
	Tyler Hicks <tyler.hicks@canonical.com>,
	Christian Brauner <christian.brauner@canonical.com>
Subject: Re: shiftfs status and future development
Date: Fri, 15 Jun 2018 10:46:41 -0500	[thread overview]
Message-ID: <20180615154641.GH30028@ubuntu-xps13> (raw)
In-Reply-To: <1529076534.4048.10.camel@HansenPartnership.com>

On Fri, Jun 15, 2018 at 08:28:54AM -0700, James Bottomley wrote:
> On Thu, 2018-06-14 at 13:44 -0500, Seth Forshee wrote:
> > I wanted to inquire about the current status of shiftfs and the plans
> > for it moving forward. We'd like to have this functionality available
> > for use in lxd, and I'm interesetd in helping with development (or
> > picking up development if it's stalled).
> 
> Well, I'm still using it and technically still developing it; it's just
> that its self contained and there haven't been any interface changes
> necessitating an update that I've noticed, so the last published patch
> still applies (well, unless my git rebasing quietly changed something
> and I didn't notice).

I did have to make some changes when I tried it out with 4.17, see
below.

> > To start, is anyone still working on shiftfs or similar
> > functionality? I haven't found it in any git tree on kernel.org, and
> > as far as mailing list activity the last submission I can find is
> > [1]. Is there anything newer than this?
> 
> I'm working on it, but it mostly works for my use case.
> 
> > Based on past mailing list discussions, it seems like there was still
> > debate as to whether this feature should be an overlay filesystem or
> > something supported at the vfs level. Was this ever resolved?
> 
> I think that's the main problem: I don't really have anything
> actionable to work on for upstreaming.  I suspect growing more
> consumers would help with this.

Kind of a chicken/egg problem, as it's difficult to grow consumers when
it's not upstream. I'm starting to work with it though.

However it seems to me that the question of whether or not this should
be an overlay filesystem is pretty fundamental. There was a fairly long
thread between you and Christoph Hellwig on the topic that didn't really
seem to come to a resolution.

Thanks,
Seth


>From 70352c549e9c023cd0c0732329a44f5bbcac0ace Mon Sep 17 00:00:00 2001
From: Seth Forshee <seth.forshee@canonical.com>
Date: Thu, 24 May 2018 09:40:13 -0500
Subject: [PATCH] shiftfs: Forward port to 4.17-rc6

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
 fs/shiftfs.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/fs/shiftfs.c b/fs/shiftfs.c
index ea8ac57b3ce1..fa0797bd7880 100644
--- a/fs/shiftfs.c
+++ b/fs/shiftfs.c
@@ -109,12 +109,12 @@ static void shiftfs_d_release(struct dentry *dentry)
 
 static struct dentry *shiftfs_d_real(struct dentry *dentry,
 				     const struct inode *inode,
-				     unsigned int flags)
+				     unsigned int open_flags, unsigned int flags)
 {
 	struct dentry *real = dentry->d_fsdata;
 
 	if (unlikely(real->d_flags & DCACHE_OP_REAL))
-		return real->d_op->d_real(real, real->d_inode, flags);
+		return real->d_op->d_real(real, real->d_inode, open_flags, flags);
 
 	return real;
 }
@@ -545,19 +545,20 @@ static int shiftfs_setattr(struct dentry *dentry, struct iattr *attr)
 	return 0;
 }
 
-static int shiftfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
-			   struct kstat *stat)
+static int shiftfs_getattr(const struct path *path, struct kstat *stat,
+			   u32 request_mask, unsigned int flags)
 {
+	struct dentry *dentry = path->dentry;
+	struct shiftfs_super_info *ssi = dentry->d_sb->s_fs_info;
 	struct inode *inode = dentry->d_inode;
 	struct dentry *real = inode->i_private;
 	struct inode *reali = real->d_inode;
 	const struct inode_operations *iop = reali->i_op;
+	struct path realpath = { .mnt = ssi->mnt, .dentry = real };
 	int err = 0;
 
-	mnt = dentry->d_sb->s_fs_info;
-
 	if (iop->getattr)
-		err = iop->getattr(mnt, real, stat);
+		err = iop->getattr(&realpath, stat, request_mask, flags);
 	else
 		generic_fillattr(reali, stat);
 
@@ -625,7 +626,7 @@ static struct inode *shiftfs_new_inode(struct super_block *sb, umode_t mode,
 	 * may be aliases plus a few others.
 	 */
 	if (reali)
-		use_inode_hash = ACCESS_ONCE(reali->i_nlink) > 1 &&
+		use_inode_hash = READ_ONCE(reali->i_nlink) > 1 &&
 			!S_ISDIR(reali->i_mode);
 
 	if (use_inode_hash) {
-- 
2.17.0

  reply	other threads:[~2018-06-15 15:46 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-14 18:44 shiftfs status and future development Seth Forshee
2018-06-15 13:56 ` Serge E. Hallyn
2018-06-15 14:59   ` Seth Forshee
2018-06-15 15:25     ` Matthew Wilcox
2018-06-15 15:56       ` Aleksa Sarai
2018-06-15 16:09       ` James Bottomley
2018-06-15 17:04         ` Aleksa Sarai
2018-06-15 17:22           ` James Bottomley
2018-06-15 20:47             ` Seth Forshee
2018-06-15 21:09               ` James Bottomley
2018-06-15 21:35                 ` Seth Forshee
2018-06-16  3:03     ` James Bottomley
2018-06-18 13:40       ` Seth Forshee
2018-06-18 13:49         ` Amir Goldstein
2018-06-18 14:56         ` James Bottomley
2018-06-18 16:03           ` Seth Forshee
2018-06-18 17:11           ` Amir Goldstein
2018-06-18 19:53             ` Phil Estes
2018-06-21 20:16             ` Seth Forshee
2018-06-24 11:32               ` Amir Goldstein
2018-06-25 11:19             ` Christian Brauner
2018-06-27  7:48             ` James Bottomley
2018-06-27 10:17               ` Amir Goldstein
2018-07-03 16:54               ` Serge E. Hallyn
2018-07-03 17:08                 ` Stéphane Graber
2018-07-03 22:05                   ` Serge E. Hallyn
2018-06-15 14:54 ` Aleksa Sarai
2018-06-15 15:05   ` Seth Forshee
2018-06-15 15:28 ` James Bottomley
2018-06-15 15:46   ` Seth Forshee [this message]
2018-06-15 16:16     ` Christian Brauner
2018-06-15 16:35     ` James Bottomley
2018-06-15 20:17       ` Seth Forshee

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=20180615154641.GH30028@ubuntu-xps13 \
    --to=seth.forshee@canonical.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=christian.brauner@canonical.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tyler.hicks@canonical.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).