lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1344015265-6752-1-git-send-email-sacchi@gmail.com>
Date:	Fri,  3 Aug 2012 23:04:25 +0530
From:	Sachidananda Urs <sacchi@...il.com>
To:	Rob Landley <rob@...dley.net>, Al Viro <viro@...iv.linux.org.uk>,
	Fengguang Wu <fengguang.wu@...el.com>, Jan Kara <jack@...e.cz>,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	Sachidananda Urs <sacchi@...il.com>
Subject: [PATCH] Documentation/filesystems/porting: Update documentation.

->get_sb() is no longer used, update documentation to use ->mount(). Also added
  a example for struct file_system_type.

Signed-off-by: Sachidananda Urs <sacchi@...il.com>
---
 Documentation/filesystems/porting |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 2bef2b3..d6d53fb 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -42,26 +42,32 @@ At some point that will become mandatory.
 ---
 [mandatory]
 
-Change of file_system_type method (->read_super to ->get_sb)
+Change of file_system_type method (->read_super to ->get_sb to ->mount)
 
-->read_super() is no more.  Ditto for DECLARE_FSTYPE and DECLARE_FSTYPE_DEV.
+->read_super() is no more and so is ->get_sb.  Ditto for DECLARE_FSTYPE and
+  DECLARE_FSTYPE_DEV.
 
 Turn your foo_read_super() into a function that would return 0 in case of
 success and negative number in case of error (-EINVAL unless you have more
 informative error value to report).  Call it foo_fill_super().  Now declare
 
-int foo_get_sb(struct file_system_type *fs_type,
-	int flags, const char *dev_name, void *data, struct vfsmount *mnt)
+static struct dentry *foo_mount(struct file_system_type *fs_type, int flags,
+                                const char *dev_name, void *data)
 {
-	return get_sb_bdev(fs_type, flags, dev_name, data, foo_fill_super,
-			   mnt);
+        return mount_bdev(fs_type, flags, dev_name, data, foo_fill_super);
 }
 
 (or similar with s/bdev/nodev/ or s/bdev/single/, depending on the kind of
 filesystem).
 
 Replace DECLARE_FSTYPE... with explicit initializer and have ->get_sb set as
-foo_get_sb.
+foo_mount. For example:
+
+static struct file_system_type foo_fs_type = {
+        .owner  = THIS_MODULE,
+        .name   = "foo",
+        .mount  = foo_mount,
+};
 
 ---
 [mandatory]
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ