IP Library › Granted Patent US 9,819,570
Granted Patent B2
US 9,819,570 · App. 14/050,255 · Granted Nov 14, 2017

Dynamic symbolic links for referencing in a file system

Inventors: Atsushi Abe (Kanagawa-ken, JP); David A. Pease (Redwood Estates, CA); Lucas C. Villa Real (Sao Paulo, BR)
Assignee: International Business Machines Corporation
H04L45/02
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,819,570
App. No.
14/050,255
Granted
Nov 14, 2017
Kind
B2
Abstract

Embodiments of the invention relate to providing dynamic absolute-path symbolic links. According to one embodiment, indication of a symbolic link is received, which references a target, the indication including an absolute path of the target that includes a target mount point and a name of the target. A current mount point of the target is identified, and a verification is made that the target mount point is identical to the current mount point. When the target mount point is identical to the current mount point, a string length of the current mount point is determined, and an in-memory record of the symbolic link is created. The in-memory record includes the string length of the current mount point associated with the symbolic link.

Claims (82)

1. A computer program product for providing dynamic absolute-path symbolic links, the computer program product comprising a computer readable storage device having computer program code embodied therewith, the program code readable/executable by a processor to:

receive indication of a symbolic link which references a target, the indication including an absolute path of the target, wherein the absolute path comprises a target mount point and a name of the target;

identify a current mount point of the target;

verify that the target mount point is identical to the current mount point;

in response to a determination that the target mount point is identical to the current mount point:

determine a string length of the current mount point; and

create an in-memory record of the symbolic link, the in-memory record comprising the string length of the current mount point associated with the symbolic link;

receive a request to the symbolic link, the symbolic link comprising a second absolute path with an outdated target mount point;

determine whether an in-memory record exists for the symbolic link;

return the second absolute path in response to a determination that the in-memory record is empty or does not exist; and

in response to a determination that the in-memory record is non-empty after receiving the request to the symbolic link:

replace the outdated target mount point from the second absolute path with the current mount point to form a modified absolute path; and

return the modified absolute path.

2. The computer program product as recited in claim 1 , wherein the program code for verifying that the target mount point is identical to the current mount point comprises program code readable/executable by the processor to:

compare a string length of the target mount point to a string length of the current mount point;

determine that the target mount point is not identical to the current mount point in response to a determination that the string length is different; and

determine that the target mount point is not identical to the current mount point in response to a determination that the string length is the same and a content of the current mount point is different from a content of the target mount point.

3. The computer program product as recited in claim 1 , wherein the program code is further readable/executable by the processor to update the in-memory record of the symbolic link in response to a change to the current mount point of the target by:

determining a string length of the current mount point, and

updating the in-memory record of the symbolic link with the string length of the current mount point.

4. The computer program product as recited in claim 1 , wherein the program code is further readable/executable by the processor to store a length of a media identifier to the in-memory record in response to a determination that the symbolic link includes the media identifier.

5. The computer program product as recited in claim 4 , wherein the program code is further readable/executable by the processor to:

in response to a determination that the in-memory record is non-empty:

replace the outdated target mount point from the second absolute path with the current mount point and the media identifier to form a modified absolute path; and

return the modified absolute path.

6. The computer program product as recited in claim 1 , wherein a plurality of in-memory records are stored for a plurality of symbolic links, each updated in-memory record indicating a current mount point for its associated target, and wherein the target comprises at least one file and/or at least one directory stored on media of a storage system.

7. A computer program product for using dynamic absolute-path symbolic links, the computer program product comprising a computer readable storage device having computer program code embodied therewith, the program code readable/executable by a processor to:

receive a request to utilize a symbolic link which references a target using an absolute path, the absolute path comprising a target mount point and a name of the target;

determine whether an in-memory record exists for the symbolic link;

return the absolute path in response to a determination that the in-memory record is empty or does not exist;

in response to a determination that the in-memory record is non-empty:

replace the target mount point from the absolute path with a current mount point to form a modified absolute path; and

return the modified absolute path;

receive a request to the symbolic link, the symbolic link comprising a second absolute path with an outdated target mount point;

determine whether an in-memory record exists for the symbolic link; and

return the second absolute path in response to a determination that the in-memory record is empty or does not exist.

8. The computer program product as recited in claim 7 , wherein the program code is further readable/executable by the processor to:

receive indication of the symbolic link, the indication including the absolute path of the target;

identify the current mount point of the target;

verify that the target mount point is identical to the current mount point; and

in response to a determination that the target mount point is identical to the current mount point:

determine a string length of the current mount point; and

create an in-memory record for the symbolic link, the in-memory record comprising the string length of the current mount point associated with the symbolic link.

9. The computer program product as recited in claim 8 , wherein the program code for verifying that the target mount point is identical to the current mount point comprises program code readable/executable by the processor to:

compare a string length of the target mount point to a string length of the current mount point;

determine that the target mount point is not identical to the current mount point in response to a determination that the string length is different; and

determine that the target mount point is not identical to the current mount point in response to a determination that the string length is the same and a content of the current mount point is different from a content of the target mount point.

10. The computer program product as recited in claim 8 , wherein the program code is further readable/executable by the processor to store a length of a media identifier to the in-memory record in response to a determination that the symbolic link includes the media identifier.

11. The computer program product as recited in claim 7 , wherein the program code is further readable/executable by the processor to add a media identifier to the modified absolute path in response to a determination that the in-memory record comprises the media identifier.

12. The computer program product as recited in claim 7 , wherein the program code is further readable/executable by the processor to update the in-memory record of the symbolic link in response to a change to the current mount point of the target by:

determining a string length of the current mount point, and

updating the in-memory record of the symbolic link with the string length of the current mount point.

13. The computer program product as recited in claim 7 , wherein a plurality of in-memory records are stored for a plurality of symbolic links, each updated in-memory record indicating a current mount point for its associated target, and wherein the target comprises at least one file and/or at least one directory stored on media of a storage system.

14. A system configured to provide dynamic absolute-path symbolic links, the system comprising:

a hardware processor; and

logic integrated with and/or executable by the processor, the logic being configured to cause the processor to:

receive indication of a symbolic link which references a target, the indication including an absolute path of the target, wherein the absolute path comprises a target mount point and a name of the target;

identify a current mount point of the target;

verify that the target mount point is identical to the current mount point; and

in response to a determination that the target mount point is identical to the current mount point:

determine a string length of the current mount point; and

create an in-memory record of the symbolic link, the in-memory record comprising the string length of the current mount point associated with the symbolic link;

receive a request to the symbolic link, the symbolic link comprising a second absolute path with an outdated target mount point;

determine whether an in-memory record exists for the symbolic link;

return the second absolute path when the in-memory record is empty or does not exist; and

in response to a determination that the in-memory record is non-empty after receiving the request to the symbolic link:

replace the outdated target mount point from the second absolute path with the current mount point to form a modified absolute path; and

return the modified absolute path.

15. The system as recited in claim 14 , wherein the logic

configured to cause the processor to verify that the target mount point is identical to the

current mount point is further configured to cause the processor to:

compare a string length of the target mount point to a string length of the current mount point; and

determine that the target mount point is not identical to the current mount point in response to a determination that the string length is different.

16. The system as recited in claim 14 , wherein the logic is further configured to cause the processor to update the in-memory record of the symbolic link in response to a change to the current mount point of the target by:

determining a string length of the current mount point, and

updating the in-memory record of the symbolic link with the string length of the current mount point.

17. The system as recited in claim 14 , wherein a plurality of in-memory records are stored for a plurality of symbolic links, each updated in-memory record indicating a current mount point for its associated target, and wherein the target comprises at least one file and/or at least one directory stored on media of a storage system.

18. The system as recited in claim 14 , wherein the logic is further configured to cause the processor to store a length of a media identifier to the in-memory record in response to a determination that the symbolic link includes the media identifier.

19. The system as recited in claim 18 , wherein the logic is further configured to cause the processor to:

in response to a determination that the in-memory record is non-empty:

replace the outdated target mount point from the second absolute path with the current mount point and the media identifier to form a modified absolute path; and

return the modified absolute path.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 9, 2013
From: ABE, ATSUSHI; PEASE, DAVID A.; VILLA REAL, LUCAS C.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 031376/0827 →
Continuity (1)
Related Publication 20150100705A1 · Apr 9, 2015