On 09/06/2013 10:12 AM, Tomáš Smetana wrote:
On Thu, 05 Sep 2013 15:25:05 +0200
Jan Synacek <jsynacek(a)redhat.com> wrote:
> 1) What is the purpose of FSCreationClassName, FSName and
> LFCreationClassName in the LMI_UnixFile class? If my understanding is
> correct, in the linux environment, it should be safe to ignore those,
> because it is impossible for any two files on the filesystem to have
> different paths and actually be the same file (following symlinks doesn't
> count here). In other words, file's path should be enough to unambiguously
> identify that file. Please, correct me if I'm wrong.
What about hard links? Do they count? I think it's the {device ID, inode
number} pair that uniquely identifies a "physical file". Not the path though.
I should clarify what I meant by "unambiguosly identifying a file". From the
provider's point of view, it actually doesn't matter if it's a hard link or
the
actual file. It uses lstat(2) inside to get the info about the file. So yes, if
there's a file that has a hard link somewhere on the filesystem, it's
essentially the same file, but it has two "instances". You can cat
<path-to-the-file> or cat <path-to-the-file's-hardlink>. You can do the
same
with GetInstance(). Two different paths, two different instances, but on the
filesystem, the same file.
I hope my explanation makes stuff a bit clearer.
--
Jan Synacek
Software Engineer, Red Hat