Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd
[sfrench/cifs-2.6.git] / fs / nfs / objlayout / objlayout.c
index ad988428162efd3d9853286b032dbc606b07761c..919efd4a1a23bfccf6a618e9f6a39df4b805086f 100644 (file)
@@ -574,76 +574,6 @@ loop_done:
        dprintk("%s: Return\n", __func__);
 }
 
-
-/*
- * Get Device Info API for io engines
- */
-struct objlayout_deviceinfo {
-       struct page *page;
-       struct pnfs_osd_deviceaddr da; /* This must be last */
-};
-
-/* Initialize and call nfs_getdeviceinfo, then decode and return a
- * "struct pnfs_osd_deviceaddr *" Eventually objlayout_put_deviceinfo()
- * should be called.
- */
-int objlayout_get_deviceinfo(struct pnfs_layout_hdr *pnfslay,
-       struct nfs4_deviceid *d_id, struct pnfs_osd_deviceaddr **deviceaddr,
-       gfp_t gfp_flags)
-{
-       struct objlayout_deviceinfo *odi;
-       struct pnfs_device pd;
-       struct page *page, **pages;
-       u32 *p;
-       int err;
-
-       page = alloc_page(gfp_flags);
-       if (!page)
-               return -ENOMEM;
-
-       pages = &page;
-       pd.pages = pages;
-
-       memcpy(&pd.dev_id, d_id, sizeof(*d_id));
-       pd.layout_type = LAYOUT_OSD2_OBJECTS;
-       pd.pages = &page;
-       pd.pgbase = 0;
-       pd.pglen = PAGE_SIZE;
-       pd.mincount = 0;
-       pd.maxcount = PAGE_SIZE;
-
-       err = nfs4_proc_getdeviceinfo(NFS_SERVER(pnfslay->plh_inode), &pd,
-                       pnfslay->plh_lc_cred);
-       dprintk("%s nfs_getdeviceinfo returned %d\n", __func__, err);
-       if (err)
-               goto err_out;
-
-       p = page_address(page);
-       odi = kzalloc(sizeof(*odi), gfp_flags);
-       if (!odi) {
-               err = -ENOMEM;
-               goto err_out;
-       }
-       pnfs_osd_xdr_decode_deviceaddr(&odi->da, p);
-       odi->page = page;
-       *deviceaddr = &odi->da;
-       return 0;
-
-err_out:
-       __free_page(page);
-       return err;
-}
-
-void objlayout_put_deviceinfo(struct pnfs_osd_deviceaddr *deviceaddr)
-{
-       struct objlayout_deviceinfo *odi = container_of(deviceaddr,
-                                               struct objlayout_deviceinfo,
-                                               da);
-
-       __free_page(odi->page);
-       kfree(odi);
-}
-
 enum {
        OBJLAYOUT_MAX_URI_LEN = 256, OBJLAYOUT_MAX_OSDNAME_LEN = 64,
        OBJLAYOUT_MAX_SYSID_HEX_LEN = OSD_SYSTEMID_LEN * 2 + 1,