Skip to content

use xattr to trace file instead of inode #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

flier
Copy link

@flier flier commented Sep 8, 2015

When we trace file with inode, it will confuse sincedb if filesystem reuse an inode, which cause the file truncated random

https://logstash.jira.com/browse/LOGSTASH-685

Since we hard to prevent filesystem reuse a inode, we could use another fileId like windows did

http://stackoverflow.com/questions/16069898/can-inode-and-crtime-be-used-as-a-unique-file-identifier

As you know, most modern filesystem support Extended File Attributes, we could generate a UUID for file and store it in xattrs, which will associated with inodes (files, directories, symlinks, etc).

https://en.wikipedia.org/wiki/Extended_file_attributes
http://manpages.ubuntu.com/manpages/precise/man2/getxattr.2.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant