[Gluster-devel] Fuse mount option: enable-ino32
Steve Bakke
sbakke at netzyn.com
Mon Sep 17 16:42:20 UTC 2012
Yes we are running the patched version on client. We modified the print line in our test program to display the inode values and compiled the program for 64 bit mode, so it will run.
printf("inode:%016lx file:%s\n", dirEntry.d_ino, dirEntry.d_name );
Also to make sure client was working correctly we added logging calls to gf_fuse_stat2attr() in fuse-helpers.c, at line 444 added:
fprintf( mylogfile, "ino32: %i st:%lx fuse:%lx \n", enable_ino32, st->ia_ino, fa->ino );
When the test program was run, it printed this out:
inode:a2bdc7aeaee47329 file:steve.txt
inode:821222a0edf18a37 file:george.txt
inode:0000000000000001 file:.
inode:a7f29365717fb464 file:testnfs
inode:ffffffffffffffff file:..
inode:9aa3f33d3c366b4e file:fred.txt
The log file contained:
ino32: 1 st:1 fuse:1
ino32: 1 st:1 fuse:1
ino32: 1 st:1 fuse:1
ino32: 1 st:a2bdc7aeaee47329 fuse:c59b487
ino32: 1 st:821222a0edf18a37 fuse:6fe3a897
ino32: 1 st:a7f29365717fb464 fuse:d68d2701
ino32: 1 st:9aa3f33d3c366b4e fuse:a6959873
ino32: 1 st:1 fuse:1
ino32: 1 st:1 fuse:1
ino32: 1 st:1 fuse:1
ino32: 1 st:1 fuse:1
ino32: 1 st:1 fuse:1
As the inode values return to the test program are > 32 bits, seems like there is some path that the inodes are not getting adjusted?
When we compile the test program in 32 bit mode, we get error 75, which is EOVERFLOW. Looking at the 32bit Getdents (called by readdir) EOVERFLOW is returned when inode values are > 32 bits.
Steve
________________________________
From: Niels de Vos <ndevos at redhat.com>
To: Steve Bakke <sbakke at netzyn.com>
Cc: "gluster-devel at nongnu.org" <gluster-devel at nongnu.org>
Sent: Monday, September 17, 2012 3:49 AM
Subject: Re: [Gluster-devel] Fuse mount option: enable-ino32
On 09/15/2012 11:15 PM, Steve Bakke wrote:
> All,
>
> Just compiled and installed the Sept 15 git which includes the fuse mount option enable-ino32 patch.
>
> Then on the server:
> gluster volume fred set enable-ino32 on
> Note: volume info prints out nfs.enable-ino32: on, which I guess is ok???
The volume option is for the NFS-server only. It does not affect the
GlusterFS-native mount, therefore there is no need to set this option for the
volume.
> On client:
> mount -t glusterfs -o enable-ino32 1.2.3.4:/fred mntfs
This is the correct usage.
> Mounts, but still returns wrong entries, using the test program below. This program works fine with using nfs mount, and with nfs.enable-ino32 on server. However for other reasons must use native client.
>
> Do I need to do something else??
Are you using the version with the patch on the client? The conversion of the
64-bit to 32-bit inodes is done client-side, not server-side. This makes it
possible for clients to choose if they want/need 32- or 64-bit inodes.
Cheers,
Niels
> Steve
>
>
>
> #include<stdlib.h>
> #include<stdio.h>
> #include<sys/types.h>
> #include<dirent.h>
>
> int main()
> {
> DIR* hDir = opendir(".");
> if (hDir==NULL)
> return 1;
>
> struct dirent dirEntry;
> struct dirent * pOut;
> int err = readdir_r(hDir,&dirEntry,&pOut);
> while(err==0&& pOut!=NULL)
> {
> printf("%s ", dirEntry.d_name);
> err = readdir_r(hDir,&dirEntry,&pOut);
> }
>
> printf("\nLast Error: %d\n", err);
>
> return 0;
> }
>
>
>
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at nongnu.org
> https://lists.nongnu.org/mailman/listinfo/gluster-devel
--
Niels de Vos
Software Maintenance Engineer
Global Support Services
Red Hat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20120917/911451c6/attachment-0005.html>
More information about the Gluster-devel
mailing list