Skip to content
Snippets Groups Projects
Unverified Commit ef9283f6 authored by Marcin Ślusarz's avatar Marcin Ślusarz Committed by GitHub
Browse files

Merge pull request #4705 from ldorau/pmem2-make-two-badblock-functions-internal

pmem2: make two bad block functions internal
parents e7d8b588 6b4285ba
Branches phs3ps-master-patch-22558
No related tags found
No related merge requests found
......@@ -65,16 +65,12 @@ struct badblocks {
struct badblocks *badblocks_new(void);
void badblocks_delete(struct badblocks *bbs);
int badblocks_files_namespace_badblocks(const char *path,
struct badblocks *bbs);
int badblocks_devdax_clear_badblocks_all(const char *path);
int badblocks_devdax_clear_badblocks(const char *path, struct badblocks *bbs);
long badblocks_count(const char *path);
int badblocks_get(const char *file, struct badblocks *bbs);
int badblocks_clear(const char *path, struct badblocks *bbs);
int badblocks_clear_all(const char *file);
int badblocks_devdax_clear_badblocks_all(const char *path);
#ifdef __cplusplus
}
......
......@@ -327,10 +327,11 @@ badblocks_files_namespace_badblocks_bus(struct ndctl_ctx *ctx,
}
/*
* badblocks_files_namespace_badblocks -- returns badblocks in the namespace
* where the given file is located
* badblocks_files_namespace_badblocks -- (internal) returns badblocks
* in the namespace
* where the given file is located
*/
int
static int
badblocks_files_namespace_badblocks(const char *path, struct badblocks *bbs)
{
LOG(3, "path %s", path);
......@@ -407,10 +408,11 @@ out_ars_cap:
}
/*
* badblocks_devdax_clear_badblocks -- clear the given bad blocks in the dax
* device (or all of them if 'pbbs' is not set)
* badblocks_devdax_clear_badblocks -- (internal) clear the given bad blocks
* in the dax device (or all of them
* if 'pbbs' is not set)
*/
int
static int
badblocks_devdax_clear_badblocks(const char *path, struct badblocks *pbbs)
{
LOG(3, "path %s badblocks %p", path, pbbs);
......
......@@ -8,39 +8,8 @@
#include <errno.h>
#include "out.h"
#include "os.h"
#include "badblocks.h"
/*
* badblocks_files_namespace_badblocks --
* fake badblocks_files_namespace_badblocks()
*/
int
badblocks_files_namespace_badblocks(const char *path, struct badblocks *bbs)
{
LOG(3, "path %s", path);
os_stat_t st;
if (os_stat(path, &st)) {
ERR("!stat %s", path);
return -1;
}
return 0;
}
/*
* badblocks_devdax_clear_badblocks -- fake bad block clearing routine
*/
int
badblocks_devdax_clear_badblocks(const char *path, struct badblocks *bbs)
{
LOG(3, "path %s badblocks %p", path, bbs);
return 0;
}
/*
* badblocks_devdax_clear_badblocks_all -- fake bad block clearing routine
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment