[Lsf-pc] [LSF/MM TOPIC] async buffered diskio read for userspace apps

Milosz Tanski milosz at adfin.com
Fri Jan 23 13:00:18 MST 2015


On Fri, Jan 23, 2015 at 7:18 AM, Volker Lendecke
<Volker.Lendecke at sernet.de> wrote:
> Hi, Milosz!
>
> On Thu, Jan 22, 2015 at 07:03:39PM -0500, Milosz Tanski wrote:
>> Sorry for the spam to everybody in advance... this thread got away from me.
>>
>> This is a general libsmbclient-raw question for you guys (even outside the
>> context of FIO). How should an external person consuming libsmbclient-raw
>> link to it?
>
> The lower level libsmbclient with the async functions was never meant
> to be externally consumed. I know this is a major deficiency, but nobody
> took the time to make this a proper interfaces. Compared to the age of our
> project, the async SMB2 client interface for example is relatively new,
> and is still undergoing changes. This has served us well in the past,
> because we had the freedom to experiment freely, and we definitely need a
> place to do these experiments without API compatibility concerns. There
> is certainly tension between features and a stable API. An example is
> SMB3 multichannel or RDMA or other features not developed yet. These
> features must show through at some layer, but you don't necessarily get
> an API right the first time.
>
> We had a similar discussion just recently with some internal
> restructuring. OpenChange requires a certain library structure that we
> broke without knowing.
>
> As the Linux kernel people only know too well, API design can be
> a difficult, and if you get it wrong you will get problems in the
> future. We never took the time for the lower level SMB library, sorry.
>
> This of course does not mean that we want to make it harder than
> necessary, but we don't yet give promises about API stability here.

Volker,

I understand that anything but libsmbclient is not API stable. I'm
okay with that. I make it possible to link to libsmbclient-raw and not
have it fail with linker errors when you're using pkgconfig (which is
the whole goal of using pkgconfig). I've included a patch to include
additional requires in pkgconfig so in doesn't fail with common
symbols that are part of the smb_cli.h and smb_cliraw.h headers.

If I get to it over the weekend (in between testing preadv2) I'm going
to break out private/liberrors.so into libsamba-errors.so. It doesn't
make sense to not let the libsmbclient-raw error codes be part of a
private library.

As always thanks for your help.
- Milosz

diff --git a/source4/libcli/raw/smbclient-raw.pc.in
b/source4/libcli/raw/smbclient-raw.pc.in
index 3c0c791..d03bb11 100644
--- a/source4/libcli/raw/smbclient-raw.pc.in
+++ b/source4/libcli/raw/smbclient-raw.pc.in
@@ -8,3 +8,4 @@ Description: SMB client
 Version: @PACKAGE_VERSION@
 Libs: @LIB_RPATH@ -L${libdir} -lsmbclient-raw
 Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1
+Requires: samba-util dcerpc


More information about the samba-technical mailing list