linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov@parallels.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	David Vrabel <david.vrabel@citrix.com>,
	Mark Fasheh <mfasheh@suse.com>, Joel Becker <jlbec@evilplan.org>,
	Stefan Hengelein <ilendir@googlemail.com>,
	Florian Schmaus <fschmaus@gmail.com>,
	Andor Daam <andor.daam@googlemail.com>,
	Dan Magenheimer <dan.magenheimer@oracle.com>,
	Bob Liu <lliubbo@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] cleancache: zap uuid arg of cleancache_init_shared_fs
Date: Sun, 22 Feb 2015 21:31:53 +0300	[thread overview]
Message-ID: <1dff560ed464f544ca9e0b1c26ca841b0cd16b0c.1424628280.git.vdavydov@parallels.com> (raw)
In-Reply-To: <cover.1424628280.git.vdavydov@parallels.com>

Use super_block->s_uuid instead. Every shared filesystem using
cleancache must now initialize super_block->s_uuid before calling
cleancache_init_shared_fs. The only one on the tree, ocfs2, already
meets this requirement.

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
---
 fs/ocfs2/super.c           |    2 +-
 include/linux/cleancache.h |    6 +++---
 mm/cleancache.c            |    6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 43f5a9e71b35..18f830a9df50 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -2335,7 +2335,7 @@ static int ocfs2_initialize_super(struct super_block *sb,
 		mlog_errno(status);
 		goto bail;
 	}
-	cleancache_init_shared_fs((char *)&di->id2.i_super.s_uuid, sb);
+	cleancache_init_shared_fs(sb);
 
 bail:
 	return status;
diff --git a/include/linux/cleancache.h b/include/linux/cleancache.h
index 4ce9056b31a8..29657d1c83fb 100644
--- a/include/linux/cleancache.h
+++ b/include/linux/cleancache.h
@@ -36,7 +36,7 @@ struct cleancache_ops {
 extern struct cleancache_ops *
 	cleancache_register_ops(struct cleancache_ops *ops);
 extern void __cleancache_init_fs(struct super_block *);
-extern void __cleancache_init_shared_fs(char *, struct super_block *);
+extern void __cleancache_init_shared_fs(struct super_block *);
 extern int  __cleancache_get_page(struct page *);
 extern void __cleancache_put_page(struct page *);
 extern void __cleancache_invalidate_page(struct address_space *, struct page *);
@@ -78,10 +78,10 @@ static inline void cleancache_init_fs(struct super_block *sb)
 		__cleancache_init_fs(sb);
 }
 
-static inline void cleancache_init_shared_fs(char *uuid, struct super_block *sb)
+static inline void cleancache_init_shared_fs(struct super_block *sb)
 {
 	if (cleancache_enabled)
-		__cleancache_init_shared_fs(uuid, sb);
+		__cleancache_init_shared_fs(sb);
 }
 
 static inline int cleancache_get_page(struct page *page)
diff --git a/mm/cleancache.c b/mm/cleancache.c
index 053bcd8f12fb..532495f2e4f4 100644
--- a/mm/cleancache.c
+++ b/mm/cleancache.c
@@ -155,7 +155,7 @@ void __cleancache_init_fs(struct super_block *sb)
 EXPORT_SYMBOL(__cleancache_init_fs);
 
 /* Called by a cleancache-enabled clustered filesystem at time of mount */
-void __cleancache_init_shared_fs(char *uuid, struct super_block *sb)
+void __cleancache_init_shared_fs(struct super_block *sb)
 {
 	int i;
 
@@ -163,10 +163,10 @@ void __cleancache_init_shared_fs(char *uuid, struct super_block *sb)
 	for (i = 0; i < MAX_INITIALIZABLE_FS; i++) {
 		if (shared_fs_poolid_map[i] == FS_UNKNOWN) {
 			sb->cleancache_poolid = i + FAKE_SHARED_FS_POOLID_OFFSET;
-			uuids[i] = uuid;
+			uuids[i] = sb->s_uuid;
 			if (cleancache_ops)
 				shared_fs_poolid_map[i] = cleancache_ops->init_shared_fs
-						(uuid, PAGE_SIZE);
+						(sb->s_uuid, PAGE_SIZE);
 			else
 				shared_fs_poolid_map[i] = FS_NO_BACKEND;
 			break;
-- 
1.7.10.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2015-02-22 18:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-22 18:31 [PATCH 0/4] cleancache: remove limit on the number of cleancache enabled filesystems Vladimir Davydov
2015-02-22 18:31 ` [PATCH 1/4] ocfs2: copy fs uuid to superblock Vladimir Davydov
2015-02-22 18:31 ` Vladimir Davydov [this message]
2015-02-22 18:31 ` [PATCH 3/4] cleancache: forbid overriding cleancache_ops Vladimir Davydov
2015-02-22 18:31 ` [PATCH 4/4] cleancache: remove limit on the number of cleancache enabled filesystems Vladimir Davydov
2015-02-23 10:31   ` Vladimir Davydov
2015-02-23 16:12 ` [PATCH 0/4] " Konrad Rzeszutek Wilk
2015-02-24 10:34   ` Vladimir Davydov
2015-03-04 21:22     ` Konrad Rzeszutek Wilk
2015-03-05 16:46       ` Vladimir Davydov
2015-03-06 15:14         ` Konrad Rzeszutek Wilk
2015-03-06 16:01           ` Vladimir Davydov

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=1dff560ed464f544ca9e0b1c26ca841b0cd16b0c.1424628280.git.vdavydov@parallels.com \
    --to=vdavydov@parallels.com \
    --cc=akpm@linux-foundation.org \
    --cc=andor.daam@googlemail.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=dan.magenheimer@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=fschmaus@gmail.com \
    --cc=ilendir@googlemail.com \
    --cc=jlbec@evilplan.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lliubbo@gmail.com \
    --cc=mfasheh@suse.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