-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xfs: create an ioctl to scrub AG metadata
Create an ioctl that can be used to scrub internal filesystem metadata. The new ioctl takes the metadata type, an (optional) AG number, an (optional) inode number and generation, and a flags argument. This will be used by the upcoming XFS online scrub tool. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
- Loading branch information
Darrick J. Wong
committed
Oct 26, 2017
1 parent
91fb9af
commit 36fd6e8
Showing
10 changed files
with
292 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Copyright (C) 2017 Oracle. All Rights Reserved. | ||
* | ||
* Author: Darrick J. Wong <darrick.wong@oracle.com> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it would be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write the Free Software Foundation, | ||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
#include "xfs.h" | ||
#include "xfs_fs.h" | ||
#include "xfs_shared.h" | ||
#include "xfs_format.h" | ||
#include "xfs_trans_resv.h" | ||
#include "xfs_mount.h" | ||
#include "xfs_defer.h" | ||
#include "xfs_btree.h" | ||
#include "xfs_bit.h" | ||
#include "xfs_log_format.h" | ||
#include "xfs_trans.h" | ||
#include "xfs_sb.h" | ||
#include "xfs_inode.h" | ||
#include "xfs_alloc.h" | ||
#include "xfs_alloc_btree.h" | ||
#include "xfs_bmap.h" | ||
#include "xfs_bmap_btree.h" | ||
#include "xfs_ialloc.h" | ||
#include "xfs_ialloc_btree.h" | ||
#include "xfs_refcount.h" | ||
#include "xfs_refcount_btree.h" | ||
#include "xfs_rmap.h" | ||
#include "xfs_rmap_btree.h" | ||
#include "scrub/xfs_scrub.h" | ||
#include "scrub/scrub.h" | ||
#include "scrub/trace.h" | ||
|
||
/* Dispatch metadata scrubbing. */ | ||
int | ||
xfs_scrub_metadata( | ||
struct xfs_inode *ip, | ||
struct xfs_scrub_metadata *sm) | ||
{ | ||
return -EOPNOTSUPP; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright (C) 2017 Oracle. All Rights Reserved. | ||
* | ||
* Author: Darrick J. Wong <darrick.wong@oracle.com> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it would be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write the Free Software Foundation, | ||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
#ifndef __XFS_SCRUB_SCRUB_H__ | ||
#define __XFS_SCRUB_SCRUB_H__ | ||
|
||
/* Metadata scrubbers */ | ||
|
||
#endif /* __XFS_SCRUB_SCRUB_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright (C) 2017 Oracle. All Rights Reserved. | ||
* | ||
* Author: Darrick J. Wong <darrick.wong@oracle.com> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it would be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write the Free Software Foundation, | ||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
#include "xfs.h" | ||
#include "xfs_fs.h" | ||
#include "xfs_shared.h" | ||
#include "xfs_format.h" | ||
#include "xfs_log_format.h" | ||
#include "xfs_trans_resv.h" | ||
#include "xfs_mount.h" | ||
#include "xfs_defer.h" | ||
#include "xfs_da_format.h" | ||
#include "xfs_defer.h" | ||
#include "xfs_inode.h" | ||
#include "xfs_btree.h" | ||
#include "xfs_trans.h" | ||
#include "scrub/xfs_scrub.h" | ||
#include "scrub/scrub.h" | ||
|
||
/* | ||
* We include this last to have the helpers above available for the trace | ||
* event implementations. | ||
*/ | ||
#define CREATE_TRACE_POINTS | ||
#include "scrub/trace.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright (C) 2017 Oracle. All Rights Reserved. | ||
* | ||
* Author: Darrick J. Wong <darrick.wong@oracle.com> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it would be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write the Free Software Foundation, | ||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
#undef TRACE_SYSTEM | ||
#define TRACE_SYSTEM xfs_scrub | ||
|
||
#if !defined(_TRACE_XFS_SCRUB_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) | ||
#define _TRACE_XFS_SCRUB_TRACE_H | ||
|
||
#include <linux/tracepoint.h> | ||
|
||
#endif /* _TRACE_XFS_SCRUB_TRACE_H */ | ||
|
||
#undef TRACE_INCLUDE_PATH | ||
#define TRACE_INCLUDE_PATH . | ||
#define TRACE_INCLUDE_FILE scrub/trace | ||
#include <trace/define_trace.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (C) 2017 Oracle. All Rights Reserved. | ||
* | ||
* Author: Darrick J. Wong <darrick.wong@oracle.com> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it would be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write the Free Software Foundation, | ||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
#ifndef __XFS_SCRUB_H__ | ||
#define __XFS_SCRUB_H__ | ||
|
||
#ifndef CONFIG_XFS_ONLINE_SCRUB | ||
# define xfs_scrub_metadata(ip, sm) (-ENOTTY) | ||
#else | ||
int xfs_scrub_metadata(struct xfs_inode *ip, struct xfs_scrub_metadata *sm); | ||
#endif /* CONFIG_XFS_ONLINE_SCRUB */ | ||
|
||
#endif /* __XFS_SCRUB_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters