-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2012, Whamcloud, Inc.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
/* struct rw_semaphore */
#include <linux/rwsem.h>
+#include <lustre_fid.h>
#include <lu_object.h>
#include <md_object.h>
struct thandle;
struct dt_device;
-
-enum {
- OSD_OI_FID_16,
- OSD_OI_FID_NR
-};
-
-/*
- * Object Index (oi) instance.
- */
-struct osd_oi {
- /*
- * underlying index object, where fid->id mapping in stored.
- */
- struct dt_object *oi_dir;
-};
+struct osd_device;
+struct osd_oi;
/*
* Storage cookie. Datum uniquely identifying inode on the underlying file
};
int osd_oi_mod_init(void);
-int osd_oi_init(struct osd_thread_info *info,
- struct osd_oi *oi,
- struct dt_device *dev,
- struct md_device *mdev);
-void osd_oi_fini(struct osd_thread_info *info, struct osd_oi *oi);
-
-int osd_oi_lookup(struct osd_thread_info *info, struct osd_oi *oi,
+int osd_oi_init(struct osd_thread_info *info, struct osd_device *osd);
+void osd_oi_fini(struct osd_thread_info *info, struct osd_device *osd);
+int osd_oi_lookup(struct osd_thread_info *info, struct osd_device *osd,
const struct lu_fid *fid, struct osd_inode_id *id);
-int osd_oi_insert(struct osd_thread_info *info, struct osd_oi *oi,
+int osd_oi_insert(struct osd_thread_info *info, struct osd_device *osd,
const struct lu_fid *fid, const struct osd_inode_id *id,
struct thandle *th, int ingore_quota);
int osd_oi_delete(struct osd_thread_info *info,
- struct osd_oi *oi, const struct lu_fid *fid,
+ struct osd_device *osd, const struct lu_fid *fid,
struct thandle *th);
#endif /* __KERNEL__ */