]>
git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - scrub/phase4.c
2 * Copyright (C) 2018 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <darrick.wong@oracle.com>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it would be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
23 #include <sys/types.h>
24 #include <sys/statvfs.h>
27 #include "workqueue.h"
28 #include "xfs_scrub.h"
34 /* Phase 4: Repair filesystem. */
36 /* Process all the action items. */
38 xfs_process_action_items(
39 struct scrub_ctx
*ctx
)
43 pthread_mutex_lock(&ctx
->lock
);
44 if (moveon
&& ctx
->errors_found
== 0 && want_fstrim
) {
48 pthread_mutex_unlock(&ctx
->lock
);
53 /* Fix everything that needs fixing. */
56 struct scrub_ctx
*ctx
)
58 return xfs_process_action_items(ctx
);
61 /* Estimate how much work we're going to do. */
63 xfs_estimate_repair_work(
64 struct scrub_ctx
*ctx
,
66 unsigned int *nr_threads
,