[BACK]Return to dk.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / dev / dkwedge

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/dev/dkwedge/dk.c between version 1.37 and 1.37.2.2

version 1.37, 2008/04/10 09:31:51 version 1.37.2.2, 2008/06/04 02:05:10
Line 15 
Line 15 
  * 2. Redistributions in binary form must reproduce the above copyright   * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the   *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.   *    documentation and/or other materials provided with the distribution.
  * 3. All advertising materials mentioning features or use of this software  
  *    must display the following acknowledgement:  
  *      This product includes software developed by the NetBSD  
  *      Foundation, Inc. and its contributors.  
  * 4. Neither the name of The NetBSD Foundation nor the names of its  
  *    contributors may be used to endorse or promote products derived  
  *    from this software without specific prior written permission.  
  *   *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS   * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
Line 513  dkwedge_del(struct dkwedge_info *dkw)
Line 506  dkwedge_del(struct dkwedge_info *dkw)
   
         /* Detach from the disk list. */          /* Detach from the disk list. */
         disk_detach(&sc->sc_dk);          disk_detach(&sc->sc_dk);
           disk_destroy(&sc->sc_dk);
   
         /* Poof. */          /* Poof. */
         rw_enter(&dkwedges_lock, RW_WRITER);          rw_enter(&dkwedges_lock, RW_WRITER);
Line 857  int
Line 851  int
 dkwedge_read(struct disk *pdk, struct vnode *vp, daddr_t blkno,  dkwedge_read(struct disk *pdk, struct vnode *vp, daddr_t blkno,
     void *tbuf, size_t len)      void *tbuf, size_t len)
 {  {
         struct buf b;          struct buf *bp;
           int result;
   
         buf_init(&b);          bp = getiobuf(vp, true);
   
         b.b_vp = vp;          bp->b_dev = vp->v_rdev;
         b.b_dev = vp->v_rdev;          bp->b_blkno = blkno;
         b.b_blkno = blkno;          bp->b_bcount = len;
         b.b_bcount = b.b_resid = len;          bp->b_resid = len;
         b.b_flags = B_READ;          bp->b_flags = B_READ;
         b.b_proc = curproc;          bp->b_data = tbuf;
         b.b_data = tbuf;  
   
         VOP_STRATEGY(vp, &b);          VOP_STRATEGY(vp, bp);
         return (biowait(&b));          result = biowait(bp);
           putiobuf(bp);
   
           return result;
 }  }
   
 /*  /*

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.37.2.2

CVSweb <webmaster@jp.NetBSD.org>