Detecting stale storage layouts without using client locks
AssigneeRed Hat, Inc.
InventorsRaghavendra Gowdappa, Shyamsundar Ranganathan
Life of this patent
Estimating the term…
Abstract
Systems and methods for reducing locks on a storage layout of a distributed file system by detecting and notifying clients of stale storage layouts. An example method may comprise: receiving a request to modify a file system object associated with a storage layout, the request comprising an index range and the storage layout comprising an index range; determining whether the request is associated with a stale storage layout in view of a comparison of the index range of the request and the one or more index ranges of the storage layout; receiving a lock request to prevent changes to the storage layout; and transmitting at least a portion of the storage layout to update the stale storage layout.
Claims19
A method comprising:
- transmitting, by a client device to a node of a distributed file system, a request to modify a file system object of the distributed file system, wherein the request comprises a first index range indicating a beginning and an ending of a first set of file system objects stored by the node, the first index range comprising a first hash range, and wherein the first index range is based on a particular version of a storage layout of the distributed file system stored on the client device;
- receiving, by the client device from the node, a notification that the particular version of the storage layout of the distributed file system stored on the client device comprises a stale version of the storage layout of the distributed file system, wherein the notification is sent by the node responsive to the first index range not matching a second index range of the storage layout of the distributed file system, the second index range comprising a second hash range;
- sending, by the client device to the node, a lock request to prevent changes to the storage layout responsive to the notification;
- receiving, by the client device, at least a portion of the storage layout corresponding to the first index range to update the stale version of the storage layout to the second index range associated with the request;
- and
- updating, by the client device, the particular version of the storage layout stored on the client device based on the at least the portion of the storage layout corresponding to the first index range.
A system comprising:
- a memory storing data of a distributed file system;
- and
- a processing device of a client device of the distributed file system operatively coupled to the memory, the processing device to:
- transmit, to a node of the distributed file system, a request to modify a file system object of the distributed file system, wherein the request comprises a first index range indicating a beginning and an ending of a first set of file system objects stored by the node, the first index range comprising a first hash range, and wherein the first index range is based on a particular version of a storage layout of the distributed file system stored on the client device;
- receive, from the node, a notification that the particular version of the storage layout of the distributed file system stored on the client device comprises a stale version of the storage layout of the distributed file system, wherein the notification is sent by the node responsive to the first index range not matching a second index range of the storage layout of the distributed file system, the second index range comprising a second hash range;
- send, to the node, a lock request to prevent changes to the storage layout responsive to the notification;
- receive at least a portion of the storage layout corresponding to the first index range to update the stale version of the storage layout to the second index range associated with the request;
- and
- update the particular version of the storage layout stored on the client device based on the at least the portion of the storage layout corresponding to the first index range.
A non-transitory machine-readable storage medium comprising instructions that cause a processing device of a client device of a distributed file system to:
- transmit, to a node of the distributed file system, a request to modify a file system object of the distributed file system, wherein the request comprises a first index range indicating a beginning and an ending of a first set of file system objects stored by the node, the first index range comprising a first hash range, and wherein the first index range is based on a particular version of a storage layout of the distributed file system stored on the client device;
- receive, from the node, a notification that the particular version of the storage layout of the distributed file system stored on the client device comprises a stale version of the storage layout of the distributed file system, wherein the notification is sent by the node responsive to the first index range not matching a second index range of the storage layout of the distributed file system, the second index range comprising a second hash range;
- send, to the node, a lock request to prevent changes to the storage layout responsive to the notification;
- receive at least a portion of the storage layout corresponding to the first index range to update the stale version of the storage layout to the second index range associated with the request;
- and
- update the particular version of the storage layout stored on the client device based on the at least the portion of the storage layout corresponding to the first index range.
Dependencies are inferred from the claim text.