FSCK Utilities
The fsck-utils implements a API for checking validity of different PVFS_objects.
More...
|
Files |
| file | fsck-utils.c |
| file | fsck-utils.h |
Data Structures |
| struct | PINT_fsck_options |
| | FSCK options. More...
|
Functions |
| int | PVFS_fsck_initialize (const struct PINT_fsck_options *options, const PVFS_credentials *creds, const PVFS_fs_id *cur_fs) |
| int | PVFS_fsck_validate_dfile (const struct PINT_fsck_options *fsck_options, const PVFS_handle *handle, const PVFS_fs_id *cur_fs, const PVFS_credentials *creds, PVFS_size *dfile_total_size) |
| int | PVFS_fsck_validate_dfile_attr (const struct PINT_fsck_options *fsck_options, const PVFS_sysresp_getattr *attributes) |
| int | PVFS_fsck_validate_metafile (const struct PINT_fsck_options *fsck_options, const PVFS_object_ref *obj_ref, const PVFS_sysresp_getattr *attributes, const PVFS_credentials *creds) |
| int | PVFS_fsck_validate_metafile_attr (const struct PINT_fsck_options *fsck_options, const PVFS_sysresp_getattr *attributes) |
| int | PVFS_fsck_validate_symlink (const struct PINT_fsck_options *fsck_options, const PVFS_object_ref *obj_ref, const PVFS_sysresp_getattr *attributes) |
| int | PVFS_fsck_validate_symlink_attr (const struct PINT_fsck_options *fsck_options, const PVFS_sysresp_getattr *attributes) |
| int | PVFS_fsck_validate_symlink_target (const struct PINT_fsck_options *fsck_options, const PVFS_sysresp_getattr *attributes) |
| int | PVFS_fsck_validate_dirdata (const struct PINT_fsck_options *fsck_options, const PVFS_handle *handle, const PVFS_fs_id *cur_fs, const PVFS_credentials *creds) |
| int | PVFS_fsck_validate_dirdata_attr (const struct PINT_fsck_options *fsck_options, const PVFS_sysresp_getattr *attributes) |
| int | PVFS_fsck_validate_dir (const struct PINT_fsck_options *fsck_options, const PVFS_object_ref *obj_ref, const PVFS_sysresp_getattr *attributes, const PVFS_credentials *creds, PVFS_dirent *directory_entries) |
| int | PVFS_fsck_validate_dir_attr (const struct PINT_fsck_options *fsck_options, const PVFS_sysresp_getattr *attributes) |
| int | PVFS_fsck_validate_dir_ent (const struct PINT_fsck_options *fsck_options, const char *filename) |
| int | PVFS_fsck_finalize (const struct PINT_fsck_options *fsck_options, const PVFS_fs_id *cur_fs, const PVFS_credentials *) |
| int | PVFS_fsck_get_attributes (const struct PINT_fsck_options *, const PVFS_object_ref *, const PVFS_credentials *, PVFS_sysresp_getattr *) |
| int | PVFS_fsck_check_server_configs (const struct PINT_fsck_options *, const PVFS_credentials *, const PVFS_fs_id *) |
Detailed Description
The fsck-utils implements a API for checking validity of different PVFS_objects.
List of PVFS_Object types with API's allowing validity checks:
- PVFS_TYPE_METAFILE
- PVFS_TYPE_DIRECTORY
- PVFS_TYPE_DATAFILE
- PVFS_TYPE_DIRDATA
- PVFS_TYPE_SYMLINK
The API is broken up into two sections. The first section simply validates whether an object is valid. The second section will perform some action in attempt to either fix or remove the problem.
- See also:
- PINT_fsck_options for optional file system checks
Any driver program calling this will need to initialize the PVFS system interface first.
Function Documentation
|
|
Verifies the same fs config is present on each pvfs2 server.
Ignores extraneous whitespace and comments begining with #. Does not stop on the first problem- will show any config differences, using the first server as the golden standard.
- Return values:
-
| 0 | on success |
| -PVFS_error | on failure |
- Parameters:
-
| fsck_options |
Populated options |
| creds |
pvfs2 credentials structure |
| cur_fs |
the current fs |
|
Here is the call graph for this function:
|
|
Performs final steps of fsck.
If option was enabled to check for stranded objects, then it will print any leftover objects.
- Return values:
-
| 0 | on success |
| -PVFS_error | on failure |
- Parameters:
-
| fsck_options |
Populated options |
| cur_fs |
The fsid the handle belongs to |
| creds |
populated credentials structure |
|
Here is the call graph for this function:
|
|
Get a pvfs2 objects attributes.
- Return values:
-
| 0 | on success |
| -PVFS_error | on failure |
- Parameters:
-
| fsck_options |
generic fsck options |
| pref |
object reference requesting attributes |
| creds |
populated credentials structure |
| getattr_resp |
attribute structure to populate |
|
Here is the call graph for this function:
|
|
Initializes API and checks options for correctness.
- Return values:
-
| 0 | on success |
| -PVFS_error | on failure |
- Parameters:
-
| fsck_options |
Populated options |
| creds |
Populated creditials structure |
| cur_fs |
filesystem id |
|
Here is the call graph for this function:
|
|
Performs sanity checking on the PVFS_TYPE_DATAFILE PVFS_Object type Checks the following: Existence of attributes.
- * .
- Return values:
-
| 0 | on success |
| -PVFS_error | on failure |
- Parameters:
-
| fsck_options |
generic fsck options |
| handle |
The dfile handle |
| cur_fs |
The fsid the handle belongs to |
| creds |
Populated creditials structure |
| dfiles_total_size |
Total size of all dfiles |
|
Here is the call graph for this function:
|
|
Performs validity checking for the attributes for PVFS_TYPE_DATAFILE Checks the following: Object Type must be PVFS_TYPE_DFILE size >= 0.
- * - * .
- Return values:
-
| 0 | on success |
| -PVFS_error | on failure |
- Parameters:
-
| fsck_options |
generic fsck options |
| getattr_resp |
DFILE attributes |
|
Here is the call graph for this function:
|
|
Performs sanity checking on the PVFS_TYPE_DIRECTORY PVFS_Object type.
Checks the following:
- gets and validates directory entry filenames
- Return values:
-
| 0 | on success |
| -PVFS_error | on failure |
- Parameters:
-
| fsck_options |
generic fsck options |
| obj_ref |
DIRECTORY object reference |
| attributes |
DIRECTORY attributes |
| creds |
populated creditials structure |
| directory_entries |
- Returns:
- readdir response
|
|
Here is the call graph for this function:
|
|
Performs validity checking for the attributes for PVFS_TYPE_DIRECTORY.
Checks the following:
- Object type must be PVFS_TYPE_DIRECTORY
- dirent_count must be >= 0
- Return values:
-
| 0 | on success |
| -PVFS_error | on failure |
- Parameters:
-
| fsck_options |
generic fsck options |
| attributes |
DIRECTORY attributes |
|
Here is the call graph for this function:
| int PVFS_fsck_validate_dir_ent |
( |
const struct PINT_fsck_options * |
fsck_options, |
|
|
const char * |
filename |
|
) |
|
|
|
|
Performs validity checking for the PVFS_TYPE_DIRECTORY directory entries Checks the following: invalid characters in entry names entry_names <= PVFS2_SEGMENT_MAX warnings for characters that tend to confuse shells.
- * - * - * .
- Return values:
-
| 0 | on success |
| -PVFS_error | on failure |
- Parameters:
-
| fsck_options |
generic fsck options |
| filename |
Filename associated with handle |
|
Here is the call graph for this function:
|
|
Performs sanity checking on the PVFS_TYPE_DIRDATA PVFS_Object type.
Checks the following:
- Return values:
-
| 0 | on success |
| -PVFS_error | on failure |
- Parameters:
-
| fsck_options |
generic fsck options |
| handle |
The dirdata handle |
| cur_fs |
The fsid the handle belongs to |
| creds |
Populated creditials structure |
|
Here is the call graph for this function:
|
|
Performs validity checking for the attributes for PVFS_TYPE_DIRDATA.
Checks the following:
- Object type must be PVFS_TYPE_DIRDATA
- Return values:
-
| 0 | on success |
| -PVFS_error | on failure |
- Parameters:
-
| fsck_options |
generic fsck options |
| attributes |
DIRDATA attributes |
|
Here is the call graph for this function:
|
|
Performs sanity checking on the PVFS_TYPE_METAFILE PVFS_Object type.
- Return values:
-
| 0 | on success |
| -PVFS_error | on failure |
- Parameters:
-
| fsck_options |
generic fsck options |
| obj_ref |
PVFS_Object reference |
| attributes |
METAFILE attributes |
| creds |
Populated creditials structure |
|
Here is the call graph for this function:
|
|
Performs validity checking for the attributes for PVFS_TYPE_METAFILE Checks the following: Object type must be PVFS_TYPE_METAFILE Existence of dfiles Existence of distribution size >= 0.
- * - * - * - * .
- Return values:
-
| 0 | on success |
| -PVFS_error | on failure |
- Parameters:
-
| fsck_options |
generic fsck options |
| attributes |
METAFILE attributes |
|
Here is the call graph for this function:
|
|
Performs sanity checking on the PVFS_TYPE_SYMLINK PVFS_Object type.
- Return values:
-
| 0 | on success |
| -PVFS_error | on failure |
- Parameters:
-
| fsck_options |
generic fsck options |
| obj_ref |
PVFS_Object reference |
| attributes |
SYMLINK attributes |
|
Here is the call graph for this function:
|
|
Performs validity checking for the attributes for PVFS_TYPE_SYMLINK Checks the following: Object type must be PVFS_TYPE_SYMLINK Target must be non-null.
- * - * .
- Return values:
-
| 0 | on success |
| -PVFS_error | on failure |
- Parameters:
-
| fsck_options |
generic fsck options |
| attributes |
SYMLINK attributes |
|
Here is the call graph for this function:
|
|
Performs "bad practice" warning checks for the target attributes for PVFS_TYPE_SYMLINK.
Checks the following:
- Does target exist
- Does target back out of PVFS2 filesystem
- Does target use absolute path
- Return values:
-
| 0 | on success |
| -PVFS_error | on failure |
- Parameters:
-
| fsck_options |
generic fsck options |
| attributes |
SYMLINK attributes |
|
Here is the call graph for this function:
Generated on Tue Feb 7 02:44:12 2012 for PVFS by
1.3.5