Opened 12 years ago
Closed 8 years ago
#9834 closed bug (fixed)
bfs sends spurious B_STAT_MODIFICATION_TIME notifications after file change
Reported by: | bonefish | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | File Systems/BFS | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
After a file has been changed (or just touch
ed) BFS starts sending out B_STAT_MODIFICATION_TIME
whenever the file is closed after opening it for writing, even if the file wasn't modified. Can be reproduced with the attached test programs:
- Start monitoring a file that hasn't been changed in this session, yet:
modified_time_monitor /path/to/file
- Verify that no spurious notification are sent yet (the test program waits 3s before closing the file):
open_for_writing /path/to/file
- Touch the file. Notifications are received as expected.
- Run
open_for_writing
again. This time afterclose()
a spurious notification is received.
Tested in the package-management branch, which corresponds to master hrev45747.
Attachments (2)
Change History (6)
by , 12 years ago
Attachment: | modified_time_monitor.cpp added |
---|
by , 12 years ago
Attachment: | open_for_writing.cpp added |
---|
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Can you try to remove line 381 from Index.cpp (http://cgit.haiku-os.org/haiku/tree/src/add-ons/kernel/file_systems/bfs/Index.cpp#n381)? I think that should fix your issue, in case it's really related to a volume without indices.
comment:3 by , 11 years ago
Confirmed that the issue only occurs with a volume without indices and that the suggested change fixes it.
comment:4 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in hrev50874. Obviously needed some time to think it over :-)
Can't reproduce with the steps you mentioned in hrev45817.
In theory this can happen if either Inode::fOldLastModified is not correctly maintained at some place, or if updating the last modified index failed, as that's fOldLastModified's main purpose.
Do you by any chance reproduce this on a volume without indices?