From Kerrighed

Contents

DVFS file struct management

The DVFS file structure is used to manage the sharing of an open file cluster wide. Its main goal is to make the file position counter coherent through nodes.

It is also used to ease the import / export of shared file structures.

DVFS file structure creation

The DVFS file structure (dvfs_file) is created during the first export of a file struct. On the node doing the export, an object id is created to identify the object (through get_unique_id) and is stored in the f_objid field of the file struct. Then, the dvfs_file struct is created through KDDM operations.

DVFS count field

The count field of the dvfs_file structure counts the number of nodes where at least one process is using a file structure identified cluster wide with the same f_objid.

DVFS count initialization

The count field is initialied to 1 at creation during the first export of a file. The value 1 reflects the presence of the file struct on the local node.

DVFS count incrementation

The DVFS file count is incremented in just one place : import_one_open_file. If the file is imported on a node for the first time, the dvsf count is incremented. Otherwise, the DVFS count does not change.

DVFS count decrementation

The DVFS file count is decremented in the put_dvfs_file. This function is called from the kernel free_file function when a file structure is freed.

DVFS count special cases

There are some special cases in the DVFS count management due to FAF serveur. Check out the FAF Server page.