stress-ng  0.13.05
About: stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.
  Fossies Dox: stress-ng-0.13.05.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

stress-link.c File Reference
#include "stress-ng.h"
Include dependency graph for stress-link.c:

Go to the source code of this file.

Macros

#define MOUNTS_MAX   (128)
 

Functions

static void stress_link_unlink (const stress_args_t *args, const uint64_t n)
 
static size_t random_mount (const int mounts_max)
 
static int stress_link_generic (const stress_args_t *args, int(*linkfunc)(const char *oldpath, const char *newpath), const char *funcname)
 
static int stress_link (const stress_args_t *args)
 
static int stress_symlink (const stress_args_t *args)
 

Variables

static const stress_help_t hardlink_help []
 
static const stress_help_t symlink_help []
 
stressor_info_t stress_link_info
 
stressor_info_t stress_symlink_info
 

Macro Definition Documentation

◆ MOUNTS_MAX

#define MOUNTS_MAX   (128)

Definition at line 39 of file stress-link.c.

Function Documentation

◆ random_mount()

static size_t random_mount ( const int  mounts_max)
inlinestatic

Definition at line 61 of file stress-link.c.

References stress_mwc32().

Referenced by stress_link_generic().

◆ stress_link()

static int stress_link ( const stress_args_t args)
static

Definition at line 249 of file stress-link.c.

References stress_link_generic().

◆ stress_link_generic()

◆ stress_link_unlink()

static void stress_link_unlink ( const stress_args_t args,
const uint64_t  n 
)
static

Definition at line 45 of file stress-link.c.

References PATH_MAX, and stress_temp_filename_args().

Referenced by stress_link_generic().

◆ stress_symlink()

static int stress_symlink ( const stress_args_t args)
static

Definition at line 259 of file stress-link.c.

References stress_link_generic().

Variable Documentation

◆ hardlink_help

const stress_help_t hardlink_help[]
static
Initial value:
= {
{ NULL, "link N", "start N workers creating hard links" },
{ NULL, "link-ops N", "stop after N link bogo operations" },
{ NULL, NULL, NULL }
}

Definition at line 27 of file stress-link.c.

◆ stress_link_info

stressor_info_t stress_link_info
Initial value:
= {
.stressor = stress_link,
.class = (1UL << 10 ) | (1UL << 8 ) ,
.help = hardlink_help
}

Definition at line 265 of file stress-link.c.

◆ stress_symlink_info

stressor_info_t stress_symlink_info
Initial value:
= {
.stressor = stress_symlink,
.class = (1UL << 10 ) | (1UL << 8 ) ,
.help = symlink_help
}

Definition at line 278 of file stress-link.c.

◆ symlink_help

const stress_help_t symlink_help[]
static
Initial value:
= {
{ NULL, "symlink N", "start N workers creating symbolic links" },
{ NULL, "symlink-ops N", "stop after N symbolic link bogo operations" },
{ NULL, NULL, NULL }
}

Definition at line 33 of file stress-link.c.