diff --git a/lustre/include/linux/lustre_fsfilt.h b/lustre/include/linux/lustre_fsfilt.h index 32cd252f9a53f723caef3844fb535ad81553b844..62b5686d807292dda8229d2f6df49cb59bc791a3 100644 --- a/lustre/include/linux/lustre_fsfilt.h +++ b/lustre/include/linux/lustre_fsfilt.h @@ -75,8 +75,7 @@ struct fsfilt_operations { 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. */ diff --git a/lustre/include/linux/lustre_mds.h b/lustre/include/linux/lustre_mds.h index 9f9f4dfc46ecdfdddf242661dccd89d30cba29f0..0ed932f09a38dbe0af8a00525b0e7fd5633326e6 100644 --- a/lustre/include/linux/lustre_mds.h +++ b/lustre/include/linux/lustre_mds.h @@ -219,8 +219,8 @@ int mdc_enqueue(struct obd_export *exp, /* 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, diff --git a/lustre/include/linux/lustre_smfs.h b/lustre/include/linux/lustre_smfs.h index b6fd845b1477c3b3ec9a683808fe624fd34e3c85..fa6dddbb39d67294b004327cec18d251462e6a87 100644 --- a/lustre/include/linux/lustre_smfs.h +++ b/lustre/include/linux/lustre_smfs.h @@ -451,32 +451,6 @@ static inline void post_smfs_dentry(struct dentry *cache_dentry) 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) { diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index b480612f746ff3026e6c17bfbf0fb84875db6912..18aa9e4b26a6416e65c1f8161ce992e06c3a15b0 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -210,7 +210,7 @@ static int lov_connect_obd(struct obd_device *obd, struct lov_tgt_desc *tgt, } 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; @@ -246,11 +246,11 @@ static int lov_connect(struct lustre_handle *conn, struct obd_device *obd, #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); } diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index 877cfcacf8b3bb397c9837c617b68ed366deb07c..a9fb04fe9e26c817c5df239370155a1fe2035a1b 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -550,33 +550,29 @@ static int fsfilt_ext3_get_sid(struct inode *inode, void *sid, int sid_size) 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; diff --git a/lustre/lvfs/fsfilt_smfs.c b/lustre/lvfs/fsfilt_smfs.c index b0b77b1fe11bd557092865ad3314ed91f873f637..acbc93ae1581bcddf6efb59f6cbb210bc78ac896 100644 --- a/lustre/lvfs/fsfilt_smfs.c +++ b/lustre/lvfs/fsfilt_smfs.c @@ -358,7 +358,7 @@ static int fsfilt_smfs_get_sid(struct inode *inode, void *sid, 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; diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index 670191443d157c41c13e4aeb2ad1631d8a4ec40e..f8a8f08f9a7467d4814dd2af2710980457220d43 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -300,8 +300,8 @@ int mdc_store_inode_generation(struct obd_export *exp, 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; @@ -332,7 +332,7 @@ int mdc_req2lustre_md(struct obd_export *exp_mdc, struct ptlrpc_request *req, 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; @@ -340,7 +340,7 @@ int mdc_req2lustre_md(struct obd_export *exp_mdc, struct ptlrpc_request *req, } 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) @@ -365,7 +365,7 @@ int mdc_req2lustre_md(struct obd_export *exp_mdc, struct ptlrpc_request *req, 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)); diff --git a/lustre/mgmt/mgmt_cli.c b/lustre/mgmt/mgmt_cli.c index 313a9d5f9388b0b68a87b3c1a552269214304b83..e7663c51819b2e7eb8871e62c61c091c74808003 100644 --- a/lustre/mgmt/mgmt_cli.c +++ b/lustre/mgmt/mgmt_cli.c @@ -264,7 +264,7 @@ static int __init mgmtcli_init(void) 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) diff --git a/lustre/mgmt/mgmt_svc.c b/lustre/mgmt/mgmt_svc.c index 6d39b2b05dc0baf9da923e43f353a5d5ca105f85..f0ff838c1eb1b0a5d43587709470ff824421f487 100644 --- a/lustre/mgmt/mgmt_svc.c +++ b/lustre/mgmt/mgmt_svc.c @@ -151,7 +151,8 @@ static struct obd_ops mgmt_obd_ops = { 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; } diff --git a/lustre/obdfilter/filter_io_24.c b/lustre/obdfilter/filter_io_24.c index 2c59f688904727e492a3821006b73422c246930d..60293297957204bac1e1276e9a6658890022229e 100644 --- a/lustre/obdfilter/filter_io_24.c +++ b/lustre/obdfilter/filter_io_24.c @@ -442,4 +442,3 @@ cleanup: RETURN(rc); } - diff --git a/lustre/obdfilter/filter_io_26.c b/lustre/obdfilter/filter_io_26.c index 24e6229bca680aaee3399f0b3c9190295fe13928..d807f76e4c6edab42d4656aaf2e16e1be12ff192 100644 --- a/lustre/obdfilter/filter_io_26.c +++ b/lustre/obdfilter/filter_io_26.c @@ -255,8 +255,6 @@ cleanup: 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) {