memorycraft/s3fs-cloudpack — pull request #1 by magro (2012-09-25 13:26:55+00:00)
Title: Incorporate fix for cache-issue (leading to "Bad file descriptor" error)

After building and installing the latest version (1.6.1 tag) and mounting an s3 bucket I get an error when I try to upload/create a file:

write error: Bad file descriptor

When I upload a file to s3 via the aws-console (web) and try to read it via s3fs-cloudpack, this works, though.

Then I tried the changes in magec's fork, and these solved the bad file descriptor issue. Can you please pull in these changes?

To reproduce the issue, what I've done in detail is the following:

##### Building/installing the package (maybe there can be anything improved)

```bash
git clone git://github.com/memorycraft/s3fs-cloudpack.git
tar czf s3fs-cloudpack_1.6.1.orig.tar.gz s3fs-cloudpack/
cd s3fs-cloudpack/
chmod u+x configure
./configure --prefix=/usr
dh_make -p s3fs-cloudpack_1.6.1
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -uc -us # (1 integration test fails -> nocheck)
sudo dpkg -i ../s3fs-cloudpack_1.6.1-1_i386.deb
```

##### Mount bucket (as root)

```bash
echo "myAccessKey:mySecretKey" > ~/.passwd-s3fs
chmod 600 ~/.passwd-s3fs
s3fs magro.tests3 /mnt/magro.tests3/ -o use_cache=/tmp -o readwrite_timeout=120
```

##### Create file - fails with "Bad file descriptor"

```bash
echo "hello s3" > /mnt/magro.tests4/hello.txt
> bash: echo: write error: Bad file descriptor
```