int size);
int (* fs_get_sid)(struct inode *inode, void *sid, int size);
- /* this method is needed to make IO operation fsfilt nature depend. */
- int (* fs_send_bio)(int rw, struct inode *inode,struct kiobuf *bio);
+ int (* fs_send_bio)(int rw, struct inode *inode, void *bio);
/* methods for getting page from backing fs and putting page there
* during IO. Used on OST. */
/* mdc/mdc_request.c */
int mdc_get_secdesc_size(void);
void mdc_pack_secdesc(struct ptlrpc_request *req, int size);
-int mdc_req2lustre_md(struct obd_export *exp_mdc, struct ptlrpc_request *req,
- unsigned int offset, struct obd_export *exp_osc,
+int mdc_req2lustre_md(struct obd_export *exp_lmv, struct ptlrpc_request *req,
+ unsigned int offset, struct obd_export *exp_lov,
struct lustre_md *md);
int mdc_getstatus(struct obd_export *exp, struct lustre_id *rootid);
int mdc_getattr(struct obd_export *exp, struct lustre_id *id,
d_unalloc(cache_dentry);
}
-static inline int lookup_by_path(char *path, int flags, struct nameidata *nd)
-{
- struct dentry *dentry = NULL;
- int rc = 0;
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- if (path_init(path, flags, nd)) {
-#else
- if (path_lookup(path, flags, nd)) {
-#endif
- rc = path_walk(path, nd);
- if (rc)
- RETURN(rc);
- } else {
- RETURN(-EINVAL);
- }
-
- dentry = nd->dentry;
-
- if (!dentry->d_inode || is_bad_inode(dentry->d_inode)) {
- path_release(nd);
- RETURN(-ENODEV);
- }
- RETURN(rc);
-}
-
/*FIXME there should be more conditions in this check*/
static inline int smfs_do_rec(struct inode *inode)
{
}
static int lov_connect(struct lustre_handle *conn, struct obd_device *obd,
- struct obd_uuid *cluuid, unsigned long connect_flags)
+ struct obd_uuid *cluuid, unsigned long flags)
{
#ifdef __KERNEL__
struct proc_dir_entry *lov_proc_dir;
#endif
/* connect_flags is the MDS number, save for use in lov_add_obd */
- lov->lov_connect_flags = connect_flags;
+ lov->lov_connect_flags = flags;
for (i = 0, tgt = lov->tgts; i < lov->desc.ld_tgt_count; i++, tgt++) {
if (obd_uuid_empty(&tgt->uuid))
continue;
- rc = lov_connect_obd(obd, tgt, 0, connect_flags);
+ rc = lov_connect_obd(obd, tgt, 0, flags);
if (rc)
GOTO(out_disc, rc);
}
return rc;
}
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-static int fsfilt_ext3_send_bio(int rw, struct inode *inode, struct bio *bio)
+static int fsfilt_ext3_send_bio(int rw, struct inode *inode, void *bio)
{
- submit_bio(rw, bio);
- return 0;
-}
+ int rc = 0;
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
+ submit_bio(rw, (struct bio *)bio);
#else
-static int fsfilt_ext3_send_bio(int rw, struct inode *inode, struct kiobuf *bio)
-{
- int rc, blocks_per_page;
-
- rc = brw_kiovec(rw, 1, &bio, inode->i_dev,
- bio->blocks, 1 << inode->i_blkbits);
+ struct bio *b = (struct kiobuf *)bio;
+ int blocks_per_page;
+
+ rc = brw_kiovec(rw, 1, &b, inode->i_dev,
+ b->blocks, 1 << inode->i_blkbits);
blocks_per_page = PAGE_SIZE >> inode->i_blkbits;
- if (rc != (1 << inode->i_blkbits) * bio->nr_pages * blocks_per_page) {
+ if (rc != (1 << inode->i_blkbits) * b->nr_pages * blocks_per_page) {
CERROR("short write? expected %d, wrote %d\n",
- (1 << inode->i_blkbits) * bio->nr_pages *
+ (1 << inode->i_blkbits) * b->nr_pages *
blocks_per_page, rc);
}
-
+#endif
return rc;
}
-#endif
-/* FIXME-UMKA: This should be used in 2.6.x io code later. */
static struct page *fsfilt_ext3_getpage(struct inode *inode, long int index)
{
int rc;
cache_fsfilt->fs_get_sid);
}
-static int fsfilt_smfs_send_bio(int rw, struct inode *inode, struct kiobuf *bio)
+static int fsfilt_smfs_send_bio(int rw, struct inode *inode, void *bio)
{
struct inode *cache_inode;
struct fsfilt_operations *cache_fsfilt;
return 0;
}
-int mdc_req2lustre_md(struct obd_export *exp_mdc, struct ptlrpc_request *req,
- unsigned int offset, struct obd_export *exp_osc,
+int mdc_req2lustre_md(struct obd_export *exp_lmv, struct ptlrpc_request *req,
+ unsigned int offset, struct obd_export *exp_lov,
struct lustre_md *md)
{
int rc = 0;
LASSERT (lmm != NULL);
LASSERT_REPSWABBED (req, offset + 1);
- rc = obd_unpackmd(exp_osc, &md->lsm, lmm, lmmsize);
+ rc = obd_unpackmd(exp_lov, &md->lsm, lmm, lmmsize);
if (rc >= 0) {
LASSERT (rc >= sizeof (*md->lsm));
rc = 0;
} else if (S_ISDIR(md->body->mode)) {
struct mea *mea;
int mdsize;
- LASSERT(exp_mdc != NULL);
+ LASSERT(exp_lmv != NULL);
/* dir can be non-splitted */
if (md->body->eadatasize == 0)
LASSERT(id_fid(&mea->mea_ids[0]));
- rc = obd_unpackmd(exp_mdc, (void *)&md->mea,
+ rc = obd_unpackmd(exp_lmv, (void *)&md->mea,
(void *)mea, mdsize);
if (rc >= 0) {
LASSERT (rc >= sizeof (*md->mea));
mgmtcli_register_for_events);
inter_module_register("mgmtcli_deregister_for_events", THIS_MODULE,
mgmtcli_deregister_for_events);
- return class_register_type(&mgmtcli_obd_ops, 0, LUSTRE_MGMTCLI_NAME);
+ return class_register_type(&mgmtcli_obd_ops, NULL, 0, LUSTRE_MGMTCLI_NAME);
}
static void __exit mgmtcli_exit(void)
static int __init mgmt_init(void)
{
- int rc = class_register_type(&mgmt_obd_ops, 0, MGMT_DEVICE_NAME);
+ int rc = class_register_type(&mgmt_obd_ops, NULL,
+ 0, MGMT_DEVICE_NAME);
return rc;
}
RETURN(rc);
}
-
-
/* See if there are unallocated parts in given file region */
static int filter_range_is_mapped(struct inode *inode, obd_size offset, int len)
{