Jason:
> Compile fails using a 2.6.17 kernel on an AMD64 system. Looks like
> size mismatch issues.
Unfortunately I don't have 64bit environemnt, but I tried fixing.
Won't you try this patch?
Junjiro Okajima
Index: super.c
===================================================================
RCS file: /home/cvs/unionfs/unionfs/super.c,v
retrieving revision 1.96
diff -u -p -r1.96 super.c
--- super.c 25 Jun 2006 23:57:43 -0000 1.96
+++ super.c 10 Aug 2006 02:49:32 -0000
@@ -670,15 +670,26 @@ enum {
static void do_decode(__u32 * fh, struct dentry **hidden_root,
ino_t * hidden_ino, ino_t * hidden_parent_ino)
{
- *hidden_root = (void *)fh[FhHRoot2];
+
+#if BITS_PER_LONG == 32
+ *hidden_root = (void*)fh[FhHRoot2];
*hidden_ino = fh[FhHIno2];
*hidden_parent_ino = fh[FhHPIno2];
-#if BITS_PER_LONG == 64
- *hidden_root |= fh[FhHRoot1] << 32;
- *hidden_ino |= fh[FhHIno1] << 32;
- *hidden_parent_ino |= fh[FhHPIno1] << 32;
-#elif BITS_PER_LONG == 32
- /* ok */
+#elif BITS_PER_LONG == 64
+ unsigned long p;
+ p = fh[FhHRoot1];
+ p <<= 32;
+ p |= fh[FhHRoot2];
+ *hidden_root = (void*)p;
+ p = fh[FhHIno1];
+ p <<= 32;
+ p |= fh[FhHIno2];
+ *hidden_ino = (void*)p;
+ p = fh[FhHPIno1];
+ p <<= 32;
+ p |= fh[FhHPIno2];
+ //*hidden_parent_ino = (void*)p;
+ *hidden_parent_ino = p;
#else
#error unknown size
#endif
@@ -725,13 +736,24 @@ static int unionfs_encode_fh(struct dent
unlock_dentry(sb->s_root);
h_ino = itohi_index(dentry->d_inode, bindex)->i_ino;
hp_ino = parent_ino(dtohd(dentry));
+#if BITS_PER_LONG == 32
fh[FhHRoot2] = (__u32) h_root;
fh[FhHIno2] = h_ino;
fh[FhHPIno2] = hp_ino;
-#if BITS_PER_LONG == 64
- fh[FhHRoot1] = h_root >> 32;
- fh[FhHIno1] = h_ino >> 32;
- fh[FhHPIno1] = hp_ino >> 32;
+#elif BITS_PER_LONG == 64
+ {
+ unsigned long p;
+ p = (unsigned long)h_root;
+ fh[FhHRoot1] = p >> 32;
+ fh[FhHRoot2] = p;
+ p = (unsigned long)h_ino;
+ fh[FhHIno1] = p >> 32;
+ fh[FhHIno2] = p;
+ //p = (unsigned long)hp_ino;
+ p = hp_ino;
+ fh[FhHPIno1] = p >> 32;
+ fh[FhHPIno2] = p;
+ }
#endif
out:
_______________________________________________
unionfs mailing list
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs