Whamcloud - gitweb
- Extract the file size and blocks from osc_open() in ll_file_open(). Avoids
[fs/lustre-release.git] / lustre / llite / recover.c
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  * Lustre Lite recovery infrastructure.
5  *
6  * Copyright (C) 2002 Cluster File Systems Inc.
7  */
8
9 #define DEBUG_SUBSYSTEM S_LLITE
10
11 #include <linux/lustre_lite.h>
12 #include <linux/lustre_ha.h>
13
14 static int ll_retry_recovery(struct ptlrpc_connection *conn)
15 {
16     ENTRY;
17     RETURN(0);
18 }
19
20 int ll_recover(struct recovd_data *rd, int phase)
21 {
22         struct ptlrpc_connection *conn = class_rd2conn(rd);
23
24         LASSERT(conn);
25         ENTRY;
26
27         switch (phase) {
28             case PTLRPC_RECOVD_PHASE_PREPARE:
29                 RETURN(ptlrpc_run_recovery_upcall(conn));
30             case PTLRPC_RECOVD_PHASE_RECOVER:
31                 RETURN(ptlrpc_reconnect_and_replay(conn));
32             case PTLRPC_RECOVD_PHASE_FAILURE:
33                 RETURN(ll_retry_recovery(conn));
34         }
35
36         LBUG();
37         RETURN(-ENOSYS);
38 }