Linux Overlay Filesystem development
 help / color / mirror / Atom feed
* [PATCH] tmpfs: generate random sb->s_uuid
@ 2017-05-05  9:44 Amir Goldstein
  2017-05-05 10:01 ` Christoph Hellwig
  2017-05-07 12:11 ` kbuild test robot
  0 siblings, 2 replies; 11+ messages in thread
From: Amir Goldstein @ 2017-05-05  9:44 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: Al Viro, linux-unionfs, linux-fsdevel, Hugh Dickins,
	Andrew Morton

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-05-10  2:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-05  9:44 [PATCH] tmpfs: generate random sb->s_uuid Amir Goldstein
2017-05-05 10:01 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox