<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span>Removed the client-helpers.c temp patch and implemented Anand's fuse-bridge.c patch and works perfect.</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; "><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal; "><span>Steve</span></div><div><br></div> <div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Niels de Vos <ndevos@redhat.com><br> <b><span style="font-weight: bold;">To:</span></b>
Steve Bakke <sbakke@netzyn.com> <br><b><span style="font-weight: bold;">Cc:</span></b> "gluster-devel@nongnu.org" <gluster-devel@nongnu.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, September 18, 2012 3:16 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Gluster-devel] Fuse mount option: enable-ino32<br> </font> </div> <br>On 09/18/2012 01:18 AM, Anand Avati wrote:<br>> The right place to do it is in fuse_readdir_cbk, based on<br>> priv->enable_ino32 (see c13823bd16b26bc471d3efb15f63b76fbfdf0309)<br><br>Yeah, it seems that fuse_readdir_cbk uses d_ino directly. Could you try the <br>attached patch? I probably won't have the time to test this in the next days, <br>but if you can confirm this works for you I can post it for review.<br><br><br>> On Mon, Sep 17, 2012 at 4:13 PM, Steve Bakke<<a ymailto="mailto:sbakke@netzyn.com"
href="mailto:sbakke@netzyn.com">sbakke@netzyn.com</a>> wrote:<br>>> Found a temporary solution. We patched<br>>> xlators/protocol/client/src/client-helpers.c ~ line 159<br>>> was: entry->d_ino = trav->d_ino<br>>> now: entry->d_ino = GF_FUSE_SQUASH_INO(trav->d_info);<br><br>This will work, but does not take the mount-option in consideration. When you <br>test the attached patch, please revert the above change.<br><br>Thanks,<br>Niels<br><br><br>>> All the 32 bit apps that did not work before, now work. Need both the<br>>> original enable-ino32 patch and this one.<br>>><br>>> Not sure what the actual patch should be, but this does work at least for<br>>> our running only 32 bit apps on a Gluster mount.<br>>><br>>> Steve<br>>><br>>> ------------------------------<br>>> *From:* Steve Bakke<<a
ymailto="mailto:sbakke@netzyn.com" href="mailto:sbakke@netzyn.com">sbakke@netzyn.com</a>><br>>> *To:* "<a ymailto="mailto:gluster-devel@nongnu.org" href="mailto:gluster-devel@nongnu.org">gluster-devel@nongnu.org</a>"<<a ymailto="mailto:gluster-devel@nongnu.org" href="mailto:gluster-devel@nongnu.org">gluster-devel@nongnu.org</a>><br>>> *Sent:* Monday, September 17, 2012 11:42 AM<br>>> *Subject:* Re: [Gluster-devel] Fuse mount option: enable-ino32<br>>><br>>> Yes we are running the patched version on client. We modified the print<br>>> line in our test program to display the inode values and compiled the<br>>> program for 64 bit mode, so it will run.<br>>> printf("inode:%016lx file:%s\n", dirEntry.d_ino, dirEntry.d_name );<br>>><br>>><br>>> Also to make sure client was working correctly we added logging calls to<br>>> gf_fuse_stat2attr() in fuse-helpers.c,
at line 444 added:<br>>><br>>> fprintf( mylogfile, "ino32: %i st:%lx fuse:%lx \n", enable_ino32,<br>>> st->ia_ino, fa->ino );<br>>><br>>><br>>><br>>> When the test program was run, it printed this out:<br>>><br>>> inode:a2bdc7aeaee47329 file:steve.txt<br>>> inode:821222a0edf18a37 file:george.txt<br>>> inode:0000000000000001 file:.<br>>> inode:a7f29365717fb464 file:testnfs<br>>> inode:ffffffffffffffff file:..<br>>> inode:9aa3f33d3c366b4e file:fred.txt<br>>><br>>><br>>> The log file contained:<br>>><br>>> ino32: 1 st:1 fuse:1<br>>> ino32: 1 st:1 fuse:1<br>>> ino32: 1 st:1 fuse:1<br>>> ino32: 1 st:a2bdc7aeaee47329 fuse:c59b487<br>>> ino32: 1 st:821222a0edf18a37 fuse:6fe3a897<br>>> ino32: 1 st:a7f29365717fb464 fuse:d68d2701<br>>> ino32: 1 st:9aa3f33d3c366b4e fuse:a6959873<br>>> ino32:
1 st:1 fuse:1<br>>> ino32: 1 st:1 fuse:1<br>>> ino32: 1 st:1 fuse:1<br>>> ino32: 1 st:1 fuse:1<br>>> ino32: 1 st:1 fuse:1<br>>><br>>><br>>> As the inode values return to the test program are> 32 bits, seems like<br>>> there is some path that the inodes are not getting adjusted?<br>>><br>>> When we compile the test program in 32 bit mode, we get error 75, which is<br>>> EOVERFLOW. Looking at the 32bit Getdents (called by readdir) EOVERFLOW is<br>>> returned when inode values are> 32 bits.<br>>><br>>> Steve<br>>><br>>><br>>> ------------------------------<br>>> *From:* Niels de Vos<<a ymailto="mailto:ndevos@redhat.com" href="mailto:ndevos@redhat.com">ndevos@redhat.com</a>><br>>> *To:* Steve Bakke<<a ymailto="mailto:sbakke@netzyn.com" href="mailto:sbakke@netzyn.com">sbakke@netzyn.com</a>><br>>>
*Cc:* "<a ymailto="mailto:gluster-devel@nongnu.org" href="mailto:gluster-devel@nongnu.org">gluster-devel@nongnu.org</a>"<<a ymailto="mailto:gluster-devel@nongnu.org" href="mailto:gluster-devel@nongnu.org">gluster-devel@nongnu.org</a>><br>>> *Sent:* Monday, September 17, 2012 3:49 AM<br>>> *Subject:* Re: [Gluster-devel] Fuse mount option: enable-ino32<br>>><br>>> On 09/15/2012 11:15 PM, Steve Bakke wrote:<br>>>> All,<br>>>><br>>>> Just compiled and installed the Sept 15 git which includes the fuse<br>>> mount option enable-ino32 patch.<br>>>><br>>>> Then on the server:<br>>>> gluster volume fred set enable-ino32 on<br>>>> Note: volume info prints out nfs.enable-ino32: on, which I guess is ok???<br>>><br>>> The volume option is for the NFS-server only. It does not affect the<br>>> GlusterFS-native mount, therefore there is no need to set
this option for<br>>> the<br>>> volume.<br>>><br>>>> On client:<br>>>> mount -t glusterfs -o enable-ino32 1.2.3.4:/fred mntfs<br>>><br>>> This is the correct usage.<br>>><br>>>> Mounts, but still returns wrong entries, using the test program below.<br>>> This program works fine with using nfs mount, and with nfs.enable-ino32 on<br>>> server. However for other reasons must use native client.<br>>>><br>>>> Do I need to do something else??<br>>><br>>> Are you using the version with the patch on the client? The conversion of<br>>> the<br>>> 64-bit to 32-bit inodes is done client-side, not server-side. This makes<br>>> it<br>>> possible for clients to choose if they want/need 32- or 64-bit inodes.<br>>><br>>> Cheers,<br>>> Niels<br>>><br>>><br>>>>
Steve<br>>>><br>>>><br>>>><br>>>> #include<stdlib.h><br>>>> #include<stdio.h><br>>>> #include<sys/types.h><br>>>> #include<dirent.h><br>>>><br>>>> int main()<br>>>> {<br>>>> DIR* hDir = opendir(".");<br>>>> if (hDir==NULL)<br>>>> return 1;<br>>>><br>>>> struct dirent dirEntry;<br>>>> struct dirent * pOut;<br>>>> int err = readdir_r(hDir,&dirEntry,&pOut);<br>>>> while(err==0&& pOut!=NULL)<br>>>> {<br>>>> printf("%s ", dirEntry.d_name);<br>>>> err = readdir_r(hDir,&dirEntry,&pOut);<br>>>> }<br>>>><br>>>>
printf("\nLast Error: %d\n", err);<br>>>><br>>>> return 0;<br>>>> }<br>>>><br><br><br><br> </div> </div> </div></body></html>