Lines Matching refs:_fs
161 fs_randomfail_init(struct fs *_fs, const char *args,
164 struct randomfail_fs *fs = (struct randomfail_fs *)_fs;
169 fs_set_error(_fs, "Randomfail parameters missing");
173 fs_set_error(_fs, "Invalid randomfail parameters: %s", error);
179 fs_set_error(_fs, "Parent filesystem not given as parameter");
191 if (fs_init(parent_name, parent_args, set, &_fs->parent, &error) < 0) {
192 fs_set_error(_fs, "%s", error);
198 static void fs_randomfail_deinit(struct fs *_fs)
200 struct randomfail_fs *fs = (struct randomfail_fs *)_fs;
202 if (_fs->parent != NULL)
203 fs_deinit(&_fs->parent);
207 static enum fs_properties fs_randomfail_get_properties(struct fs *_fs)
209 return fs_get_properties(_fs->parent);
237 static bool fs_random_fail(struct fs *_fs, int divider, enum fs_op op)
239 struct randomfail_fs *fs = (struct randomfail_fs *)_fs;
245 fs_set_error(_fs, RANDOMFAIL_ERROR);
275 fs_random_fail_range(struct fs *_fs, enum fs_op op, uoff_t *offset_r)
277 struct randomfail_fs *fs = (struct randomfail_fs *)_fs;
279 if (!fs_random_fail(_fs, 1, op))