IP Library Granted Patent US 9,830,331
Granted Patent B2
US 9,830,331 · App. 14/703,745 · Granted Nov 28, 2017

Cluster scale synchronization of producer consumer file access via multi-protocol nodes

Inventor: Subin Govind (San Jose, CA)
Assignee: NetApp, Inc.
G06F17/30168H04L67/1095
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,830,331
App. No.
14/703,745
Granted
Nov 28, 2017
Kind
B2
Abstract

In a storage cluster, a producer and a consumer can be remote from each other and have different capabilities. For example, a consumer may be running on a computing node (hereinafter “node”) that operates faster than a node hosting a producer. In addition, network conditions can impact communications to/from the producer and/or the consumer. This environment allows the possibility of a consumer violating sequential access constraints of a file when a producer is writing to the file. This can lead to the consumer reading incorrect data. A file system can ensure compliance with serialization of a concurrently accessed file by obtaining a lock on a subsequent file range before releasing a currently held write lock.

Claims (38)

1. A method comprising:

obtaining a write lock for a first computing entity on a first range of a file in response to a first request to write to the file from the first computing entity and after determining that the first range is not locked, wherein the file is hosted in a storage cluster;

determining a second range of the file to be written for the first computing entity;

obtaining a write lock for the first computing entity on the second range after determining that the first computing entity will write to the second range and before releasing the write lock on the first range;

preventing a second computing entity, which runs on a different computing node than the first computing entity, from reading a third range of the file that at least partially overlaps with either the first range or the second range while the first computing entity has the write locks on both the first and second ranges; and

obtaining a shared lock for the second computing entity for reading the third range after obtaining the first computing entity the write lock on the second range and releasing the write lock on the first range.

2. The method of claim 1 further comprising translating a second request into the first request, wherein the second request was received from a client accessing the storage cluster.

3. The method of claim 2 , wherein translating the second request into the first request comprises translating a file access protocol request into a local file system operation.

4. The method of claim 1 , wherein the write lock is an exclusive byte range lock and the read lock is a shared byte range lock.

5. The method of claim 1 further comprising preventing a third computing entity from obtaining a second write lock on a fourth range of the file that at least partially overlaps with the either the first range or the second range of the file.

6. The method of claim 1 , wherein the second range is indicated in either the first request or a third request, wherein the third request requests writing by the first computing entity to the second range.

7. One or more non-transitory machine-readable media having program code stored therein, the program code comprising program code to:

obtain a write lock for a first computing entity on a first range of a file in response to a first request to write to the file from the first computing entity and after determining that the first range is not locked, wherein the file is hosted in a storage cluster;

determine a second range of the file to be written for the first computing entity;

obtain a write lock for the first computing entity on the second range after a determination that the first computing entity will write to the second range and before release of the write lock on the first range;

prevent a second computing entity, which runs on a different computing node than the first computing entity, from reading a third range of the file that at least partially overlaps with either the first range or the second range while the first computing entity has the write locks on both the first and second ranges; and

obtain a shared lock for the second computing entity for reading the third range after obtaining of the write lock on the second range for the first computing entity and release of the write lock on the first range.

8. The one or more non-transitory machine-readable media of claim 7 further having stored therein program code to translate a second request into the first request, wherein the second request was received from a client accessing the storage cluster.

9. The one or more non-transitory machine-readable media of claim 8 , wherein the program code to translate the second request into the first request comprises program code to translate a file access protocol request into a local file system operation.

10. The one or more non-transitory machine-readable media of claim 7 , wherein the write lock is an exclusive byte range lock and the read lock is a shared byte range lock.

11. The one or more non-transitory machine-readable media of claim 7 further having stored therein program code to prevent a third computing entity from obtaining a second write lock on a fourth range of the file that at least partially overlaps with the either the first range or the second range of the file.

12. The one or more non-transitory machine-readable media of claim 7 , wherein the second range is indicated in either the first request or a third request, wherein the third request requests writing by the first computing entity to the second range.

13. The one or more non-transitory machine-readable media of claim 7 , wherein the third range is the same as either the first range or the second range.

14. The one or more non-transitory machine-readable media of claim 7 , further having stored therein program code to release the write lock on the first range after obtaining of the write lock on the second range for the first computing entity.

15. An apparatus comprising:

a processor;

a network interface; and

a machine readable medium having program code stored therein, the program code executable by the processor to cause the apparatus to,

obtain a write lock for a first computing entity on a first range of a file in response to a first request to write to the file from the first computing entity and after determining that the first range is not locked, wherein the file is hosted in a storage cluster;

determine a second range of the file to be written for the first computing entity;

obtain a write lock for the first computing entity on the second range after a determination that the first computing entity will write to the second range and before release of the write lock on the first range;

prevent a second computing entity, which runs on a different computing node than the first computing entity, from reading a third range of the file that at least partially overlaps with either the first range or the second range while the first computing entity has the write locks on both the first and second ranges; and

obtain a shared lock for the second computing entity for reading the third range after obtaining of the write lock on the second range for the first computing entity and release of the write lock on the first range.

16. The apparatus of claim 15 , wherein the machine readable medium further has stored therein program code to translate a second request into the first request, wherein the second request was received from a client accessing the storage cluster.

17. The apparatus of claim 16 , wherein the program code to translate the second request into the first request comprises program code to translate a file access protocol request into a local file system operation.

18. The apparatus of claim 15 , wherein the machine readable medium further has stored therein program code to prevent a third computing entity from obtaining a second write lock on a fourth range of the file that at least partially overlaps with the either the first range or the second range of the file.

19. The apparatus of claim 15 , wherein the second range is indicated in either the first request or a third request, wherein the third request requests writing by the first computing entity to the second range.

20. The apparatus of claim 15 , wherein the machine readable medium further has stored therein program code to release the write lock on the first range after obtaining of the write lock on the second range for the first computing entity.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 4, 2015
From: GOVIND, SUBIN
To: NETAPP, INC.
Reel/Frame 035560/0476 →
Continuity (1)
Related Publication 20160328436A1 · Nov 10, 2016