[Box Backup-dev] COMMIT r299 - in box/trunk: . infrastructure lib/backupclient test/raidfile
Ben Summers
boxbackup-dev@fluffy.co.uk
Fri, 6 Jan 2006 11:31:41 +0000
On 6 Jan 2006, at 08:57, Martin Ebourne wrote:
> On Fri, 2006-01-06 at 08:37 +0000, Ben Summers wrote:
>> Do you get ENOTSUP if you try and set them when they're not enabled?
>
> According to the man page, yes, so detecting them being available
> is not
> hard.
I have committed a test which I think does basic coverage of the
necessary functionality within test/bbackupd. It should print a
warning about xattrs not being supported on a Linux which has it in
the kernel but not enabled on the filesystem. (although I haven't
tested this)
I have had to adjust the code a bit to allow xattrs to be read under
Darwin, as the behaviour is a little different to Linux. It should
still work under Linux, but be slightly less efficient. I doubt
making it more efficient is worth the increased complexity.
Please test under Linux.
>
>> Ah, I understand what's happened. Indeed, interception is disabled if
>> large file support is active, but large file support is a Linux only
>> thing. On other platforms, large files are not a recent innovation
>> and never needed anything special to be done.
>
> Ah, ok. So they probably should work fine on 64 bit linux on which the
> normal calls obviously work in 64 bit mode anyway. Actually, just
> tried
> the intercepts on this machine (amd64) and they all test and pass.
>
> I'm pretty sure Solaris uses large file support the same as linux
> (suspect that's where linux got the idea from).
Don't you just love all the wonderful little differences?
>
>> So, what's the best autoconf way of making this all Linux only?
>
> Of course, what we want is for those tests only to be active if
> intercepts are working. So we need an autoconf test that tries the
> intercepts out and reports success/failure. I'll take a look at that
> when I get chance.
That sounds the best plan!
>
> Maybe it wouldn't be too hard to figure out how to get the tests to
> work
> on 32 bit linux too. Possibly just as simple as intercepting a foo64
> version of the calls?
Maybe. I gave up when attempting it, but then, I have a low tolerance
of Linux.
I wonder if the interception could be done more reliably using a
LD_PRELOAD_LIBRARY (or DYLD_INSERT_LIBRARIES +
DYLD_FORCE_FLAT_NAMESPACE on Darwin)?
Ben