[Tux3] [PATCH 1/2] Implementing listattr for fuse: FIX unitialized sb->atomref_base and unatom_base
Jonas Fietz
info at jonasfietz.de
Mon Dec 1 10:56:25 PST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
maybe introduced through porting to the kernel, i believe these two
values were not initialized anymore. Thusly setting an xattr did not work.
I calculate them the same way as they are being calculated in
user/super.c. I hope this is correct; another method might be to save
them along with the sb.
Thanks to Hirofumi for helping me get there.
# HG changeset patch
# User Jonas Fietz <data at geekig.de>
# Date 1228156893 -3600
# Node ID 41fb4940acadb1cfd095bfeb68ea625b428dc1d6
# Parent 954112a5893e0da997d469a068b29108b07323b0
Fixed unitialized sb->atomref_base and sb->unatom_base
diff -r 954112a5893e -r 41fb4940acad user/kernel/super.c
- --- a/user/kernel/super.c Mon Dec 01 05:14:16 2008 +0900
+++ b/user/kernel/super.c Mon Dec 01 19:41:33 2008 +0100
@@ -41,6 +41,8 @@
sb->nextalloc = from_be_u64(super->nextalloc);
sb->atomgen = from_be_u32(super->atomgen);
sb->freeatom = from_be_u32(super->freeatom);
+ sb->atomref_base = 1 << (40 - sb->blockbits); // see xattr.c
+ sb->unatom_base = sb->unatom_base + (1 << (34 - sb->blockbits));
return 0;
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
iEYEARECAAYFAkk0M1MACgkQydrGfzV1md3K6QCfRxYROKo7N0l7NzKhaZQvT84O
CSIAoLlyG6JdqSPLVStOL8x5JgobtGsr
=9o+F
-----END PGP SIGNATURE-----
_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://tux3.org/cgi-bin/mailman/listinfo/tux3
More information about the Tux3
mailing list