[Top] [All Lists]

Find hardlinks to a file

To: xfs@xxxxxxxxxxx
Subject: Find hardlinks to a file
From: Chris Holcombe <xfactor973@xxxxxxxxx>
Date: Thu, 28 Aug 2014 16:14:25 -0700
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=REfcMvhPZviciAid4CbVIx+F6+PKA4eqyAUfwd11nmk=; b=gFeVD7D9fZpadxGiMvy5F4TVPH5H3ev1Qi2wmEVD7HR2YrvDbDrMNXyaTqvSygU5Xy Bt/viNZAhEFYY1qtcsSCSzPoLjNBiRSOrysgJpvl1b85+cz6xpS5nXjiencHxSjovluv zkGnfx29VI7vp3Q8ICugblf4RBWudyLdEiBXzmOP8bWtWEtpEjyj9VYAqfhXK+0nWJx0 DLIeNEfeCFyG+Qhe400VU78UB1ki1x/oL3SaopN2+7NfGm22KXm3QzFPJats9lXeliEu FDOCjUlvI96W2X+HmVQrQipxz/T7V/+NDLE4TDXtMpwM2fh93ZWsiteICWESPO+n88WI BDFA==
My apologies if this has already been asked.  I feel that I've done a
sufficient amount of Google search homework.  I'm working with Gluster
(http://www.gluster.org/) and they have a directory called xattrop
where they store links to files that need to be healed.  When I stat
the file I can see that there's 2 or 3 hard links to the file.  I
can't seem to find a way in code or with an xfs_* utility to find the
path of those hard links.  Does anyone know how to do this or if it's
even possible?  From looking through the XFS documentation I don't
really see a way to do it without a find /mount_point -num <number>
brute force method.  btrfs has a utility called:

btrfs inspect-internal inode-resolve [-v] <inode> <path>
              Resolves an <inode> in subvolume <path> to all filesystem

I'd like to build an equivalent tool in C for XFS if it's possible.


<Prev in Thread] Current Thread [Next in Thread>