GPFS VFS module

Stefan (metze) Metzmacher metze at samba.org
Thu Nov 20 11:11:04 GMT 2008


Volker Lendecke schrieb:
> On Thu, Nov 20, 2008 at 10:34:10AM +0100, Stefan (metze) Metzmacher wrote:
>> Volker Lendecke schrieb:
>>> On Wed, Nov 19, 2008 at 01:28:54PM +0100, Stefan (metze) Metzmacher wrote:
>>>> what's the reason for not just linking against -lgpfs or -lgpfs_gpl
>>>> instead of using dlopen()?
>>> The original idea was to ship that stuff in standard
>>> distributions like RHEL which do not have GPFS around by
>>> default.
>>>
>>> Mathias, is this still a requirement?
>> But you need to have the libgpfs-devel package installed
>> at build time anyway and when vfs_gpfs is build as shared module
>> smbd would not link to -lgpfs directly.
> 
> Ah, ok, you can have a library dependency in a .so that is
> loaded by dlopen()? I did not know that.

yes, I think so, it should be the same as linking to -lldap (see the
example below).

The only thing that might be needed is to move vfs_gpfs into its own
binary rpm (still build it from the same src rpm) that depends on
the libgpfs package.

metze at SERNOX:~/devel/samba/4.0/master4-drsuapi/source4$ cat myldap.c
int main(void)
{
        return 0;
}
metze at SERNOX:~/devel/samba/4.0/master4-drsuapi/source4$ gcc -c -o
myldap.o myldap.c
metze at SERNOX:~/devel/samba/4.0/master4-drsuapi/source4$ gcc -o myldap
myldap.o -lldap
metze at SERNOX:~/devel/samba/4.0/master4-drsuapi/source4$ readelf -d myldap

Dynamic section at offset 0x760 contains 22 entries:
  Tag        Type                 Name/Value
 0x0000000000000001 (NEEDED)      Shared library: [libldap_r-2.4.so.2]
 0x0000000000000001 (NEEDED)      Shared library: [libc.so.6]
 0x000000000000000c (INIT)        0x400470
 0x000000000000000d (FINI)        0x400654
 0x0000000000000004 (HASH)        0x400240
 0x000000006ffffef5 (GNU_HASH)    0x400278
 0x0000000000000005 (STRTAB)      0x400388
 0x0000000000000006 (SYMTAB)      0x4002b0
 0x000000000000000a (STRSZ)       131 (bytes)
 0x000000000000000b (SYMENT)      24 (bytes)
 0x0000000000000015 (DEBUG)       0x0
 0x0000000000000003 (PLTGOT)      0x600918
 0x0000000000000002 (PLTRELSZ)    24 (bytes)
 0x0000000000000014 (PLTREL)      RELA
 0x0000000000000017 (JMPREL)      0x400458
 0x0000000000000007 (RELA)        0x400440
 0x0000000000000008 (RELASZ)      24 (bytes)
 0x0000000000000009 (RELAENT)     24 (bytes)
 0x000000006ffffffe (VERNEED)     0x400420
 0x000000006fffffff (VERNEEDNUM)  1
 0x000000006ffffff0 (VERSYM)      0x40040c
 0x0000000000000000 (NULL)        0x0
metze at SERNOX:~/$ ldd myldap
        linux-vdso.so.1 =>  (0x00007fff6e7fd000)
        libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2
(0x00007ff866214000)
        libc.so.6 => /lib/libc.so.6 (0x00007ff865eb2000)
        liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0x00007ff865ca4000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x00007ff865a8e000)
        libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x00007ff865875000)
        libgnutls.so.13 => /usr/lib/libgnutls.so.13 (0x00007ff8655f1000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007ff8653d5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ff866459000)
        libdl.so.2 => /lib/libdl.so.2 (0x00007ff8651d1000)
        libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0x00007ff864fc1000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007ff864daa000)
        libgcrypt.so.11 => /lib/libgcrypt.so.11 (0x00007ff864b5c000)
        libgpg-error.so.0 => /lib/libgpg-error.so.0 (0x00007ff864959000)
metze at SERNOX:~/$ ldd /usr/lib/libldap_r-2.4.so.2
        linux-vdso.so.1 =>  (0x00007fff91ffe000)
        liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0x00007f9989a9b000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x00007f9989885000)
        libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x00007f998966b000)
        libgnutls.so.13 => /usr/lib/libgnutls.so.13 (0x00007f99893e7000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007f99891cb000)
        libc.so.6 => /lib/libc.so.6 (0x00007f9988e68000)
        libdl.so.2 => /lib/libdl.so.2 (0x00007f9988c64000)
        libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0x00007f9988a54000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f998883c000)
        libgcrypt.so.11 => /lib/libgcrypt.so.11 (0x00007f99885ee000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f9989f08000)
        libgpg-error.so.0 => /lib/libgpg-error.so.0 (0x00007f99883eb000)

metze


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20081120/17afec8b/signature.bin


More information about the samba-technical mailing list