Re: gluster doesn't like Oracle's FSINFO RPC call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13-04-16 02:43 AM, Niels de Vos wrote:
> That was exactly the next thing I was going to suggest :) I think the 
> fhandle can be different sizes though, but if it is always round-up to 
> have only full blocks of 4 bytes, it should work just fine.
That's one way to do it :)
> Could you pass the patch that you've used? I'll review and verify it 
> a little too.
Attached. Nothing to complex, just extending the GlusterFS magic at the
beginning of a FH to 4B.
> However, you should open a service request at Oracle to let them know 
> that their DNFS client should encode the fhandle in correct XDR (with 
> roundup bytes to make full 4 byte blocks).
Haha… yes, yes I should. If only we were the end customer :/

M.

-- 
Michael Brown               | `One of the main causes of the fall of
Systems Consultant          | the Roman Empire was that, lacking zero,
Net Direct Inc.             | they had no way to indicate successful
☎: +1 519 883 1172 x5106    | termination of their C programs.' - Firth

diff -ur orig-glusterfs-3.3.1/xlators/nfs/server/src/nfs3-fh.c glusterfs-3.3.1/xlators/nfs/server/src/nfs3-fh.c
--- orig-glusterfs-3.3.1/xlators/nfs/server/src/nfs3-fh.c       2012-10-11 13:38:25.000000000 -0400
+++ glusterfs-3.3.1/xlators/nfs/server/src/nfs3-fh.c    2013-04-15 14:27:13.006534649 -0400
@@ -46,6 +46,12 @@
        if (fh->ident[1] != GF_NFSFH_IDENT1)
                return 0;

+       if (fh->ident[2] != GF_NFSFH_IDENT2)
+               return 0;
+
+       if (fh->ident[3] != GF_NFSFH_IDENT3)
+               return 0;
+
         return 1;
 }

@@ -58,6 +64,8 @@

         fh->ident[0] = GF_NFSFH_IDENT0;
         fh->ident[1] = GF_NFSFH_IDENT1;
+        fh->ident[2] = GF_NFSFH_IDENT2;
+        fh->ident[3] = GF_NFSFH_IDENT3;

         uuid_copy (fh->gfid, buf->ia_gfid);
 }
@@ -161,6 +169,8 @@

         newfh->ident[0] = GF_NFSFH_IDENT0;
         newfh->ident[1] = GF_NFSFH_IDENT1;
+        newfh->ident[2] = GF_NFSFH_IDENT2;
+        newfh->ident[3] = GF_NFSFH_IDENT3;
         uuid_copy (newfh->gfid, inode->gfid);
         uuid_copy (newfh->exportid, exportid);
         return 0;
diff -ur orig-glusterfs-3.3.1/xlators/nfs/server/src/nfs3-fh.h glusterfs-3.3.1/xlators/nfs/server/src/nfs3-fh.h
--- orig-glusterfs-3.3.1/xlators/nfs/server/src/nfs3-fh.h       2012-10-11 13:38:25.000000000 -0400
+++ glusterfs-3.3.1/xlators/nfs/server/src/nfs3-fh.h    2013-04-15 14:27:30.895205267 -0400
@@ -35,7 +35,9 @@
  * handles for now. This will change if and when we need v4. */
 #define GF_NFSFH_IDENT0         ':'
 #define GF_NFSFH_IDENT1         'O'
-#define GF_NFSFH_IDENT_SIZE     (sizeof(char) * 2)
+#define GF_NFSFH_IDENT2         'G'
+#define GF_NFSFH_IDENT3         'L'
+#define GF_NFSFH_IDENT_SIZE     (sizeof(char) * 4)
 #define GF_NFSFH_STATIC_SIZE    (GF_NFSFH_IDENT_SIZE + (2*sizeof (uuid_t)))

 #define nfs3_fh_exportid_to_index(exprtid)      ((uint16_t)exprtid[15])
@@ -45,9 +47,9 @@
 struct nfs3_fh {

         /* Used to ensure that a bunch of bytes are actually a GlusterFS NFS
-         * file handle. Should contain ":O"
+         * file handle. Should contain ":OGL"
          */
-        char                    ident[2];
+        char                    ident[4];

         /* UUID that identifies an export. The value stored in exportid
          * depends on the usage of gluster nfs. If the DVM is enabled using


[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux