[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fuse-devel
Subject:    Re: [fuse-devel] [python-fuse] Nanosecond file times?
From:       Nikolaus Rath <Nikolaus () rath ! org>
Date:       2009-06-01 13:24:52
Message-ID: 87r5y4f5nf.fsf () vostro ! rath ! org
[Download RAW message or body]

Csaba Henk <csaba-ml@creo.hu> writes:
> On 2009-06-01, Nikolaus Rath <Nikolaus@rath.org> wrote:
>> Csaba Henk <csaba-ml@creo.hu> writes:
>>> For getattr, you get the path, and have to return an object which has
>>> the necessary stat fields (and may have some optional ones) as
>>> attributes. C code:
>>
>> Yes, but aren't st_{amt}time of type time_t and thus seconds since 1970?
>> How do I fit a higher resolution in there?
>
> In SUSv3, it is as you say, the st_*time fields are of time_t, letting
> thus only a second grained resolution. In SUSv4 though, there are no
> st_*time fields, but there are st_*tim fields, which are struct
> timespec; moreover
>
> So yes, probably it would be time to adopt SUSv4 for the python
> binding. This can happen sooner if someone yells that it's a real itch
> for him/her. Is it a real itch for you, or are you just wondering?

It's an itch for me, but nothing I can't work around.

I am currently writing unit tests for my filesystem and I wanted to
check if {amc}times are updated correctly by the different handlers.
Without proper time resolution, I have to insert sleep(1)'s between the
calls so that there is actually a difference in the time stamps. For
atime and mtime I can probably also use utime() to first reset the times
and avoid the sleep, but for ctime there seems to be no way to avoid it.


Best,

   -Nikolaus

-- 
  »Time flies like an arrow, fruit flies like a Banana. «

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
fuse-devel mailing list
fuse-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic