zmanda/amanda — pull request #50 by platbr (2014-02-15 01:19:23+00:00)
Title: Better size estimate for samba...

When DLE has a subdir, the estimate was taking too much time, because it was executing in ROOT of the share (even using -D subdir), now it will execute only in the subdir.

On the share's root (only to see the total amount of data):
````
/opt/apps/samba4/bin/smbclient //localhost/test -d 0 -U guest -E -c "archive 0;recurse;du"
Total number of bytes: 144090056
````
Original code of amanda when estimate size of //localhost/test/subdir:
````
/opt/apps/samba4/bin/smbclient //localhost/test -d 0 -U guest -E -D subdir -c "archive 0;recurse;du"
Total number of bytes: 144090056

````
With this patch when estimate size of //localhost/test/subdir:
````
/opt/apps/samba4/bin/smbclient //localhost/test -d 0 -U guest -E -D subdir -c "archive 0;recurse;du /subdir"
Total number of bytes: 72045028
`````
`````
-bash-4.1$ du -s /tmp/test
159832 /tmp/test
-bash-4.1$ du -s /tmp/test/*
79920 /tmp/test/pasta
79908 /tmp/test/subdir
`````
Tested with samba3 and samba4, same behavior.