Opened 3 years ago

Closed 5 months ago

#17243 closed bug (no change required)

stat command displays nanoseconds with file system: BFS

Reported by: fuhllrdv Owned by: axeld
Priority: normal Milestone: Unscheduled
Component: File Systems/BFS Version: R1/beta3
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by fuhllrdv)

https://i.imgur.com/xeNKlmD.png

You see that I have created a text file and edited it. stat command only shows the timestamp correctly under "Modify", just like Tracker shows it.

Under Access and Change you see nanoseconds. But the file system BFS supports only 1-second granularity.

Change History (5)

comment:1 by fuhllrdv, 3 years ago

This was only tested with the Live CD.

Here is a second bug:

When I install Haiku OS (R1/beta3) on the hard disk and edit the text file and run stat command. All timestamps have nanoseconds, which should not be because they are not real nanoseconds because BFS only supports 1-second granularity. The nanoseconds displayed there would be useless or why is it displayed? I think it is a bug.

https://i.imgur.com/HkrGiXQ.png

comment:2 by fuhllrdv, 3 years ago

Description: modified (diff)

comment:3 by korli, 3 years ago

related #15102

in reply to:  3 comment:4 by fuhllrdv, 3 years ago

Replying to korli:

related #15102

Can you remove stat command from Haiku OS?

It behaves too buggy and creates too many misunderstandings.

stat command must come back only when it has fixed most of the problems.

comment:5 by waddlesplash, 5 months ago

Resolution: no change required
Status: newclosed

But the file system BFS supports only 1-second granularity.

This isn't correct, it does actually have a sub-second granularity, though not full microseconds. You can see the logic for this in the source code: https://xref.landonf.org/source/xref/haiku/src/add-ons/kernel/file_systems/bfs/bfs.h#246

So, there isn't anything more to be done here. The other ticket linked remains for the question about "access".

Note: See TracTickets for help on using tickets.