is NFS mounting borked in bb-1.1.1?

Kumar Gala galak at kernel.crashing.org
Wed Mar 29 09:24:07 PST 2006


On Mar 29, 2006, at 8:37 AM, Rob Landley wrote:

> On Monday 27 March 2006 2:20 pm, Kumar Gala wrote:
>> So I figured out what's wrong with nfs in 1.1.1, however I'm not sure
>> how we want to go about fixing it.
>>
>> The issue is that nfsmount() has a data structure it fills out which
>> is expected to get passed to the call of mount().
>>
>> In singlemount() we call nfsmount() and pass it an options pointer.
>> This pointer is set to a buffer that is allocated and filled out in
>> nsfmount().  However, we are not passing the "options" pointer to
>> mount_it_now().
>>
>> Rob, suggestions?
>
> Ok, svn 14684 is a different fix than the one you posted, but  
> addresses the
> problem you found.  It makes the options parsing we already do in
> singlemount() return string flags, and passing them in as an  
> argument to
> mount_it_now().  Could you tell me if this fixes it for you?
>
> (I'm still pondering whether mp->mnt_opts is a better way to pass  
> it in, but
> the free on line 497 makes that problematic...)
>
> Anyway, this is the first fix that might actually merit a 1.1.1.1  
> release,
> which is a darn silly name and makes me think the next release  
> should just be
> 1.2.  If nothing else, if this fixes it for everybody having nfs  
> trouble,
> I'll append svn 14684 to the fixes list.

This fixes the major issue with nfs.

However, this is a secondary issue with parsing of /etc/fstab that  
still exists for nfs mounts.  I'm confused about what the following  
is trying to do:

         /* If we're trying to mount something specific and this  
isn't it,
          * skip it.  Note we must match both the exact text in fstab  
(ala
          * "proc") or a full path from root */

         if (optind != argc) {

             // Is this what we're looking for?

             if(strcmp(argv[optind],mtcur->mnt_fsname) &&
                strcmp(storage_path,mtcur->mnt_fsname) &&
                strcmp(argv[optind],mtcur->mnt_dir) &&
                strcmp(storage_path,mtcur->mnt_dir)) continue;

             // Remember this entry.  Something later may have  
overmounted
             // it, and we want the _last_ match.

             mtcur = mtnext;

         // If we're mounting all.

         } else {

The issue is I have an fstab that looks like:

proc            /proc           proc     
defaults                        0 0
none            /dev/pts        devpts   
defaults                        0 0
sysfs           /sys            sysfs    
defaults                        0 0
tmpfs           /tmp            tmpfs    
defaults                        0 0
kgala_lnx:/local /local nfs defaults,nolock 0 0

then I do the following on the command line:

# mount /local
mount: Mounting  on /local failed: Invalid argument

We should probably only match on mtcur->mnt_dir if mtcur->type ==  
"nfs", however I dont see how we would actual call singlemount() even  
if we matched the mtcur.

- kumar


More information about the busybox mailing list