On 2012-09-24 07:43, Oei, Yung-Chin wrote:
> On 24 September 2012 05:47, Gabriel Filion <
lel...@gmail.com> wrote:
>> There is still one problem with the current code:
>>
>> * Directories return a hard-coded value (4096 bytes) for their size.
>
> What kind of problems do you get from that?
the actual issue here was that I didn't know how to approach calculating
that number in a more reasonable way. so mentioning that here helped to
stimulate discussion ;)
> I think I've seen other
> VFSes just return 0 size for directories. I have some cifs-mounts that
> do that, and have not had practical problems with that so far.
>
> I would perhaps say that I'd prefer 0 for a hard-coded value, because
> that makes it clear it's a bogus value, whereas 4k could possibly be a
> real value.
right. that's a good point.
> But if you want something closer to the behaviour of
> "proper" FSes, would it make sense instead to return the size of the
> .bupm file?
could be an interesting implementation. is that ok with others? if it
is, I'll add this for my next rerun of the patch.
>> this is still very slow, though, and I wouldn't be comfortable for it to be
>> accepted as-is. But I'm sending it to the list for comments.
>
> Thanks, I'll give it a spin!
>
> Btw, I think you mentioned you were looking at xattr/acl support too?
yes I was/am. I've found methods of the fuse.Fuse class (getxattr(),
setxattr()) that we could implement to expose xattrs, but I'm not sure
whether acls are possible via FUSE.
I've had a very tough time finding any documentation about FUSE that
made any sense :( there are some examples out there that show how to
implement an FS and some very rare that show how to implement
get/setxattr, but I can't find proper documentation for the different
possible methods.
normally adding xattr support shouldn't be too tough and since the
Metadata objects are cached in each node (e.g. the damage is already
done for exposing simple metadata) it shouldn't have too much of a
negative impact on what's currently happening with my patch.
IIRC last time I had resorted to reading the python fuse layer to see
what methods were available, and that's how I saw there weren't any for
acls..
> Would you have a use for an extra pair of hands (well, brains, but
> that sounds pretentious) for that?
of course ;)
I'll try and get my hands on the xattr exposure soon.
I'm also trying to find a way to expose metadata through "bup ls"/ "bup
ftp ls" by reimplementing as less functionality as possible :)
the final step (could be done in parallel actually... it's final because
I think it has the lowest priority in my mind) would be to expose
metadata via "bup web", too. For this one, we'll probably simply re-use
the stuff from this patch and simply add some markup to hold the new
information.
I think that would make all front ends expose metadata, I hope I'm not
forgetting one :)
if you're able to implement any of the above points before me, then
we'll be advancing :)
we can also coordinate either here or on IRC.
--
Gabriel Filion