IP Library Granted Patent US 10,891,153
Granted Patent B1
US 10,891,153 · App. 15/851,923 · Granted Jan 12, 2021

System and method for switching file systems underneath working processes

Inventors: Stanislav Kinsburskiy (Moscow, RU); Alexey Kobets (Seattle, WA)
Assignee: Virtuozzo International GmbH
G06F9/485G06F16/116G06F16/13G06F16/178
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 10,891,153
App. No.
15/851,923
Granted
Jan 12, 2021
Kind
B1
Abstract

A system and method is provided for switching file systems underneath working processes. An exemplary method includes identifying a process running on an operating system of a computing device that is using a file on a first file system and temporarily suspending execution of the process. Moreover, the method includes identifying existing references of the process to access the file on the first file system during execution of the process and replacing the existing reference of the process with a new reference for the process to access a second file on a second file system during execution of the process. Moreover, the second file on the second file system corresponds to the first file on the first file system. Finally, the method includes resuming execution of the process on the computing device.

Claims (48)

1. A method for switching file systems underneath working processes, the method comprising:

identifying at least one process that is using a first file on a first file system, the at least one process running on an operating system of a computing device;

temporarily suspending an execution of the at least one process;

identifying an existing reference of the at least one process to the first file on the first file system, the existing reference used by the at least one process to access the first file on the first file system during execution of the at least one process;

replacing, when the execution of the at least one process is suspended, the existing reference of the at least one process with a new reference for the at least one process to a second file on a second file system, the second file on the second file system corresponding to the first file on the first file system, wherein the replacing the existing reference comprises replacing one of a file descriptor, a file mapping, a reference to a current working directory, a reference to a root directory, and a reference to an executable file; and

resuming the execution of the at least one process, wherein, after resuming the execution of the at least one process, the new reference is used by the at least one process to access the second file on the second file system during execution of the at least one process.

2. The method according to claim 1 , wherein the existing reference is one of the file descriptor to an opened file, the file mapping, the reference to the current working directory of the at least one process, the reference to a root directory of the file system, and the reference to an executable file of the at least one process.

3. The method of claim 1 , wherein the first file on the first file system is one of a file or a directory.

4. The method of claim 1 , wherein the existing reference is the file descriptor in a file descriptor table of the at least one process that references the file.

5. The method of claim 4 , wherein replacing the existing reference further comprising:

opening a path of the second file on the second file system, wherein the second file on the second file system has the same attributes as the first file on the first file system;

sending a file descriptor associated with the opened path of the second file on the second file system to the at least one process; and

replacing the file descriptor that references the first file on the first file system with the file descriptor that references the second file on the second file system.

6. The method of claim 1 , wherein the existing reference is the file mapping in an address space of the at least one process that maps the file on the first file system to the address space of the at least one process.

7. The method of claim 6 , wherein replacing the existing reference further comprising:

opening a path of the second file on the second file system, wherein the second file on the second file system has the same attributes as the first file on the first file system;

sending a file descriptor associated with the opened path of the second file on the second file system to the at least one process; and

creating a new file mapping of the second file on the second file system in the address space of the at least one process, wherein the new file mapping of the second file has same attributes as existing file mapping of the first file;

replacing in the address space of the at least one process the existing file mapping of the first file on the first file system by the new file mapping of the second file on the second file system.

8. The method according to claim 1 , further comprising synchronizing, by a user application, attributes of the second file on the second file system with the same attributes as the first file on the first file system, wherein the synchronized attributes include at least one of a file name, path of a file, file owner and file attributes including at least one of access permissions of the file and size of the file.

9. The method according to claim 1 , further comprising synchronizing attributes of the new reference to be the same as attributes of the existing reference, wherein the attributes include at least one of opening flags, file offset, mapping range, mapping size, mapping flags, locks and notification routines.

10. The method according to claim 1 , wherein the second file system is a different type of file system than the first file system.

11. The method according to claim 1 , wherein the content of the second file on the second file system is different content than content of the first file on the first file system.

12. A system for switching file systems underneath working processes, the system comprising:

a first file system and a second file system each configured to store a plurality of electronic files; and

at least one processor configured to:

identify at least one process that is using a first file on the first file system, the at least one process running on an operating system of a computing device;

temporarily suspend an execution of the at least one process;

identify an existing reference of the at least one process to the first file on the first file system, the existing reference used by the at least one process to access the first file on the first file system during execution of the at least one process;

replace, when the execution of the at least one process is suspended, the existing reference of the at least one process with a new reference for the at least one process to a second file on the second file system, the second file on the second file system corresponding to the first file on the first file system, wherein the replacing the existing reference comprises replacing one of a file descriptor, a file mapping, a reference to a current working directory, a reference to a root directory, and a reference to an executable file; and

resume the execution of the at least one process, wherein, after resuming the execution of the at least one process, the new reference is used by the at least one process to access the second file on the second file system during execution of the at least one process.

13. The system according to claim 12 , wherein the existing reference is one of the file descriptor to an opened file, the file mapping, the reference to the current working directory of the at least one process, the reference to a root directory of the file system, and the reference to an executable file of the at least one process.

14. The system of claim 12 , wherein the first file on the first file system is one of a file or a directory.

15. The system of claim 12 , wherein the existing reference is the file descriptor in a file descriptor table of the at least one process that references the file.

16. The system of claim 15 , wherein the at least one processor is further configured to replace the existing reference by:

opening a path of the second file on the second file system, wherein the second file on the second file system has the same attributes as the first file on the first file system;

sending a file descriptor associated with the opened path of the second file on the second file system to the at least one process; and

replacing the file descriptor that references the first file on the first file system with the file descriptor that references the second file on the second file system.

17. The system of claim 12 , wherein the existing reference is the file mapping in an address space of the at least one process that maps the file on the first file system to the address space of the at least one process.

18. The system of claim 17 , wherein the at least one processor is further configured to replace the existing reference by:

opening a path of the second file on the second file system, wherein the second file on the second file system has the same attributes as the first file on the first file system;

sending a file descriptor associated with the opened path of the second file on the second file system to the at least one process; and

creating a new file mapping of the second file on the second file system in the address space of the at least one process, wherein the new file mapping of the second file has same attributes as existing file mapping of the first file;

replacing in the address space of the at least one process the existing file mapping of the first file on the first file system by the new file mapping of the second file on the second file system.

19. The system according to claim 12 , wherein attributes of the second file on the second file system are synchronized with the same attributes as the first file on the first file system, wherein the synchronized attributes include at least one of a file name, path of a file, file owner and file attributes including at least one of access permissions of the file and size of the file.

20. The system according to claim 12 , wherein the at least one processor is further configured to synchronize attributes of the new reference to be the same as attributes of the existing reference, wherein the attributes include at least one of opening flags, file offset, mapping range, mapping size, mapping flags, locks and notification routines.

21. The system according to claim 12 , wherein the second file system is a different type of file system than the first file system.

22. The system according to claim 12 , wherein the content of the second file on the second file system is different content than content of the first file on the first file system.

Assignments (2)
SECURITY INTEREST IN TRADEMARK, PATENT, AND COPYRIGHT RIGHTS Recorded Dec 22, 2022
From: VIRTUOZZO INTERNATIONAL GMBH; ONAPP LIMITED
To: WILMINGTON TRUST (LONDON) LIMITED
Reel/Frame 062206/0557 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 22, 2017
From: KINSBURSKIY, STANISLAV; KOBETS, ALEXEY
To: VIRTUOZZO INTERNATIONAL GMBH
Reel/Frame 044468/0678 →
Continuity (1)
Provisional Application 62462053 · Feb 22, 2017