All of lore.kernel.org
 help / color / mirror / Atom feed
* 2.6.39 Kernel Changes for FileSystem, get_sb removed
@ 2011-09-20 11:44 Abhijit Pawar
  2011-09-20 12:13 ` Abhijit Pawar
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Abhijit Pawar @ 2011-09-20 11:44 UTC (permalink / raw)
  To: kernelnewbies

Hi list,
It seems that the support for get_sb function is removed from kernel 
2.6.39 onwards. My code which is working till 2.6.38 series is failing 
with new kernels.

I tried finding out but there isnt anything mentioned. So if this 
function itself is removed then how kernel is going to find out the 
superblock and use it?

Are we supposed to use the mount function provided? This is what i got 
from one of the kernel patch email.

+[mandatory]
+	->get_sb() is gone.  Switch to use of ->mount().  Typically it's just
+a matter of switching from calling get_sb_... to mount_... and changing the
+function type.  If you were doing it manually, just switch from setting ->mnt_root
+to some pointer to returning that pointer.  On errors return ERR_PTR(...).
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt


It looks like there are other changes related to Pages are also done.


Regards,
Abhijit Pawar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110920/a9309d82/attachment.html 

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

* 2.6.39 Kernel Changes for FileSystem, get_sb removed
  2011-09-20 11:44 2.6.39 Kernel Changes for FileSystem, get_sb removed Abhijit Pawar
@ 2011-09-20 12:13 ` Abhijit Pawar
  2011-09-20 12:20 ` rohan puri
  2011-09-20 13:16 ` kashish bhatia
  2 siblings, 0 replies; 7+ messages in thread
From: Abhijit Pawar @ 2011-09-20 12:13 UTC (permalink / raw)
  To: kernelnewbies

On 09/20/2011 05:14 PM, Abhijit Pawar wrote:
> Hi list,
> It seems that the support for get_sb function is removed from kernel 
> 2.6.39 onwards. My code which is working till 2.6.38 series is failing 
> with new kernels.
>
> I tried finding out but there isnt anything mentioned. So if this 
> function itself is removed then how kernel is going to find out the 
> superblock and use it?
>
> Are we supposed to use the mount function provided? This is what i got 
> from one of the kernel patch email.
>
> +[mandatory]
> +	->get_sb() is gone.  Switch to use of ->mount().  Typically it's just
> +a matter of switching from calling get_sb_... to mount_... and changing the
> +function type.  If you were doing it manually, just switch from setting ->mnt_root
> +to some pointer to returning that pointer.  On errors return ERR_PTR(...).
> diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
>
> It looks like there are other changes related to Pages are also done.
>
>
> Regards,
> Abhijit Pawar
I have modified the code to use the mount function and its working 
correctly.  There is one more change I noticed for struct 
address_space_operations: The sync_page is removed.

The code is working now.

Regards,
Abhijit Pawar

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110920/7e0f24d1/attachment.html 

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

* 2.6.39 Kernel Changes for FileSystem, get_sb removed
  2011-09-20 11:44 2.6.39 Kernel Changes for FileSystem, get_sb removed Abhijit Pawar
  2011-09-20 12:13 ` Abhijit Pawar
@ 2011-09-20 12:20 ` rohan puri
  2011-09-20 12:24   ` Abhijit Pawar
  2011-09-20 13:16 ` kashish bhatia
  2 siblings, 1 reply; 7+ messages in thread
From: rohan puri @ 2011-09-20 12:20 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Sep 20, 2011 at 5:14 PM, Abhijit Pawar <apawar.linux@gmail.com>wrote:

>  Hi list,
> It seems that the support for get_sb function is removed from kernel 2.6.39
> onwards. My code which is working till 2.6.38 series is failing with new
> kernels.
>
> I tried finding out but there isnt anything mentioned. So if this function
> itself is removed then how kernel is going to find out the superblock and
> use it?
>
> Are we supposed to use the mount function provided? This is what i got from
> one of the kernel patch email.
>
>  +[mandatory]
> +	->get_sb() is gone.  Switch to use of ->mount().  Typically it's just
> +a matter of switching from calling get_sb_... to mount_... and changing the
> +function type.  If you were doing it manually, just switch from setting ->mnt_root
> +to some pointer to returning that pointer.  On errors return ERR_PTR(...).
> diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
>
>
> It looks like there are other changes related to Pages are also done.
>
>
> Regards,
> Abhijit Pawar
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

Hi Abhijit,

Yes you have to make use of mount function pointer in the struct
file_system_type.

NOTE : - change is only in one parameter of type struct vfsmount which is
basically removed from this function pointer.

Regards,
Rohan Puri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110920/1275d3f9/attachment.html 

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

* 2.6.39 Kernel Changes for FileSystem, get_sb removed
  2011-09-20 12:20 ` rohan puri
@ 2011-09-20 12:24   ` Abhijit Pawar
  2011-09-20 12:41     ` rohan puri
  0 siblings, 1 reply; 7+ messages in thread
From: Abhijit Pawar @ 2011-09-20 12:24 UTC (permalink / raw)
  To: kernelnewbies

On 09/20/2011 05:50 PM, rohan puri wrote:
>
>
> On Tue, Sep 20, 2011 at 5:14 PM, Abhijit Pawar <apawar.linux@gmail.com 
> <mailto:apawar.linux@gmail.com>> wrote:
>
>     Hi list,
>     It seems that the support for get_sb function is removed from
>     kernel 2.6.39 onwards. My code which is working till 2.6.38 series
>     is failing with new kernels.
>
>     I tried finding out but there isnt anything mentioned. So if this
>     function itself is removed then how kernel is going to find out
>     the superblock and use it?
>
>     Are we supposed to use the mount function provided? This is what i
>     got from one of the kernel patch email.
>
>     +[mandatory]
>     +	->get_sb() is gone.  Switch to use of ->mount().  Typically it's just
>     +a matter of switching from calling get_sb_... to mount_... and changing the
>     +function type.  If you were doing it manually, just switch from setting ->mnt_root
>     +to some pointer to returning that pointer.  On errors return ERR_PTR(...).
>     diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
>
>
>     It looks like there are other changes related to Pages are also done.
>
>
>     Regards,
>     Abhijit Pawar
>
>     _______________________________________________
>     Kernelnewbies mailing list
>     Kernelnewbies at kernelnewbies.org
>     <mailto:Kernelnewbies@kernelnewbies.org>
>     http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
> Hi Abhijit,
>
> Yes you have to make use of mount function pointer in the struct 
> file_system_type.
>
> NOTE : - change is only in one parameter of type struct vfsmount which 
> is basically removed from this function pointer.
>
> Regards,
> Rohan Puri
>
Thanks Rohan. Yes, i have made the changes and things are looking good. 
struct address_space_operation's sync_page is also removed.

Regards,
Abhijit Pawar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110920/9eef6fb6/attachment-0001.html 

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

* 2.6.39 Kernel Changes for FileSystem, get_sb removed
  2011-09-20 12:24   ` Abhijit Pawar
@ 2011-09-20 12:41     ` rohan puri
  0 siblings, 0 replies; 7+ messages in thread
From: rohan puri @ 2011-09-20 12:41 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Sep 20, 2011 at 5:54 PM, Abhijit Pawar <apawar.linux@gmail.com>wrote:

>  On 09/20/2011 05:50 PM, rohan puri wrote:
>
>
>
> On Tue, Sep 20, 2011 at 5:14 PM, Abhijit Pawar <apawar.linux@gmail.com>wrote:
>
>>  Hi list,
>> It seems that the support for get_sb function is removed from kernel
>> 2.6.39 onwards. My code which is working till 2.6.38 series is failing with
>> new kernels.
>>
>> I tried finding out but there isnt anything mentioned. So if this function
>> itself is removed then how kernel is going to find out the superblock and
>> use it?
>>
>> Are we supposed to use the mount function provided? This is what i got
>> from one of the kernel patch email.
>>
>>  +[mandatory]
>> +	->get_sb() is gone.  Switch to use of ->mount().  Typically it's just
>> +a matter of switching from calling get_sb_... to mount_... and changing the
>> +function type.  If you were doing it manually, just switch from setting ->mnt_root
>> +to some pointer to returning that pointer.  On errors return ERR_PTR(...).
>> diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
>>
>>
>> It looks like there are other changes related to Pages are also done.
>>
>>
>> Regards,
>>  Abhijit Pawar
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>
> Hi Abhijit,
>
> Yes you have to make use of mount function pointer in the struct
> file_system_type.
>
> NOTE : - change is only in one parameter of type struct vfsmount which is
> basically removed from this function pointer.
>
> Regards,
> Rohan Puri
>
>  Thanks Rohan. Yes, i have made the changes and things are looking good.
> struct address_space_operation's sync_page is also removed.
>
> Regards,
> Abhijit Pawar
>
Welcome :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110920/c37b003e/attachment.html 

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

* 2.6.39 Kernel Changes for FileSystem, get_sb removed
  2011-09-20 11:44 2.6.39 Kernel Changes for FileSystem, get_sb removed Abhijit Pawar
  2011-09-20 12:13 ` Abhijit Pawar
  2011-09-20 12:20 ` rohan puri
@ 2011-09-20 13:16 ` kashish bhatia
  2011-09-20 13:24   ` rohan puri
  2 siblings, 1 reply; 7+ messages in thread
From: kashish bhatia @ 2011-09-20 13:16 UTC (permalink / raw)
  To: kernelnewbies

Hi Abhijit,

On Tue, Sep 20, 2011 at 5:14 PM, Abhijit Pawar <apawar.linux@gmail.com>wrote:

>  Hi list,
> It seems that the support for get_sb function is removed from kernel 2.6.39
> onwards. My code which is working till 2.6.38 series is failing with new
> kernels.
>
>
 The function "get_sb()" is still present in security/inode.c in kernel
2.6.39. Only the function pointer of get_sb() has been removed from
struct file_system_type in /include/linux/fs.h.

I tried finding out but there isnt anything mentioned. So if this function
> itself is removed then how kernel is going to find out the superblock and
> use it?
>
> Are we supposed to use the mount function provided? This is what i got from
> one of the kernel patch email.
>
>
Yes , you are supposed to use mount function.
visit the following link :
http://lxr.linux.no/#linux+v2.6.39/security/inode.c#L144<http://lxr.linux.no/#linux+v2.6.39/security/inode.c%23L144>

 +[mandatory]
> +	->get_sb() is gone.  Switch to use of ->mount().  Typically it's just
> +a matter of switching from calling get_sb_... to mount_... and changing the
> +function type.  If you were doing it manually, just switch from setting ->mnt_root
> +to some pointer to returning that pointer.  On errors return ERR_PTR(...).
> diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
>
>
> It looks like there are other changes related to Pages are also done.
>
>
> Regards,
> Abhijit Pawar
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>


-- 
Regards,
Kashish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110920/6a9c1eb6/attachment.html 

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

* 2.6.39 Kernel Changes for FileSystem, get_sb removed
  2011-09-20 13:16 ` kashish bhatia
@ 2011-09-20 13:24   ` rohan puri
  0 siblings, 0 replies; 7+ messages in thread
From: rohan puri @ 2011-09-20 13:24 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Sep 20, 2011 at 6:46 PM, kashish bhatia <koolest77@gmail.com> wrote:

> Hi Abhijit,
>
> On Tue, Sep 20, 2011 at 5:14 PM, Abhijit Pawar <apawar.linux@gmail.com>wrote:
>
>>  Hi list,
>> It seems that the support for get_sb function is removed from kernel
>> 2.6.39 onwards. My code which is working till 2.6.38 series is failing with
>> new kernels.
>>
>>
>  The function "get_sb()" is still present in security/inode.c in kernel
> 2.6.39. Only the function pointer of get_sb() has been removed from
>
The name they have kept is the same in security/inode.c but you can compare
the prototype to earlier kernel versions. They will be different. Also its
assigned to mount function pointer field of struct file_system_type.

> struct file_system_type in /include/linux/fs.h.
>
> I tried finding out but there isnt anything mentioned. So if this function
>> itself is removed then how kernel is going to find out the superblock and
>> use it?
>>
>> Are we supposed to use the mount function provided? This is what i got
>> from one of the kernel patch email.
>>
>>
> Yes , you are supposed to use mount function.
> visit the following link :
> http://lxr.linux.no/#linux+v2.6.39/security/inode.c#L144<http://lxr.linux.no/#linux+v2.6.39/security/inode.c%23L144>
>
>  +[mandatory]
>> +	->get_sb() is gone.  Switch to use of ->mount().  Typically it's just
>> +a matter of switching from calling get_sb_... to mount_... and changing the
>> +function type.  If you were doing it manually, just switch from setting ->mnt_root
>> +to some pointer to returning that pointer.  On errors return ERR_PTR(...).
>> diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
>>
>>
>> It looks like there are other changes related to Pages are also done.
>>
>>
>> Regards,
>> Abhijit Pawar
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>
>
> --
> Regards,
> Kashish
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
Regards,
Rohan Puri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110920/d7db0443/attachment.html 

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

end of thread, other threads:[~2011-09-20 13:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-20 11:44 2.6.39 Kernel Changes for FileSystem, get_sb removed Abhijit Pawar
2011-09-20 12:13 ` Abhijit Pawar
2011-09-20 12:20 ` rohan puri
2011-09-20 12:24   ` Abhijit Pawar
2011-09-20 12:41     ` rohan puri
2011-09-20 13:16 ` kashish bhatia
2011-09-20 13:24   ` rohan puri

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.