LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation/filesystems/porting: Update documentation.
@ 2012-08-03 14:17 Sachidananda Urs
  2012-08-03 17:05 ` Vijay Bellur
  0 siblings, 1 reply; 4+ messages in thread
From: Sachidananda Urs @ 2012-08-03 14:17 UTC (permalink / raw
  To: Rob Landley, Al Viro, Fengguang Wu, Jan Kara, linux-doc,
	linux-kernel
  Cc: Sachidananda Urs

->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@gmail.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_MODOULE,
+        .name   = "foo",
+        .mount  = foo_mount,
+};
 
 ---
 [mandatory]
-- 
1.7.7.6


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

* Re: [PATCH] Documentation/filesystems/porting: Update documentation.
  2012-08-03 14:17 Sachidananda Urs
@ 2012-08-03 17:05 ` Vijay Bellur
  0 siblings, 0 replies; 4+ messages in thread
From: Vijay Bellur @ 2012-08-03 17:05 UTC (permalink / raw
  To: Sachidananda Urs
  Cc: Rob Landley, Al Viro, Fengguang Wu, Jan Kara, linux-doc,
	linux-kernel

On Fri, Aug 3, 2012 at 7:47 PM, Sachidananda Urs <sacchi@gmail.com> wrote:
> ->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@gmail.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

> +static struct file_system_type foo_fs_type = {
> +        .owner  = THIS_MODOULE,

s/MODOULE/MODULE/

-Vijay

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

* [PATCH] Documentation/filesystems/porting: Update documentation.
@ 2012-08-03 17:34 Sachidananda Urs
  2012-08-05 20:54 ` Rob Landley
  0 siblings, 1 reply; 4+ messages in thread
From: Sachidananda Urs @ 2012-08-03 17:34 UTC (permalink / raw
  To: Rob Landley, Al Viro, Fengguang Wu, Jan Kara, linux-doc,
	linux-kernel
  Cc: Sachidananda Urs

->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@gmail.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


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

* Re: [PATCH] Documentation/filesystems/porting: Update documentation.
  2012-08-03 17:34 [PATCH] Documentation/filesystems/porting: Update documentation Sachidananda Urs
@ 2012-08-05 20:54 ` Rob Landley
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Landley @ 2012-08-05 20:54 UTC (permalink / raw
  To: Sachidananda Urs; +Cc: Al Viro, Fengguang Wu, Jan Kara, linux-doc, linux-kernel

On 08/03/2012 12:34 PM, Sachidananda Urs wrote:
> ->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@gmail.com>

Acked-by: Rob Landley <rob@landley.net>

(Yesterday at Texas Linuxfest I _finally_ got some of the gpg signatures
to resurrect my kernel.org account, but I'll forward this through
-trivial in the meantime unless somebody else picks it up first.)

Thanks,

Rob
-- 
GNU/Linux isn't: Linux=GPLv2, GNU=GPLv3+, they can't share code.
Either it's "mere aggregation", or a license violation.  Pick one.

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

end of thread, other threads:[~2012-08-06  3:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-03 17:34 [PATCH] Documentation/filesystems/porting: Update documentation Sachidananda Urs
2012-08-05 20:54 ` Rob Landley
  -- strict thread matches above, loose matches on Subject: below --
2012-08-03 14:17 Sachidananda Urs
2012-08-03 17:05 ` Vijay Bellur

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 read-only IMAP folder(s) and NNTP newsgroup(s).