Linux Overlay Filesystem development
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Hugh Dickins <hughd@google.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] tmpfs: generate random sb->s_uuid
Date: Fri,  5 May 2017 12:44:28 +0300	[thread overview]
Message-ID: <1493977468-21143-1-git-send-email-amir73il@gmail.com> (raw)

This is used by overlayfs to encode intrasystem unique file handles.

Suggested-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
 mm/shmem.c | 1 +
 1 file changed, 1 insertion(+)

Miklos,

Attached the simple patch you suggested.
With this patch the unionmount-testsuite run:
./run --ov=0 --samefs

Passes with (default) tmpfs as samefs.

Hugh,

Can you please Ack.

FYI, both xfs and ubifs have patches queued to export thier on-disk
uuid to sb->s_uuid.

Thanks,
Amir.

diff --git a/mm/shmem.c b/mm/shmem.c
index e67d6ba..b73f832 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -3761,6 +3761,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
 #ifdef CONFIG_TMPFS_POSIX_ACL
 	sb->s_flags |= MS_POSIXACL;
 #endif
+	generate_random_uuid(sb->s_uuid);
 
 	inode = shmem_get_inode(sb, NULL, S_IFDIR | sbinfo->mode, 0, VM_NORESERVE);
 	if (!inode)
-- 
2.7.4

             reply	other threads:[~2017-05-05  9:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05  9:44 Amir Goldstein [this message]
2017-05-05 10:01 ` [PATCH] tmpfs: generate random sb->s_uuid Christoph Hellwig
2017-05-05 10:20   ` Amir Goldstein
2017-05-09  9:02     ` Christoph Hellwig
2017-05-09  9:18       ` Richard Weinberger
2017-05-09  9:54         ` Amir Goldstein
2017-05-09 10:09           ` Richard Weinberger
2017-05-09 10:27             ` Oleksij Rempel
2017-05-09 10:50             ` Amir Goldstein
2017-05-10  2:51               ` Hugh Dickins
2017-05-07 12:11 ` kbuild test robot

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=1493977468-21143-1-git-send-email-amir73il@gmail.com \
    --to=amir73il@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=viro@zeniv.linux.org.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox