]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Remove dmu_write_pages() support
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 8 Feb 2011 18:39:06 +0000 (10:39 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 10 Feb 2011 17:27:21 +0000 (09:27 -0800)
For the moment we do not use dmu_write_pages() to write pages
directly in to a dmu object.  It may be required at some point
in the future, but for now is simplest and cleanest to drop it.
It can be easily readded if/when needed.

include/sys/dmu.h
module/zfs/dmu.c

index a8edfdbf85a06fe0d02d3be2e87bec8f87a529e9..7040b6740d378901cf416d1b2ebaa2cf24281560 100644 (file)
@@ -522,10 +522,6 @@ int dmu_write_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size,
        dmu_tx_t *tx);
 int dmu_write_uio_dbuf(dmu_buf_t *zdb, struct uio *uio, uint64_t size,
        dmu_tx_t *tx);
-#ifdef HAVE_ZPL
-int dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset,
-    uint64_t size, struct page *pp, dmu_tx_t *tx);
-#endif
 #endif
 struct arc_buf *dmu_request_arcbuf(dmu_buf_t *handle, int size);
 void dmu_return_arcbuf(struct arc_buf *buf);
index 79024e1ee82e2c18ea6d13e106e921b977e7f6d4..ede0d0517617f3fc86737dd4415a2e5a00a556bf 100644 (file)
@@ -1268,63 +1268,6 @@ dmu_write_uio(objset_t *os, uint64_t object, uio_t *uio, uint64_t size,
 
        return (err);
 }
-
-#ifdef HAVE_ZPL
-int
-dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
-    page_t *pp, dmu_tx_t *tx)
-{
-       dmu_buf_t **dbp;
-       int numbufs, i;
-       int err;
-
-       if (size == 0)
-               return (0);
-
-       err = dmu_buf_hold_array(os, object, offset, size,
-           FALSE, FTAG, &numbufs, &dbp);
-       if (err)
-               return (err);
-
-       for (i = 0; i < numbufs; i++) {
-               int tocpy, copied, thiscpy;
-               int bufoff;
-               dmu_buf_t *db = dbp[i];
-               caddr_t va;
-
-               ASSERT(size > 0);
-               ASSERT3U(db->db_size, >=, PAGESIZE);
-
-               bufoff = offset - db->db_offset;
-               tocpy = (int)MIN(db->db_size - bufoff, size);
-
-               ASSERT(i == 0 || i == numbufs-1 || tocpy == db->db_size);
-
-               if (tocpy == db->db_size)
-                       dmu_buf_will_fill(db, tx);
-               else
-                       dmu_buf_will_dirty(db, tx);
-
-               for (copied = 0; copied < tocpy; copied += PAGESIZE) {
-                       ASSERT3U(pp->p_offset, ==, db->db_offset + bufoff);
-                       thiscpy = MIN(PAGESIZE, tocpy - copied);
-                       va = zfs_map_page(pp, S_READ);
-                       bcopy(va, (char *)db->db_data + bufoff, thiscpy);
-                       zfs_unmap_page(pp, va);
-                       pp = pp->p_next;
-                       bufoff += PAGESIZE;
-               }
-
-               if (tocpy == db->db_size)
-                       dmu_buf_fill_done(db, tx);
-
-               offset += tocpy;
-               size -= tocpy;
-       }
-       dmu_buf_rele_array(dbp, numbufs, FTAG);
-       return (err);
-}
-#endif /* HAVE_ZPL */
 #endif /* _KERNEL */
 
 /*