[RTEMS 4.10] NFS mount fails with 'Registering NFS driver failed' message

Joel Sherrill joel at rtems.org
Wed Aug 12 16:27:04 UTC 2020


On Wed, Aug 12, 2020 at 9:33 AM Jose L. Marcos <jose-louis.marcos at cnes.fr>
wrote:

> Thank's Joel
>
> Adding '#define CONFIGURE_MAXIMUM_DRIVERS 15' to my system.h config file
> make me one step further...
>
> I still get a non-0 return value for mount_and_make_target_path. I
> printed errno value before 'assert(err == 0)' line and it's errno=22
> (EINVAL: invalid args); but can't tell which API function returned this
> errno.
>

This is unfortunately not something I can answer as quickly. I recommend
stepping into the source. Use the directory command in gdb if you have
to point the object to a different location than the build.

You may also be able to spot  something looking through the code.

You do need to configure more file descriptors to open sockets which NFS
will use but I don't think that would return EINVAL. But who knows.

>
> Still puzzled !
>
> Regards,
>
> *José L. Marcos*
> CNES - DSO/DV/IF
> 18 avenue Edouard Belin - bpi 3517
> 31401 Toulouse cedex 9
> Tél: +33 (0)5 61 27 41 13
> On 8/12/20 3:09 PM, Joel Sherrill wrote:
> >
> >
> > On Wed, Aug 12, 2020 at 7:20 AM Marcos Jose-Louis
> > <Jose-Louis.Marcos at cnes.fr <mailto:Jose-Louis.Marcos at cnes.fr>> wrote:
> >
> >     Hi
> >
> >     I'm trying to mount a NFS partition from a server on a sparc board.
> >     My app is basically configuring the network, and trying to mount
> >     the NFS server share using mount_andmmake_target_path() API.
> >
> >     err = mount_and_make_target_path(
> >             "6331.1150 at 10.160.7.217:/home/marcosjl/",
> >             "/nfs",
> >             RTEMS_FILESYSTEM_TYPE_NFS,
> >             RTEMS_FILESYSTEM_READ_WRITE,
> >             NULL);
> >     assert(err == 0);
> >
> >     It fails miserably :
> >
> >     Network initialization OK.
> >     RTEMS-RPCIOD $Release$, Till Straumann, Stanford/SLAC/SSRL 2002,
> >     See LICENSE file for licensing info.
> >     RTEMS-NFS $Release$, Till Straumann, Stanford/SLAC/SSRL 2002, See
> >     LICENSE file for licensing info.
> >     Registering NFS driver failed -
> >
> >     When digging in ./cpukit/libfs/src/nfsclient/src/nfs.c, It seems
> >     that call to 'rtems_io_register_driver' is not successful,
> >     probably related to misconfiguration of my app ?
> >
> >     This is the excerpt of my system.h file (the one containing the
> >     configuration directives to RTEMS) :
> >
> >     /* Specific configuration for NFS */
> >     #define CONFIGURE_FILESYSTEM_NFS
> >     #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 20
> >     #define CONFIGURE_MAXIMUM_SEMAPHORES 15
> >     #define CONFIGURE_NUMBER_OF_DRIVERS 5
> >
> >
> > I don't think this is the right configuration parameter. It should be
> > CONFIGURE_MAXIMUM_DRIVERS. I don't know if 5 is the right number but
> > you need 1+ driver slots empty beyond the static drivers configured to
> > account for the dynamically installed one.
> >
> >
> https://git.rtems.org/rtems/tree/cpukit/sapi/include/confdefs.h?h=4.10#n856
> > should be the section of code you are tripping.
> >
> > That should get you beyond this error.
> >
> >
> >     Not sure of what's going on here (I'm pretty new to RTEMS !). Is
> >     it the correct way to configure resources expected by NFS client ?
> >     (as per what's specified in ./cpukit/libfs/src/nfsclient/README -
> >     section "RTEMS Resources Used Byy NFS/RPCIOD")
> >
> >     Thank's in advance...
> >
> >     Regards,
> >     José L. Marcos
> >
> >     _______________________________________________
> >     users mailing list
> >     users at rtems.org <mailto:users at rtems.org>
> >     http://lists.rtems.org/mailman/listinfo/users
> >
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20200812/331951c0/attachment-0001.html>


More information about the users mailing list