Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: updating HFS+ inode info. on open() call
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: updating HFS+ inode info. on open() call



I am trying to store statistical information with files that persists across reboots. Theoretically it looks like an attribute record (HFSPlusAttrInlineData) would be the best place to put this information, however it does not look like those work yet (correct me if I am wrong.)

FIRST:
I want to store a counter with each file (or file metadata) counting open()'s. I can then set them to zero and run filesystem benchmarks and get file access statistics. "But," they say, "this can be done by taking a trace." I know, but it would not show me how to store statistical information with files. Why do I want to do this then?

NEXT:
I will be able to store predictive information with files. Specifically I would like to store a reference to the file that gets accessed next. I plan to do this at the time of the next open().
This will give me file grouping information and predictive pre-fetching information.

The situation with mmap() had not crossed my mind, however I am not sure if it is an issue with what I am ultimately trying to do.

Ian



What exactly are you trying to do?

Is this total number of open() calls for a file counter? Does it persist across reboot?

Are you planning on decrementing the counter when close() is called?
If so, What do you intend to do for the case

open()
mmap()
close()

Now you counter goes to 0, but the inode is still in use...


--Umesh
--
Umesh Vaishampayan Apple Computer, Inc.
Mac OS X Kernel Ph: (408) 974 0229
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: updating HFS+ inode info. on open() call (From: Umesh Vaishampayan <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.