fs: only return a permanode as a directory if we're sure it is
fs: only return a permanode as a directory if we're sure it is

If a well-timed lookup occurs while a file is being created, after the
permanode is available, but before any attribute claims declaring file
content, the file will be assumed to be a directory.

Ideally, FUSE would only hold on to this mistake for about a minute, or
the duration of the attribute cache, but it's much longer in practice.
Even with cammount effectively disabling all caches and returning fresh
dirents with random inodes, FUSE seemingly never sent in another Lookup
request for the broken entry.

While I wouldn't consider this a fix for the condition at large, I do
believe being explicit about what's a file, symlink, or directory is the
correct thing to do.

See also: http://camlistore.org/issue/293

Change-Id: I64d4afc8dfdb87b9b121d161936dd613139f00e2

slspeek/camlistore_namedsearch,apparentlymart/camlistore-debian,marook/camlistore,angelcabo/camlistore,henrylee2cn/camlistore,ginabythebay/camlistore,raff/camlistore,apparentlymart/camlistore-debian,ginabythebay/camlistore,tv42/camlistore,marook/camlistore,kbajey/testrepo,colemickens/camlistore,colemickens/camlistore,toshnix/camlistore,slspeek/camlistore_tls_test,henrylee2cn/camlistore,fgeller/camlistore,kbajey/testrepo,marook/camlistore,marook/camlistore,colemickens/camlistore,mpl/camlistore,fgeller/camlistore,minusnine/camlistore,nimbus/camlistore,kbajey/testrepo,ginabythebay/camlistore,nimbus/camlistore,mpl/camlistore,nimbus/camlistore,marook/camlistore,stevearm/camlistore,nimbus/camlistore,nimbus/camlistore,ginabythebay/camlistore,mpl/camlistore,apparentlymart/camlistore-debian,fgeller/camlistore,fgeller/camlistore,raff/camlistore,mpl/camlistore,tv42/camlistore,angelcabo/camlistore,henrylee2cn/camlistore,pombredanne/camlistore,ginabythebay/camlistore,mortenpi/camlistore,edrex/camlistore,stevearm/camlistore,pombredanne/camlistore,edrex/camlistore,stevearm/camlistore,slspeek/camlistore_namedsearch,raff/camlistore,stevearm/camlistore,fgeller/camlistore,mortenpi/camlistore,kbajey/testrepo,marook/camlistore,tv42/camlistore,colemickens/camlistore,raff/camlistore,henrylee2cn/camlistore,fgeller/camlistore,tv42/camlistore,camlistore/camlistore,camlistore/camlistore,fgeller/camlistore,toshnix/camlistore,slspeek/camlistore_namedsearch,apparentlymart/camlistore-debian,nimbus/camlistore,colemickens/camlistore,colemickens/camlistore,angelcabo/camlistore,henrylee2cn/camlistore,fgeller/camlistore,toshnix/camlistore,mpl/camlistore,minusnine/camlistore,camlistore/camlistore,toshnix/camlistore,toshnix/camlistore,slspeek/camlistore_namedsearch,slspeek/camlistore_namedsearch,marook/camlistore,toshnix/camlistore,stevearm/camlistore,edrex/camlistore,raff/camlistore,slspeek/camlistore_namedsearch,mpl/camlistore,tv42/camlistore,slspeek/camlistore_tls_test,apparentlymart/camlistore-debian,kbajey/testrepo,edrex/camlistore,ginabythebay/camlistore,tv42/camlistore,slspeek/camlistore_tls_test,henrylee2cn/camlistore,angelcabo/camlistore,angelcabo/camlistore,camlistore/camlistore,kbajey/testrepo,raff/camlistore,angelcabo/camlistore,camlistore/camlistore,apparentlymart/camlistore-debian,mortenpi/camlistore,toshnix/camlistore,slspeek/camlistore_tls_test,angelcabo/camlistore,minusnine/camlistore,nimbus/camlistore,angelcabo/camlistore,apparentlymart/camlistore-debian,stevearm/camlistore,camlistore/camlistore,mortenpi/camlistore,edrex/camlistore,henrylee2cn/camlistore,stevearm/camlistore,mortenpi/camlistore,ginabythebay/camlistore,edrex/camlistore,apparentlymart/camlistore-debian,minusnine/camlistore,nimbus/camlistore,mortenpi/camlistore,tv42/camlistore,colemickens/camlistore,ginabythebay/camlistore,mpl/camlistore,colemickens/camlistore,camlistore/camlistore,minusnine/camlistore,mortenpi/camlistore,nimbus/camlistore,minusnine/camlistore,minusnine/camlistore,raff/camlistore,raff/camlistore,marook/camlistore,mortenpi/camlistore,colemickens/camlistore,mpl/camlistore,pombredanne/camlistore,pombredanne/camlistore,edrex/camlistore,slspeek/camlistore_tls_test,kbajey/testrepo,camlistore/camlistore,slspeek/camlistore_namedsearch,slspeek/camlistore_tls_test,apparentlymart/camlistore-debian,fgeller/camlistore,henrylee2cn/camlistore,raff/camlistore,ginabythebay/camlistore,toshnix/camlistore,camlistore/camlistore,slspeek/camlistore_namedsearch,pombredanne/camlistore,angelcabo/camlistore,pombredanne/camlistore,pombredanne/camlistore,tv42/camlistore,mpl/camlistore,stevearm/camlistore,henrylee2cn/camlistore,minusnine/camlistore,edrex/camlistore,mortenpi/camlistore,slspeek/camlistore_tls_test,slspeek/camlistore_namedsearch,stevearm/camlistore,pombredanne/camlistore,toshnix/camlistore,tv42/camlistore,minusnine/camlistore,pombredanne/camlistore,slspeek/camlistore_tls_test,kbajey/testrepo