Whamcloud - gitweb
mdt: new portion of cleanup. Mostly switch to req-layout.
[fs/lustre-release.git] / lustre / lmv / lmv_fld.c
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  * Copyright (C) 2006 Cluster File Systems, Inc.
5  *
6  *   This file is part of Lustre, http://www.lustre.org.
7  *
8  *   Lustre is free software; you can redistribute it and/or
9  *   modify it under the terms of version 2 of the GNU General Public
10  *   License as published by the Free Software Foundation.
11  *
12  *   Lustre is distributed in the hope that it will be useful,
13  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *   GNU General Public License for more details.
16  *
17  *   You should have received a copy of the GNU General Public License
18  *   along with Lustre; if not, write to the Free Software
19  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20  */
21
22 #ifndef EXPORT_SYMTAB
23 # define EXPORT_SYMTAB
24 #endif
25 #define DEBUG_SUBSYSTEM S_LMV
26 #ifdef __KERNEL__
27 #include <linux/slab.h>
28 #include <linux/module.h>
29 #include <linux/init.h>
30 #include <linux/slab.h>
31 #include <linux/pagemap.h>
32 #include <asm/div64.h>
33 #include <linux/seq_file.h>
34 #else
35 #include <liblustre.h>
36 #endif
37
38 #include <lustre/lustre_idl.h>
39 #include <obd_support.h>
40 #include <lustre_lib.h>
41 #include <lustre_net.h>
42 #include <lustre_dlm.h>
43 #include <obd_class.h>
44 #include <lprocfs_status.h>
45 #include "lmv_internal.h"
46
47 /* dummy function for a while */
48 int lmv_fld_lookup(struct obd_device *obd, struct lu_fid *fid)
49 {
50         int rc;
51         ENTRY;
52
53         LASSERT(fid_is_sane(fid));
54
55         /* temporary hack until fld will works */
56         rc = (unsigned long)fid_seq(fid) / LUSTRE_SEQ_RANGE;
57         CWARN("LMV: got MDS %d for sequence: "LPU64"\n", rc, fid_seq(fid));
58         RETURN(rc);
59 }