cvs commit: src/sys/dev/disk/ccd ccd.c src/sys/dev/disk/vn vn.c src/sys/dev/raid/vinum vinuminterrupt.c vinumrequest.c src/sys/kern kern_physio.c subr_disk.c subr_diskslice.c vfs_bio.c vfs_cluster.c src/sys/sys buf.h src/sys/vfs/specfs spec_vnops.c ...

Matthew Dillon dillon at
Wed May 3 13:45:51 PDT 2006

dillon      2006/05/03 13:44:49 PDT

DragonFly src repository

  Modified files:
    sys/dev/disk/ccd     ccd.c 
    sys/dev/disk/vn      vn.c 
    sys/dev/raid/vinum   vinuminterrupt.c vinumrequest.c 
    sys/kern             kern_physio.c subr_disk.c 
                         subr_diskslice.c vfs_bio.c vfs_cluster.c 
    sys/sys              buf.h 
    sys/vfs/specfs       spec_vnops.c 
    sys/vm               swap_pager.c vm_pager.c vnode_pager.c 
  - Clarify the definitions of b_bufsize, b_bcount, and b_resid.
  - Remove unnecessary assignments based on the clarified fields.
  - Add additional checks for premature EOF.
  b_bufsize is only used by buffer management entities such as getblk() and
  other vnode-backed buffer handling procedures.  b_bufsize is not required
  for calls to vn_strategy() or dev_dstrategy().  A number of other subsystems
  use it to track the original request size.
  b_bcount is the I/O request size, but b_bcount() is allowed to be truncated
  by the device chain if the request encompasses EOF (such as on a raw disk
  device).  A caller which needs to record the original buffer size verses
  the EOF-truncated buffer can compare b_bcount after the I/O against a
  recorded copy of the original request size.  This copy can be recorded in
  b_bufsize for unmanaged buffers (malloced or getpbuf()'d buffers).
  b_resid is always relative to b_bcount, not b_bufsize.  A successful read
  that is truncated to the device EOF will thus have a b_resid of 0 and a
  truncated b_bcount.
  Revision  Changes    Path
  1.28      +15 -7     src/sys/dev/disk/ccd/ccd.c
  1.20      +3 -5      src/sys/dev/disk/vn/vn.c
  1.10      +0 -2      src/sys/dev/raid/vinum/vinuminterrupt.c
  1.12      +0 -2      src/sys/dev/raid/vinum/vinumrequest.c
  1.21      +0 -1      src/sys/kern/kern_physio.c
  1.24      +6 -6      src/sys/kern/subr_disk.c
  1.18      +13 -4     src/sys/kern/subr_diskslice.c
  1.71      +3 -5      src/sys/kern/vfs_bio.c
  1.24      +10 -4     src/sys/kern/vfs_cluster.c
  1.34      +23 -8     src/sys/sys/buf.h
  1.40      +12 -10    src/sys/vfs/specfs/spec_vnops.c
  1.24      +0 -4      src/sys/vm/swap_pager.c
  1.22      +2 -0      src/sys/vm/vm_pager.c
  1.26      +2 -4      src/sys/vm/vnode_pager.c

More information about the Commits mailing list